Question on faces


Question on faces
#1
Hi, i have a question: are faces considered double sided in parts that are not "BFC certified"?
For example i'm rendering part 6595 and it renders wrong, it's not certified as far as i can see.
Reply
Re: Question on faces
#2
triangles and quads which are not BFC-enabled (e.g. in non-certified files, or in a section of a file enclosed in
0 BFC NOCLIP
...
0 BFC CLIP
must be treated non-oriented, i.e., it cannot be derived an "inside" and "outside" facing surface of them.
They must be rendered from whatever side you look at them.
In OpenGL as far as I remember, there's a global rendering option by which you can turn on and off the logic
if to render such a surface or not. I don't think that you can turn and off it for individual quads or triangles, though.

Thus, the only solution that comes to my mind is: if you encounter such data, you will probably be forced to turn off
the CW/CCW optimization logic of your OpenGL renderer for the _whole_ scene...
Reply
Re: Question on faces
#3
Quote:Thus, the only solution that comes to my mind is: if you encounter such data, you will probably be forced to turn off
the CW/CCW optimization logic of your OpenGL renderer for the _whole_ scene...
Or use two overlapping but opposite winding elements? BCFed parts are more and more frequent nowadays...
Reply
Re: Question on faces
#4
yes, that's of course a MUCH better solution
Reply
Re: Question on faces
#5
In OpenGL, there are two settings to get the "back" side of faces to render. Two-sided lighting must be enabled if using OpenGL's lighting, and GL_CULL_FACE must be disabled. LDView does this for non-BFC geometry. However, Philo's suggestion of drawing the triangle twice with opposite windings is probably a better solution, and if I were doing things over again, that's probably what I would do.
Reply
Re: Question on faces
#6
yes, thanks, i'll go with this solution
Reply
Re: Question on faces
#7
Another thing, i've found that some parts in standard library (ie 6595a.dat) have quads in an "hourglass" configuration, not ccw or cw. As stated here it's a bad configuration. Have i stumbled on a broken part or should i implement some kind of quad correction software? IIRC LDView render it correctly.
Reply
Re: Question on faces
#8
You may indeed encounter such quads ("bow-tie" in LDraw jargon) in old, non-BFCed files. You must indeed provide some correction if you want to display them correctly Sad
Reply
Re: Question on faces
#9
Ok... I'm almost afraid to ask but: what if one wants to correct the part? after all is just switching a couple of vertices.
What's the iter to correct a part ?
Reply
Re: Question on faces
#10
Hi Nicola , I love your web rendering tool.

I made a quick review of that part, 6595.dat, and indeed, it badly needs some corrections.
All files, main and sub-files, are missing a bfc-statement.
All quads, in all four sub-files, are bowtie-quads.
All sub-files are missing many of the needed cond-lines.

Correcting bfc is easy with DatHeader, and the missing cond-lines could be made with Edger2.
It should also be renamed to follow the new nomenclature for wheel rims.

If you wanna have a go at it, correct all files and send them to Admin
but I think that you first have to register as an author.

If not, let me know, and I'll do it.
Reply
Re: Question on faces
#11
Thanks, i think i'll pass on correcting the part. Also i don't really need it, it was just a test case for the renderer. So don't feel obliged to correct it Smile
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)