Subject:
|
Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Tue, 21 Aug 2007 16:29:40 GMT
|
Viewed:
|
3813 times
|
| |
| |
In lugnet.cad, Roland Melkert wrote:
> Rob Ross wrote:
> > But, one thing I have learned so far is that the rule about non-concave quads is
> > actually a limitation of OpenGL. It doesn't support them.
>
> Actually I find it quite logically it's not supported. And I don't think
> it's a specific OpenGL thing.
>
> Once the vertices's are not concave, you basically stop having a Quad
> all to getter. It becomes a polygon, and how is the hardware supposed to
> know how to divide it in triangles (Far I know all hardware processes
> only triangles).
I'm not sure yet what we on the LSC will decide with respect to concave quads.
It may be that we'll change that paragraph to a recommendation. I personally
don't like them, but I can see Orion's point. I may write a utility program to
automatically fix all existing official files, but that would only fly if the
output from the program didn't have to be re-certified.
Having said all that, they are still quads, and it is possible for software to
detect concave quads and accurately divide them into two triangles 100% of the
time, as long as the quad isn't a "bow-tie" quad, which is now explicitly
forbidden in the spec. A geometric examination of the angles in the quad allows
you to determine the proper split, which LDView, and many (all?) other popular
LDraw renderers already do.
> Just look at a test openGL project, you will see it will draw 2
> triangles but they will overlap because it guesses wrong.
OpenGL is designed for high performance, and explicitly states either that they
are forbidden, or the behavior is undefined (probably the latter). OpenGL has
the same restrictions on polygons though. If you want your OpenGL program to
support concave polygons, you have to tesselate them into triangles yourself.
--Travis
|
|
Message has 2 Replies:
Message is in Reply To:
55 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
|
|
|
|