Gordon, Brede -- Looking for your input on this (but others with FLT expertise are welcome to chime in as well...) Let me explain what the current exporter is doing wrong, and how I believe I will fix it, and you guys can help me out by looking for flaws or suggesting alternatives. Imagine drawing a highly approximated plane in OSG. You would have a single Geometry with a single VertexArray containing all vertices, and then several QUAD_STRIP PrimitiveSets. The result would be a plane approximated by several quads. The exporter currently handles this very inefficiently. For each PrimitiveSet in the above example, it outputs a Mesh record, followed by a Local Vertex Pool containing _all_ vertices in the VertexArray, followed by a Mesh Primitive record for the single QUAD_STRIP. (This was early "turn on" code written to get some basic functionality in place, which I forgot about. It was never intended for public consumption.) A better implementation would be: Output a Mesh and Local Vertex Pool for the Geometry object, then a Mesh Primitive for each PrimitiveSet. However, this gets complicated if I want to use Face records if the PrimitiveSet mode is TRIANGLES or QUADS. The code would potentially need to iterate over the list of PrimitiveSets twice, once processing Mesh record data, and then once again processing Face record data. Alternatively, I could simply not support outputting Face records. A QUAD becomes a 4-vertex Mesh Primitive of type QuadStrip, and the same concept for a TRIANGLE. Does this sound feasible? Face records would still be used for Billboards (not yet implemented) and the Vertex Palette at the top of the file would really only be needed to store Light Point vertices. The downside of this is that if you have multiple Geometry objects that share the same VertexArray in OSG, you'd get that VertexArray reproduced multiple times as Local Vertex Pool records in the FLT file; not able to share that data in the Vertex Palette as you would do when using Face records. Looking forward to your thoughts and input, thanks. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

