On Tuesday 19 September 2006 14:10, Jeff Koppe wrote:
> Hi All,
>
> I've been making/texturing a aircraft model in Wings3d,
> exporting to .obj and using Blender to convert to .ac. But
> since either the Blender .obj import or .ac export is not
> perfect, this workflow requires some tweaking of the final .ac
> file. So I figured I'd cut out the middleman and write a Ruby
> script to convert .obj to .ac.
>
> Now the question: neither .obj nor .ac formats specify three
> or four sided polygons. Does FlightGear? Blender does
> (imperfectly) triangulate/quadrangulate the model but I'm not
> sure why--I imagine it's a holdover from .3ds format. If
> FlightGear does not _require_ triangulation, then is it more
> efficient?
>
> Thanks,
>
> --jeff

Heh:)  I cobbled together a rough C prog to convert .obj geometry 
in to .ac format but I didn't look into the texturing aspects 
because all I wanted was the geometry.  It became redundant when 
I got the .obj importer for ac3d.

Afaik both .obj and .ac formats support n-sided polys whereas I 
believe that the .3ds format only uses triangles.  Everything 
I've ever exported in .3ds format has been converted to tris.

I don't know if using polys with > 3 sides is more efficient but 
the most important consideration is that a triangle will always 
be perfectly flat whereas polys with > 3 sides may not be 
because all the points don't have to be in the same plane.

The renderer that FG uses actually converts all polys into tris 
and this means that a curved poly, where the points are not all 
in the same plane, can be interpreted, or split into two tris, 
in two different ways, producing entirely different surface 
shapes.

Imagine a four-sided poly with it's vertices at:

(hope this looks ok)

(A)0,0,0        (D)1,0,0


(B)0,1,0        (C)1,1,1


If this poly was split into two tris by adding an edge between B 
and D the path between them would be straight but the path 
between A and C would be curved.  However, if you put the edge 
between A and C instead then the path between B and D would be 
curved instead, changing the shape of the poly completely.

Afaik the renderer decides on how to split n-sided polys into 
tris is based on the vertex order and this can sometimes 
produces rendering glitches where it curves a poly in the wrong 
direction (or at least not the direction intended by the 
modeller).

Ways around this are to either re-order the vertices or manually 
split the poly into tris.

LeeE


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to