Sign in to follow this  
morteoh

Maya exporter, binormals and tangents

Recommended Posts

Hi, I'm creating a simple maya exporter, and i have vertices/indices/normals/uvs and all that already. Q1) is it possible to extract binormals/tangents from maya like you can in 3ds max? I'm using MitPolygonMesh to extract all my info now, and it doesn't seem to do what i want. Q2) is it possible to have maya export only triangledata? or do i have to do the actual triangulation myself? (quads -> triangles isn't a big problem, but still). MitPolygonMesh seems to have functions for getting triangles, but i just can't seem to figure them out. Any help would be greatly appreciated! Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by morteoh
Q1) is it possible to extract binormals/tangents from maya like you can in 3ds max? I'm using MitPolygonMesh to extract all my info now, and it doesn't seem to do what i want.


No. You'll have to calculate them. That should be fairly straightforward though.

Quote:
Q2) is it possible to have maya export only triangledata? or do i have to do the actual triangulation myself? (quads -> triangles isn't a big problem, but still). MitPolygonMesh seems to have functions for getting triangles, but i just can't seem to figure them out.


yeah, i just ignore that and use MDagModifier, ie

// triangulate all meshes
MDagModifier mod;
mod.commandToExecute("select -r `ls -type mesh`; Triangulate");
mod.doIt();

// do export

// undo traingulation
mod.undoIt();

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
In Maya 6.5 there is a getTangents in the mesh class. This has been introduced since that version.

How do you extract the data from Max though? Max support told me they don't store the tangents.

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