Jump to content
  • Advertisement
Sign in to follow this  
mauro78

[DX9] Texture Coords from 3DSMAX

This topic is 3100 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 All! After working with .x file format for a while, I've decided to write a plugin to export assets from MAX 9. Everything it's ok I've only one problem with vertex/face UV. I Know that MAX let me export UV face map, and I correctly extracted those data from MAX. But the problem is: Directx need UV per vertex; texture map UV are assigned per face, so a vertex can have more than one texture map vertex assigned based on the face in wich is referenced. A simple solution is to not use INDEXED_PRIMITIVE and send to the GPU a list of faces (or triangles); in that way I can easily assign to every mesh vertex the correct texture vertex. But I'm wondering; what is the best approach on the problem? Thanks in adavance EDIT: Solved with the simple solution: now I'm searching on a good algorithm to optimize the mesh. If someone has good pointers on this would be appreciated Regards [Edited by - mauro78 on December 25, 2009 2:35:22 AM]

Share this post


Link to post
Share on other sites
Advertisement
You'll need to compare all vertices with all other vertices and remove the duplicates (insert fav. optimisation here). Your simple solution kills the vertex caches. I usually end up making a hash of the vertex and only compare those with the same hash.
The final set of vertices is constant, so no algorithm is "better" than any other at this in terms of the output.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!