Jump to content
  • Advertisement
Sign in to follow this  
irreversible

Efficiently fitting 2D shapes into a rectangle

This topic is 2602 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 doing texture baking, which of itself is a rather straightforward process. However, I'm having some trouble coming up with an efficient way of fitting the face maps into the (presumably rectangular) output texture. A brute force solution would probably yield relatively good results, but I'm wondering if there's a smarter and faster way. Are there any algorithms out there that do this kind of thing specifically?

There are other things that factor in as well - for instance, it would probably be okay to scale individual face maps by 10-20% if they don't fit, but rotating them probably won't work. 3DS seems to just scale everything down and in general be rather inefficient with its fitting. I'd like to try and go a step beyond that. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Are there any algorithms out there that do this kind of thing specifically?
Assuming I've understood what you're looking for -- tonnes.

I've got no links bookmarked, but a search for "texture atlas packing" should turn up some material.

Share this post


Link to post
Share on other sites
Thanks - got all the infos I can use now! It can be hard to find information on stuff if one doesn't know the precise search terms :)

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!