• Advertisement
Sign in to follow this  

Sprite Atlas Tool

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

Hello,

we started our blog at sbcgamesdev.blogspot.com

First two articles describe free tool (SBC PicOpt) for creating sprite atlases we use in our games. It can not only create optimized atlas but it allows you also manage your custom properties for sprites (like collision boxes, etc.)

It features also possibility to force POT export, include empty spaces between sprites or repeat top, bottom, left and right rim of the sprite which is very usefull to prevent artifacts in 2D openGL games. Also creating simple animations is possible.

With tool you can easily create sheets like this with minimum effort:
SBCPicOpt_Tool_result2.png

There is also description of format of output export files.

Tomas

Share this post


Link to post
Share on other sites
Advertisement
Looks cool!

What is the bin packing algorithm you use? Just curious since I did research on that topic a few years back (results available on my website).

Share this post


Link to post
Share on other sites

What is the bin packing algorithm you use? Just curious since I did research on that topic a few years back (results available on my website).


I read lot of articles but following 2 helped me a lot. Especially the first one which gives good idea but the implementtion is up to you:

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.140.200 (click the pdf icon)
http://www.blackpawn.com/texts/lightmaps/

The resulting algorithm seems to be similar to what you have on your page - after placing any rectangle I am also tracking all possible new rectangles and for next sprite I am choosing the smallest one from these. I am starting with one big bin - tower of sprites with width of the widthest and changing (see the rules in linked file) step by step to one long row with hight of the highest sprite. There are also always severeal tries in each "bin" incorporating some chance in sorting the rects but generally the biggiest are placed as first.

Share this post


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

  • Advertisement