Sign in to follow this  
Iggy4Shiggy

Exporting To Triangle Strips

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this