Texture Atlases – Part 2 – Making Them
Making texture atlas is either the responsibility of the artist or the developers. In my last project it was the developers
So I created a tool that produced square pngs files with widths and heights a power of two (128×128, 256×256, 512×512, 1024×1024). These texture atlases contained as many smaller images as possible.
I then stored information about the texture atlas filename and the top, left, width and height of original image in texture atlas.
There are alot of “rect packing” algorithms out there, but my favorite was Nate’s blog. He has a great example that is simple and elegant. I was able to easily customize it for my scenario.
