To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 14705
14704  |  14706
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:
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) Keep in mind, the original LDraw tool treats concave quads as triangles, effectively ignoring the contained vertex. So, by the 0.27 "spec", concave quads are inappropriate. Which can be translated as they are disallowed, but the renderer copes (...) (17 years ago, 21-Aug-07, to lugnet.cad)
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) Page 16 of the OpenGL spec, v2.1 states: "Only convex polygons are guaranteed to be drawn correctly by the GL." Rob (17 years ago, 21-Aug-07, to lugnet.cad)

Message is in Reply To:
  Re: LDraw File Format Spec 1.0 DRAFT - Call for Public Comments
 
(...) 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 (...) (17 years ago, 21-Aug-07, to lugnet.cad)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR