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 / 3487
     
   
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 16 Dec 1999 21:40:02 GMT
Viewed: 
2973 times
  

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

Steve:

[...]

I like your explanation better, but I think we're both missing the point: this
paragraph is supposed to be about INVERTNEXT, not inversion.  Fewer details are
appropriate at this point.  More details should go in (1) the explanation of
inversion in the "Language Extension Functionality" and (2) pseudo-code for the
BFC() function.

Correct.

The documentation for INVERTNEXT should be focused the specifics of INVERTNEXT,
not on the definition/affect of inversion:

S INVERTNEXT
S This option inverts a subfile.  It may only be used immediately before a
S subfile command line, and nowhere else.

J subfile command line, and it only influences the immediately
J following subfile command.

I don't think the "and nowhere else" is that important. You
already have written "only".

S
S Example:
S 0 BFC INVERTNEXT
S 1 16 0 0 0 1 0 0 0 1 0 0 0 1 somefile.dat
S 1 16 0 0 0 1 0 0 0 1 0 0 0 1 another.dat
S
S In this example, somefile.dat would be rendered as inverted.  Another.dat
S would not be inverted.
S
S For further information, see "Inversion" in the Language Extension
S Functionality section.

Good.

For now, I'm not going to change the INVERTNEXT paragraph.  It does need to be
clarified, and I'll add that to the issues list.  But before making changes, I'd
like to hear back from you (and anyone else) on my comments and suggestions.

Try the formulation above, and insert something like my
previous INVERTNEXT text in the "Inversion" section.

Question:  should there be a definition-entry for matrix-inversion?

Shouldn't be necessary. Or is it?

Second question: why did we decide that matrix-inversions were evil?  I remember
being thick-headed about seeing the problem, but now I don't remember what the
problem is.

One problem is that it can be difficult to see if a matrix
has negative determinant.

Another one is that some of us are lazy enough to mirror our
subfiles in stead of writing two copies.

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.

# %s/determinate/determinant/g ?

Er, yes.

BTW, should I change "transformation matrix" to "orientation matrix" when
discussing the matrix being used to map the current (sub)file onto the screen?

Don't know.

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.

# I am not sure this actually clarifies things more. See if
# the text with the INVERTNEXT is enough.

[ My head is not clear enough for matrix operations at the
  moment - I'll be back later with comments to the rest. ]

Play well,

Jacob

------------------------------------------------------------
--  E-mail:               sparre@cats.nbi.dk              --
--  Web...:  <URL: http://hugin.ldraw.org/LEGO/Biler/ >   --
------------------------------------------------------------

   
         
     
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 17 Dec 1999 14:39:17 GMT
Viewed: 
2745 times
  

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

In lugnet.cad.dev, Jacob Sparre Andersen wrote:

[about INVERTNEXT]
Try the formulation above, and insert something like my
previous INVERTNEXT text in the "Inversion" section.

OK.

Steve

   
         
   
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 20 Dec 1999 23:12:04 GMT
Viewed: 
2914 times
  

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

Steve:

(snip)
Second question: why did we decide that matrix-inversions were evil?  I remember
being thick-headed about seeing the problem, but now I don't remember what the
problem is.

One problem is that it can be difficult to see if a matrix
has negative determinant.

Why? Are you thinking about
  1 16  -4 0 0  0 0 0  0 0 4  1-4disc.dat
The determinant is zero, which BTW causes POVRay to halt
("singular matrix"). L3P has to fix these matrices or POVRay
would not render many parts at all!
As part of certifying a DAT file I believe this kind of subfile
reference should be fixed as well, like into
  1 16  -4 0 0  0 1 0  0 0 4  1-4disc.dat
"L3P -check -w3" will help spot the problems.

Another one is that some of us are lazy enough to mirror our
subfiles in stead of writing two copies.

Mirroring is not a problem. It causes a "negative determinant matrix"
which can be detected and adjusted for (by toggling winding).
So matrix-inversions are not evil.
/Lars

   
         
   
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 21 Dec 1999 15:50:53 GMT
Viewed: 
2997 times
  

In lugnet.cad.dev, Lars C. Hassing wrote:

Mirroring is not a problem. It causes a "negative determinant matrix"
which can be detected and adjusted for (by toggling winding).
So matrix-inversions are not evil.

Matrix-inversions are not evil.  But for some reason, using them to actually
invert subfiles is evil (as opposed to using INVERTNEXT to invert subfiles).

If I reallly needed an answer to this, I'd go read past messages.  But I *do*
remember:

a) I originally thought INVERTNEXT was redundant, because inversions could be
handled by inverting matrices.
b) I was later convinced that INVERTNEXT was needed.

