Subject:
|
Re: Line in the Sand
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Fri, 10 Dec 1999 09:50:19 GMT
|
Viewed:
|
2668 times
|
| |
| |
Steve Bliss wrote in message ...
> 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.
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
*really* necessary, since all parts have a volume, because they are molded
in plastic.
However, two places where double-sided sections could be useful:
1) John Van mentioned a "stair-step-like part, where a single quad could
be used as the top of one step and the bottom of the next step up".
IMO this is bad modeling, as the part would look strange in transparent
and it may not necessarily speed up rendering having a large quad
rather than two small quads.
2) Stickers and flags. As a shortcut they *could* be modeled as thin objects.
> 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.
What do you mean with the comment?
That dither-transparency can use BFC? Well, in that case we do need
double-sided sections for decorations!
> > 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.
Yeah, that was the expression I was looking for ;-)
In Danish we have a noun (vrang) meaning "wrong side" or "reverse side".
I can't seem to find a similar English noun.
It is important to state that "inversion" in this discussion means
"turning inside out" or "turning the wrong side out" and not mirroring.
> 7 they were inverted. Assuming that all part files used in a rendering allows
Don't you need a comma?
8 they were inverted. Assuming that, all part files used in a rendering allows
> > > > > 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.
Yes, I really think you should consider updating the document :-)
> > 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...
You're right that the last bit is not BFC relevant, you may remove it again.
It also contains a typo (CurColor) :-)
> > If 32 <= Color And Color <= 47 Then AccumClip = FALSE
Actually LDLite and MLCad uses 63 in stead of 47.
/Lars
|
|
Message has 1 Reply: | | Re: Line in the Sand
|
| (...) Hmm. that makes me wonder if the logic of turning of BFC clipping when a part's color is transparent will really work. Because a part may have the main color as 16, and some sections are hard-coded to a transparent color. In this case, the (...) (25 years ago, 10-Dec-99, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: Line in the Sand
|
| (...) 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 (...) (25 years ago, 8-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
|
|
|
|