I'm currently working on a system to export/import basic mesh data from Maya 2011 for a real-time video game animation system.
I am creating a basic plugin, just for access to Maya's data. The rest of the file I/O I am doing myself (not using a file translator).
Basically, I have all the information I need. I know how to get the verts, normals, and UVs from the mesh, but therein lies the problem: how do I sync the list of normals and UVs to that of the verts?
I am able to (somewhat) do this by iterating through every polygon and each of those polygon's verts, and just export the position, normal, and UV for each - effectively converting an indexed mesh to a vertex list mesh. The problem with this is that I go from 1600-something verts up to over 9000 verts.
My thought, is that there MUST be some way to loop through the dumped UV coordinates from MFnMesh::getUVs() and find their respective normals and positions. When I look at the number of UVs it dumps it is only in the range of 2000-ish, which would make it much more manageable for real-time smooth skinning.
I could be doing this completely wrong, but I welcome any help to get on the right track.
Thanks a bunch,