Subject:
|
Line in the Sand
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 20 Oct 1999 21:16:14 GMT
|
Viewed:
|
2167 times
|
| |
| |
OK, we've been discussing how to best extend the LDraw language to
allow rendering engines to do backface-culling. We've got a pretty
good agreement on most of what is needed. I think it would be
productive, at this point, to work from a complete statement. That
way, we all have a firm understanding of the disagreements. ;)
So I've written such a document. I've included it in this message,
and I will also be maintaining it at
<http://www.geocities.com/partsref/bfcspec.txt>, for now. If we
ever decide that the spec is good to go, I'll turn it over to Tim
and Jacob, to be incorporated into www.ldraw.org.
I wouldn't describe the document as a formal specification. An
informal spec, maybe. I'm sure there are points I missed, and pieces
that could be better written. And there are one or two points of
contention to be found, as well.
This is a serious request for feedback, suggestions, criticisms,
additions, and arguments. We are very close on this, let's finish it up!
Steve
--------------------------------------------------------------------------------
LDraw Language Extension for Clipping
1999.10.20
author: L-CAD list on www.lugnet.com/cad/dev/
--------------------------------------------------------------------------------
Purpose: Establish a standard for backface-culling (ie, clipping) processing
in LDraw-compatible rendering programs. This standard will include language
extensions, definitions and expected processing effects.
The standard must allow cross-compatible DAT files. That is, LDraw-compatible
rendering programs must render clipping-enabled DAT files correctly, and
renderers which include the BFC extensions must render non-clippable DAT
files correctly.
To make this standard useful and effective, the LDraw parts library must be
updated to follow the new standard. Since it would be difficult to rewrite
the entire library in one update, the standard will allow for a mix of
extended and unextended files in one rendering.
--------------------------------------------------------------------------------
Definitions
--------------------------------------------------------------------------------
Subfile. A DAT file referenced from another file, via a linetype 1 command.
Or any file which is lower in the file-reference tree than the current file.
Superfile. The file which referenced the current file. More generally, any
file which is higher in the file-reference tree than the current file.
Polygon. A 2D surface created by LDraw's linetype 3 (triangle) or 4
(quadrilateral) command.
--------------------------------------------------------------------------------
Rendering Engine Requirements
--------------------------------------------------------------------------------
There will be a few requirements placed on the design of rendering programs,
in order to achieve correct renderings. Any program should may violate
these requirements, if there is another way to acheive a valid rendering.
Matrix Inversions. Rendering engines will need to correct for transformation
matrices which inadvertently invert the current file. They will also need to
allow for situations in which the matrix is deliberately inverted.
Allowable Clipping. A file can only have clipping applied when the following
conditions apply:
- All superfiles are certified.
- The current file is certified.
- No superfile has disabled clipping.
In some cases, it may be desirable to assume that a file is right-side out,
(and therefore clippable) even though not all superfiles are certified. One
obvious example is files in the ldraw\parts directory.
--------------------------------------------------------------------------------
Language extensions
--------------------------------------------------------------------------------
0 CERTIFY [BFC|NOBFC]
default: NOBFC
This meta-statement indicates whether a DAT file is compatible with the
backface-culling extension (or not). Every clippable file must include
exactly one CERTIFY meta-statement, and it must appear before the first
operational command-line in the file.
This statement could be extended in the future to include information about
other language extensions. Rendering programs should expect to find multiple
tags on the CERTIFY meta-statement.
The settings on a CERTIFY line apply only to the file containing the CERTIFY
statement. There is no concept of a global or persistent "certify state",
affecting multiple files in a rendering.
--------------------------------------------------------------------------------
0 WINDING [ CW | CCW | UNKNOWN ]
default: CCW
Sets the current winding direction for polygons in the current file. The
order of vertices in each polygon command must follow this winding, as
viewed from the front of the polygon. There may be any number of WINDING
statements in a file, although it is recommended that changes to WINDING
be kept to a minimum.
CW = Clockwise
CCW = counter-clockwise (same as anti-clockwise)
UNKNOWN = winding direction is unknown or variable. This setting will disable
clipping, until the winding is reset.
The WINDING setting is a local setting, it applies only to the file in which
the WINDING meta-statement appears.
--------------------------------------------------------------------------------
0 CLIPPING [ ON | OFF ]
default: renderer-dependent
Enables or disables clipping for the rendering. Any number of CLIPPING
statements may appear in a file. The current clip-setting is passed down to
subfiles when they are referenced, giving superfiles some influence over the
processing of subfiles. However, the clip-setting is *not* passed back up
from the subfile to the superfile.
--------------------------------------------------------------------------------
0 INVERT
The INVERT meta-statement is a flag, indicating to the renderer that the
following subfile reference has been intentionally inverted. If the next
command-line is not a subfile reference, the INVERT is ignored.
The INVERT flag is required in addition to the actual inversion, which
occurs within the subfile command's transformation matrix.
--------------------------------------------------------------------------------
end of document
--------------------------------------------------------------------------------
|
|
Message has 8 Replies: | | Re: Line in the Sand
|
| (...) I would. This is WAY better than most of the crap requirements I have to rationalize into some semblance of something to keep paying customers happy. Very nice work, Steve. Written in a way that made it understandable to someone that doesn't (...) (25 years ago, 20-Oct-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| Steve Bliss wrote... (...) Good idea, it's hard to discuss in so many threads. (...) Thank you for the well-written summary. Well-written because I agree with 99% of it ;) (...) Yes, too bad I'm off for an Internet-free :( 4-day week-end at the sea (...) (25 years ago, 21-Oct-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| Steve Bliss wrote in message <380e2b8e.12563517@l...et.com>... (...) An orientation matrix doesn't contain enough information to invert an asymmetrical part; if you assume it does, this would result in a part with a mirrored shape. I propose that (...) (25 years ago, 21-Oct-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| The proposal has been updated, with changes from Lars and Gary, some additional definitions, and a new section of parts guidelines. See it at (URL). The revision marks (along the left margin) will be maintained until we've got a final document, (...) (25 years ago, 21-Oct-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| (...) There hasn't been any discussion on this in almost two weeks. Does everyone like this spec? Any issues? Are you programmers willing to implement this? Is it ready to go to press? Steve (25 years ago, 4-Nov-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| See (URL) There is a serious weakness in this document, 'certification' is not clearly defined. This definitely needs to be addressed. Currently, the only definition of certification is: (...) ... which is a bit of a typo. My definition of certified (...) (25 years ago, 10-Nov-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| Still discussing (URL). Here's another syntactical approach to BFC. Like it, hate it, let us know what you think. Have a single 0 BFC statement, which allows specifications of various options/settings. Something like: 0 BFC ( CERTIFY | NOCERTIFY | (...) (25 years ago, 17-Nov-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| Still discussing: (URL) and now (URL) I posted an update to the v4 spec just now. It includes the changes suggested by Jacob. Things have been quiet lately, so I want to throw out a couple of questions: Does anyone have an opinion on whether it (...) (25 years ago, 2-Dec-99, to lugnet.cad.dev)
|
85 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|