Jump to content
  • Advertisement
Sign in to follow this  
robydx

algorithm to flat mapping

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

I'm Italian, so I don't know the english name of some algoritms and so I've problem to find them on web. Do you know 3DS Max? There is a command called Flatten mapping in the texture coordinate editor in unwrap uvw. That command set the texture coordinate in way that every pixel of the texture corrispond to only one point of the 3D model (to use for example for lightmap or normal map generation). I need to replicate that algorithm and I need to search for some material. What's the name of that algorithm? Any one can suggest me a good algorithm Thank you

Share this post


Link to post
Share on other sites
Advertisement
I have seen the term "face walking" associated with the algorithm.

The algorithm in question takes one initial face, and recursively follows the adjacent faces until ít crosses with an already-walked face. Once all recursion steps end in this way, an "island" of faces is complete. If there are unwalked faces left in the mesh, the algorithm then picks an another initial face and begins an another "island"; this repeats until each face of the mesh have been added to some of the islands.

Then, it is customary to weigh the areas of the island faces in order to normalize the number of texels per face area. This can be done by treating each island as a spring system with edges as springs - their resting lengths corresponding to their original lengths - and then iterating until the islands achieve an equilibrium to some quality treshold.

Finally, the technique usually optimizes the available texture space by rotating and translating the islands so that the texture space is filled optimally by the islands. This part, I have very little personal experience with; however, the general algorithm for this optimization is called "space filling".

Note that the D3DX library provides a very robust implementation of texture space flattening. If you don't actually have to implement this yourself, take a look at "UVAtlas" in the SDK.

HTH,

Share this post


Link to post
Share on other sites
I can't use uvatlas, I'm using Direct3D10 and Collada.
Hovever thank's for your explanation, probably I've understood what to do.

Thank you

Share this post


Link to post
Share on other sites
Quote:
Original post by Drilian
No thread about UV Atlasing would be complete without a link to Hughes Hoppe's home page. He has done a TON of work on this sort of problem. Check it out :)


Agreed, he is the guru on this type of stuff :)

If I remember correctly, the D3DX UVAtlas system is based on his work.

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!