Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sprite Atlas Tool


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Tom Atom   Members   -  Reputation: 278

Like
1Likes
Like

Posted 12 October 2012 - 02:12 AM

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:
Posted Image

There is also description of format of output export files.

Tomas

Sponsor:

#2 clb   Members   -  Reputation: 1788

Like
0Likes
Like

Posted 12 October 2012 - 02:17 AM

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).
Me+PC=clb.demon.fi | C++ Math and Geometry library: MathGeoLib, test it live! | C++ Game Networking: kNet | 2D Bin Packing: RectangleBinPack | Use gcc/clang/emcc from VS: vs-tool | Resume+Portfolio | gfxapi, test it live!

#3 Tom Atom   Members   -  Reputation: 278

Like
0Likes
Like

Posted 12 October 2012 - 03:44 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS