Special:
|
[DAT] (requires LDraw-compatible viewer)
|
Subject:
|
Re: Line in the Sand
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 10 Nov 1999 18:01:14 GMT
|
Viewed:
|
3229 times
|
| |
| |
On Wed, 10 Nov 1999 00:44:17 GMT, "Lars C. Hassing" <lch@ccieurope.com> wrote:
Still discussing <http://www.geocities.com/partsref/bfcspec.txt>
> Jacob Sparre Andersen wrote:
> > [ Still discussing http://www.geocities.com/partsref/bfcspec.txt ]
> > certification = "0" "CERTIFY" ( "BFC" | "NOBFC" ) { certification_flag }
> > winding = "0" "WINDING" ( "CW" | "CCW" | "UNKNOWN" )
> > clipping = "0" "CLIPPING" ( "ON" | "OFF" )
> > invert = "0" "INVERT"
>
> Or you could write:
> 0 CERTIFY BFC | 0 CERTIFY NOBFC
Yes, but the 0 CERTIFY ( BFC | NOBFC ) format is more common. And it emphasizes
that is one statement with various parameters. And it's less typing.
> 0 WINDING CW | 0 WINDING CCW | 0 WINDING UNKNOWN
> (I don't think "0 WINDING" alone makes much sense)
True. Using the parantheses ( ) to group the parameters indicates that one of
the options *must* be used. The square brackets [ ], that I used originally,
indicated that the parameters were optional. Which was definitely *not* the
intention.
> 0 INVERT
> (or maybe "0 INVERTNEXT" to stress that it is only the following
> line, which must be of type 1, that is turned inside-out)
Hmm. Interesting thought. I like it. Anyone else want to ( yay | nay ) this?
> The CERTIFY section:
> > operational command-line in the file. No other statements are required for
> > backface culling to be applied to a file.
>
> Then please add:
> 0 CERTIFY BFC implies 0 CLIPPING ON and 0 WINDING CCW.
CERTIFY BFC doesn't imply CLIPPING ON -- the clipping mode/setting comes from
the superfile (for the main model-file, clipping is set by the rendering engine
or an explicit CLIPPING ON statement).
WINDING CCW is the default for files, as stated in the section for WINDING.
CERTIFY doesn't imply CCW winding at all--if a file started with these two
lines:
0 WINDING CW
0 CERTIFY BFC
... the winding should be CW, right?
If the CERTIFY statement 'implied' the winding, then this example would not be
clear (at least to the human reader) if the winding for this file is CW or CCW.
Does CERTIFY override the earlier WINDING or not?
That's why the WINDING setting has a default value, and CERTIFY doesn't affect
the WINDING setting in any way.
BUT, I'll see what I can do with the verbiage, to make thing more clear.
> The WINDING section:
> > 0 WINDING [ CW | CCW | UNKNOWN ]
> > default: CCW
> As "0 WINDING" alone doesn't make much sense, the "default: CCW" should
> be deleted. The default value should not refer to what 0 CERTIFY BFC
> implies - you don't have a default for CLIPPING.
WINDING is a file-specific setting, and it is appropriate to have a default
value for it. The default value applies before the first (if any) WINDING
statement. It is not valid to specify 0 WINDING with no parameter.
CLIPPING doesn't need a default, because it is passed down from the superfile.
It is up to the rendering engine to provide the initial value of CLIPPING.
> > 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 polygons in
> > the file in which the WINDING meta-statement appears.
>
> "...This setting will disable clipping..." - I hope readers do not confuse
> this with CLIPPING OFF. Although the next sentence says WINDING is local,
> it should be made clear that clipping is not turned off for subfiles.
> Can you think of a better wording of the two sentences?
> Also there should be some words about using 0 CLIPPING OFF for a
> double-sided section of a file.
Ergh. Thank you for pointing this out. I had not thought through all the
implications of the WINDING UNKNOWN (maybe WINDING NONE?) setting.
My intention was that WINDING UNKNOWN *would* disable clipping for subfiles, but
that is obviously *not* the way the document is written, and making things work
that way would be non-elegant. Then again, it seems counter-productive to
require part-authors to use both WINDING UNKNOWN and CLIPPING OFF when they make
use of subfiles in a non-compliant or double-sided section.
Maybe it would be better to drop WINDING UNKNOWN and specify that the default
value for CLIPPING is ON. File authors would use CLIPPING OFF for double-sided
or non-compliant sections of code. Note that the CLIPPING default would really
only effect the main file in a rendering, because superfiles would pass down
their clip-setting to subfiles.
Curent_Clip = Local_Clip and Super_File_Clip
Making this change would bring us closer to a consensus, it would simplify the
spec and keep it clean, and would eliminate overlapping and potentially
confusing functions.
> Well, we could start working right now by updating the primitives reference
> http://www.ldraw.org/memorial/archive/FAQ/Primitives_Reference
> by adding newer primitives and stating the orientation.
Good idea. That should be another thread, shouldn't it?
> If we "invent" another meta command, like
> 0 ORIENTATIONARROW x1 y1 z1 x2 y2 z2
> rendering programs could optionally draw an arrow and you could save
> a nice bitmap for the primitives reference.
Nice idea. You need a scale factor as well. Primitives are drawn in a variety
of scales (well, two scales: full size and -1-to-+1). For a reference document,
you'd need to be able to *see* all the primitives.
Considering how frequently some primitives are referenced in a rendered scene,
I'd rather minimize the excess data in the primitive files. I realize that
optimized renderers will only read and parse each file once, but why throw in
something that isn't necessary to the process of rendering.
We could just make a file which steps through each of the primitives, including
an orientation vectors. Something like (the first arrow is not right):
0 Primitive Reference
0 Name: PRIMREF.DAT
0 WRITE 1-4CON1.DAT 1/4 Cone Section 1:2 Radius, Scale: 10x
1 16 0 0 0 10 0 0 0 10 0 0 0 10 1-4con1.dat
2 24 -10 5 0 -30 5 0
3 24 -30 5 0 -25 5 2.5 -25 5 -2.5
0 STEP
0 CLEAR
0 WRITE 4-4DISC.DAT Full Disc, (X,Z)= (-1 to 1, -1 to 1), Scale: 10x
1 16 0 0 0 10 0 0 0 10 0 0 0 10 4-4disc.dat
2 24 0 0 0 0 -30 0
3 24 0 -30 0 -2.5 -25 0 2.5 -25 0
0 etc, etc
Then we could just add new primitives as they appear. Kind of awkward to view,
but it could be a way to proceed.
Steve
|
|
Message has 2 Replies: | | Re: Line in the Sand
|
| Steve Bliss wrote... (...) But it *does* imply CLIPPING ON. Otherwise clipping would be off. Remember, CLIPPING ON cannot turn clipping on if turned off in a superfile. If you render the part alone (just to view the single part) the CERTIFY should (...) (25 years ago, 10-Nov-99, to lugnet.cad.dev)
| | | Re: Line in the Sand
|
| [ Still discussing (URL) ] Steve: (...) [...] (...) "INVERTNEXT" is good. It makes the effect much more clear. (...) It gets much too messy when you mix the states of a parameter and the setting of that parameter. CERTIFY BFC does imply CLIPPING ON, (...) (25 years ago, 11-Nov-99, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: Line in the Sand
|
| Steve Bliss wrote... (...) the (...) allow (...) OFF (...) they (...) reference (...) CLIPPING (...) Good point! (...) Or you could write: 0 CERTIFY BFC | 0 CERTIFY NOBFC 0 WINDING CW | 0 WINDING CCW | 0 WINDING UNKNOWN (I don't think "0 WINDING" (...) (25 years ago, 10-Nov-99, to lugnet.cad.dev)
|
85 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|