I don't remember *why* INVERTNEXT is needed.  But I am sure it is needed.

Steve

   
         
     
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 21 Dec 1999 17:28:44 GMT
Viewed: 
3152 times
  

Steve Bliss wrote ...
I don't remember *why* INVERTNEXT is needed.  But I am sure it is needed.

Is this a joke? You argue very well in "Inversion" in "Language Extension
Functionality" about the 3D tube ;-)
/Lars
Sorry if I missed a pun.

    
          
     
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 22 Dec 1999 14:54:51 GMT
Viewed: 
3441 times
  

In lugnet.cad.dev, Lars C. Hassing wrote:

Steve Bliss wrote ...
I don't remember *why* INVERTNEXT is needed.  But I am sure it is needed.

Is this a joke? You argue very well in "Inversion" in "Language Extension
Functionality" about the 3D tube ;-)

Nope, not a joke.  I seriously didn't remember the reason(s) why other
approaches wouldn't work as well as INVERTNEXT.

I poked around old messages a little bit, I think I remember better now.

Let me (attempt to) explain:

When this whole BFC discussion started, I thought the best way to invert
subfiles was to negate the orientation matrix.

Later in the discussion, it became apparent to me that using the orientation
matrix was not a workable way to deal with inversion.  Other people realized
this from the start, I think.

As I remember, the only other suggested approach to inverted objects was to have
two sets of primitives; one set with normal orientation, the other set inverted.
This is actually a workable solution, but limits the power of the LDraw
language, and requires somebody to *write* all the inverterd-primitive files.

So INVERTNEXT is our best solution to the problem.

Steve

   
         
   
Subject: 
Re: Line in the Sand
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 21 Dec 1999 17:45:25 GMT
Reply-To: 
RUI.MARTINS@spamcakeLINK.PT
Viewed: 
3033 times
  

Mirroring is not a problem. It causes a "negative determinant matrix"
which can be detected and adjusted for (by toggling winding).
So matrix-inversions are not evil.

Matrix-inversions are not evil.  But for some reason, using them to actually
invert subfiles is evil (as opposed to using INVERTNEXT to invert subfiles).

If I reallly needed an answer to this, I'd go read past messages.  But I *do*
remember:

a) I originally thought INVERTNEXT was redundant, because inversions could be
handled by inverting matrices.
b) I was later convinced that INVERTNEXT was needed.

I don't remember *why* INVERTNEXT is needed.  But I am sure it is needed.

I do, it's because of those cases like an hollow cylindir DAT file is
referenced by another DAT file. Since the cylinder is supposed to be
define outwards, but you can use it to make the inside/outside of a stud
(for example) and the if the renderer corrected the inverted matrix, it
will clip the inside cylinder since it would seam to be facing outwards.

Actually this is needed for backwards compatibility, and expecially
because of our laziness in doing the correct editing, and NOT mirroring
things.

Another fact is that INVERTNEXT is NOT to correct for the Matrix with
negative determinant, but for the lego cad builder to inform the renderer,
I want to use this particular DAT file inverted (NOT MIRRORED) i.e. Every
face which was facing outwards will now considered to be facing inwards,
and viceversa, and upwards has downwards and viceversa.
Actually what we are saying is:
"now all the unclipable polygons will be clippable, and viceversa"

But all this has been debated too many times, and a long time ago already,
so make up your minds.

Either we support the INVERTNEXT to support our laziness, or we don't, and
we will have to have 2 versions of the DAT files we eventually would like
to use inverted (inside-out).

See ya.

Rui Martins

 

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