Jump to content
  • Advertisement
Sign in to follow this  
morteoh

Maya exporter, binormals and tangents

This topic is 4821 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

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

Not sure with the standard Max API, but if you're using IGame, you can just use IGameMesh::GetTangent()

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!