To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 3470
3469  |  3471
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 14 Dec 1999 17:06:28 GMT
Viewed: 
2616 times
  
In lugnet.cad.dev, Jacob Sparre Andersen wrote:

[ Still discussing
http://www.geocities.com/SouthBeach/Lagoon/8641/bfcspecv4.txt ]

Steve:

You can also put them on ldraw.org now that you have an
account here.

It's an admin role vs. personal role thing.  I took it upon myself to write up a
spec, I didn't want to imply that it was endorsed by the group at large.

Here comes a commented/edited version. Lines starting with
"#" are my comments and lines starting with "J" are my
changes/additions.

------------------------------------------------------------------------------
[...]
7 revision: 7, 1999.12.08
[...]
4 Inversion is the one BFC option which accumulates globally.  If the current
4 file is being rendered inverted, then any subfiles of the current file are
4 also rendered as inverted.

# In what sense is inversion more "global" than clipping?

Hmmm.  You're right.  Inversion is no more global than accumulated clipping.
They are identically global.  This paragraph is now:

9 Inversion accumulates down the reference branch.  If the current
4 file is being rendered inverted, then any subfiles of the current file are
4 also rendered as inverted.

4 INVERTNEXT
4 This option is used directly before a subfile command (linetype 1).  It is
4 a flag, indicating to the renderer that the following subfile reference should
#                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
# You might want to make it more clear that it only refers
# to the _immediately_ following line.

OK.  The paragraph does have some verbiage in that direction, but I will add to
it:

4 INVERTNEXT
4 This option is used directly before a subfile command (linetype 1).  It is
4 a flag, indicating to the renderer that the subfile reference should
4 have its orientation inverted, i.e. the inside/outside definition should be
4 swapped.  Inverted subfiles must be preceeded by a 0 BFC INVERTNEXT statement,

4 and the 0 BFC INVERTNEXT statement may not appear anywhere else in a file.
9 The INVERTNEXT flag applies *only* to the one subfile which immediately
9 follows.  Any subfile commands afterward are processed normally.

There will be a few requirements placed on the design of rendering programs,
#                     ^^^^^^^^^^^^
# What about reformulating this as "implementation advice"
# (since "Any program may violate...").

OK:
9 Rendering Engine Guidelines

--------------------------------------------------------------------------------
9 This section gives some suggestions for the design of rendering programs,
3 in order to achieve correct renderings.  Any program may violate
9 these guidelines, if there is another way to acheive a valid rendering.

Matrix Inversions.  Rendering engines will need to correct for transformation
1 matrices which inadvertently invert a subfile.  They will also need to
1 allow for situations in which the matrix is deliberately given a negative
1 determinant, in order to mirror the subfile.

# I suppose that the meaning of this statement is that the
# (C)CW-ness of the polygons is compensated for the
# determinant of the accumulated orientation matrix, but it
# is not very clear.

It's not very clear, because I was trying to avoid telling people specifically
how to code their programs.  It might make sense to write a sample program to
illustrate these hard-to-explain points.

Try this:
  Matrix Inversions.  Rendering engines will need to correct for transformation
1 matrices which inadvertently invert a subfile.  They will also need to
1 allow for situations in which the matrix is deliberately given a negative
9 determinant, in order to mirror the subfile.
9
9 The typical method of determining that the file has been manually inverted is
9 to calculate the determinate of the transformation matrix.  If the determinate

9 is negative, then the subfile has been inverted.  This document does not
9 attempt to address the details of 3D graphics algorithms and issues.
9
9 The typical way to adjust for matrix inversions is to switch the winding of
9 the polygon vertices.  That is, if the DAT specifies the winding as CW, and
9 the current subfile has been inverted, the rendering program would proceed as
9 if the winding is CCW.

7 the rendering engine to apply BFC-processing on these parts (assuming the
J parts are certified), even if the calling files aren't certified.

OK.

7 If 32 <= Color And Color <= 47 Then // This restriction may or may not be
7    AccumClip = FALSE                // required, depending on the style of
7 End If                              // rendering for transparent surfaces.

# Shouldn't the check on colour numbers rather be formulated
# "If Transparent (Colour) Then"? We should remember that
# people can redefine the meaning of the colour numbers, so
# other numbers than the range 32 to 47 can refer to
# transparent colours.

Good idea.  But that entire test belongs in the BFC() function.

I changed every occurrence of Color to Colour.  Any other American-isms which
need to be changed to Australia-isms?

4    If Command.LineType != INVERTNEXT Then
4       InvertNext = FALSE
4    End If

# Shouldn't the check be:

J    If Command.LineType != BFC Or Else no Option in Command is INVERTNEXT Then
J       InvertNext = FALSE
J    End If

I changed it to:

9    If Command.LineType != BFC Then
4       InvertNext = FALSE
9    ElseIf No Option in Command is INVERTNEXT Then
9       InvertNext = FALSE
4    End If

... to avoid any problems with evaluating tests in compound boolean expressions.

6 --------------------------------------------------------------------------------
6 Guidelines for Part and Primitives authors
6 --------------------------------------------------------------------------------
6 - How to write double-sided and decoration sections
6 - Default values
6 0 BFC CERTIFY
6 =
6 0 BFC CLIP CCW

# ???

Ties back to the issue at the top of the file:
6 - The authors guidelines section is completely undeveloped.

Steve



Message has 1 Reply:
  Re: Line in the Sand
 
[ Still discussing (URL) ] Steve: (...) That makes sense. (...) I'll reuse the notation. ---...--- (...) # Fine. (...) # I'll try a complete reformulation: 4 INVERTNEXT J This option is used to swap the definitions of "inside" and "outside" (i.e. J (...) (25 years ago, 14-Dec-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Line in the Sand
 
[ Still discussing (URL) ] Steve: You can also put them on ldraw.org now that you have an account here. Here comes a commented/edited version. Lines starting with "#" are my comments and lines starting with "J" are my changes/additions. ---...--- (...) (25 years ago, 12-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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR