Subject:
|
Re: BFC and Primitives
|
Newsgroups:
|
lugnet.cad.dev.org.ldraw
|
Date:
|
Fri, 8 Mar 2002 01:47:52 GMT
|
Viewed:
|
506 times
|
| |
| |
In lugnet.cad.dev.org.ldraw, Kyle McDonald writes:
> Also, I believe, that no matter whether you use Back Face Culling or
> not, Having the vertices wound correctly in the DAT files is still
> a good thing. In the absence of a standard winding, then Documenting
> in each part the way the polygons are wound is the next best thing.
>
> I'd have to imagine that even with this new BSP traversal method,
> you still really need to know how the vertices are wound if you are
> to compute the vertex normals corectly. And you need the vertex normals
> if you are going to do lighting and other effects. Right?
You have to calculate a vertex normal in order to do lighting. However, it
doesn't have to be the correct normal if your rendering engine supports
2-sided lighting (like OpenGL does). In this case, calculating a normal
that points backwards works just as well. However, using 2-sided lighting
is noticably slower than standard lighting, so having correct BFC
information can significantly enhance performance.
The way 2-sided lighting works is if the angle between the surface normal
and the eye is more than 90 degrees, it flips the normal 180 degrees and
then proceeds with the lighting calculation.
In LDView, I just introduced a new lighting mode where it uses 2 directional
lights pointed in opposite directions. As long as specular (shininess)
isn't used, this produces the same result as 2-sided lighting, but is faster
(at least on my GeForce 3). So since 2-sided lighting seems to be slower
than 2 lights, having BFC information should speed things up noticably, as
it would allow 1-sided lighting with 1 light (and still support specular even).
Also, while LDView doesn't support the BFC extension to LDraw models, I do
plan to add support for it. I just haven't gotten to that feature yet. I
expect it to have a noticable impact on performance.
--Travis Cobbs (tcobbs@REMOVE.halibut.com)
|
|
Message is in Reply To:
| | Re: BFC and Primitives
|
| Also, I believe, that no matter whether you use Back Face Culling or not, Having the vertices wound correctly in the DAT files is still a good thing. In the absence of a standard winding, then Documenting in each part the way the polygons are wound (...) (23 years ago, 8-Mar-02, to lugnet.cad.dev.org.ldraw)
|
26 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|