• Advertisement
Sign in to follow this  

Exporting To Triangle Strips

This topic is 4919 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently working on coding a Maya 5.0 export plug-in. I'm trying to get the plug-in to export to OpenGL code, and Triangle strips are the most efficient. The problem is creating an algorithm to export triangle strips, without overlapping vertices etc. I don't know how many of you are familar with Maya API, but it does come with some class members that are helpful in detecting connected faces. Here is a page with Maya classes that should help: http://caad.arch.ethz.ch/info/maya/manual/DevKit/PlugInsAPI/classDoc/MItMeshPolygon.html#DOC.155.64.30 Most useful here are the getConnectedFaces, getConnectedEdges, and getConnectedVertices. I'm just not sure on the approach I should take to export correctly, I would like to turn as much of the mesh into triangle strips, and anything that cannot be, just make it a triangle. I'd also like to find the longest chain of triangles to make the triangle strip, if possible. There is a method to the madness on how it exports, as you can see here: http://www.angelfire.com/space2/artib/triEx.jpg That image is a flat plane made up of many triangles; the starting triangle is the darkest, and the next gets lighter. I've searched the net for a triangle strip algorithm but to no avail. Any help is appreciated! Thanks!

Share this post


Link to post
Share on other sites
Advertisement
here is a nice simple method:

http://www.delphi3d.net/articles/viewarticle.php?article=tristrips.htm

There is the ever popular nvidia tristrip library:

http://developer.nvidia.com/object/nvtristrip_library.html


I'm not sure if that is what you are looking for.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement