Subject:
|
Re: Line in the Sand
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Wed, 8 Dec 1999 18:06:53 GMT
|
Viewed:
|
2790 times
|
| |
| |
In lugnet.cad.dev, Lars C. Hassing wrote:
> Steve Bliss wrote...
> > Double-sided sections won't be very rare. They'll be needed for all decorated
> > parts.
>
> Huh? please explain why.
Sometimes, transparent parts have decorative printing. And the LDraw library
should be written so that modelers can use any part in any color, even if LEGO
hasn't released that part/color combination yet.
Decorations on transparent parts shows through when looking at the part from
behind. If the decoration polygons were put through the BFC-check, they would
be clipped in this situation, because the decoration is facing away from the
viewer.
> Sorry, I didn't make myself clear. I am NOT going to begin clipping
> non-BFC parts. It is of course not possible. But I WOULD like to clip
> BFC parts, even if the superfiles are not certified, i.e. let old
> model files (=non-BFC files) benefit from BFC-parts.
> See also last 5 paragraphs of http://www.lugnet.com/cad/dev/?n=3084
> and http://www.lugnet.com/cad/dev/?n=3102
Ahhh. "Model-files don't invert part-files". That's the key. I'll add that
paragraph back to the V4 document (which is now on V7, I think). But I'll
rewrite the paragraph to make it clear that the assumption is that model files
would not invert part files, not that "part files are right-side out" (I know,
they're really the same thing, but the wording is crucial IMO). And the part
files *must* be certified to be clipped.
OK, I've inserted the following text into the V4 document:
7 Assumed inversions. Generally, it is not possible to assume that a subfile
7 is inverted or normal (which is the reason for the 0 BFC INVERTNEXT meta-
7 statement). One important special case is this: model files do not invert
7 part files. Parts are complex files which would be essentially useless if
7 they were inverted. Assuming that all part files used in a rendering allows
7 the rendering engine to apply BFC-processing on these parts (assuming the
7 parts are certified).
7
7 No assumptions can be made about models which make direct use of primitives
7 or polygon commands, so a rendering engine should not simply treat uncertified
7 model files as certified.
> "All DAT files are equal, but some are more equal than others" :-)
:-)
> > > > 4 RenderFile Command.Subfile,
> > > > 4 (AccumClip and LocalClip and Certified),
> > > > 4 (AccumInvert xor InvertNext)
> > > TransformMatrix * Command.TransformMatrix
> > >
> > > TransformMatrix could be renamed to AccumTransformMatrix like the other
> > > parameters to RenderFile.
>
> You added AccumTransformMatrix as a parameter to RenderFile but forgot the
> AccumTransformMatrix * Command.TransformMatrix in the two calls to RenderFile.
Hmm, good point.
> Actually the color should also be a parameter to RenderFile. A transparent
> file cannot be clipped. If you add
> Color integer // current color
>
> as a parameter, then you can add this before "OpenFile(ModelFile)":
> If 32 <= Color And Color <= 47 Then AccumClip = FALSE
>
> and this after "Get Next Command":
> If Command.Color = 16 Then
> Command.Color = Color
> Else
> If Command.Color = 24 Then
> Command.Color = EdgeColor(CurColor)
>
> and add Command.Color in the two calls to RenderFile.
> Feel free to rename/recode, I hope you get the idea.
Got it. The last bit is straying away from strict BFC-relevance (the colors 16
and 24), but I guess I can throw it in...
> I wouldn't worry too much about programmers though, it's pretty easy and
> you have alreay provided pseudo-code.
Attempting to be as clear as possible, I added this paragraph before the
pseudo-code:
7 The function BFC() returns a boolean value, indicating whether a polygon
7 should be rendered or culled. As the nature of this routine does not
7 impact the BFC standard, the logic for BFC() is not included in the following
7 pseudo-code. There is information about BFC processing available from many
7 locations, including <http://www.lugnet.com/cad/dev/>.
Steve
|
|
Message has 1 Reply: | | Re: Line in the Sand
|
| Steve Bliss wrote in message ... (...) Remember BFC must be disabled for transparent parts. That's what If 32 <= Color And Color <= 47 Then AccumClip = FALSE takes care of. Frankly I can't think of any situations where double-sided sections are (...) (25 years ago, 10-Dec-99, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: Line in the Sand
|
| Steve Bliss wrote... (...) OK. The pseudo-code reflects this now. (...) I meant "The fact that 0 BFC CERTIFY implies 0 BFC CLIP and 0 BFC CCW should be stated explicitly in the CERTIFY section in Language Extensions". The code was clear enough. (...) (25 years ago, 6-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
|
|
|
|