If I have a series of PNGs that I'd like to use as a single animated texture, would I be able to use them as they are, or would I first need to convert them to a different format, like a single TGA?
1 Answer
\$\begingroup\$
\$\endgroup\$
3
There are programs helping you in this task. I personally use Zwoptex. Basically you load all your pngs, it arranges them (translating and rotating each sprite) into a bigger image (you decide the size) called texture atlas. You can then export the atlas with a xml file containing the coordinates of each single sprite in the atlas.
-
\$\begingroup\$ I'd just like to add: check out sprite sheet packer, which is an open source alternative. But yeah using a texture atlas is definitely the way to go, its much more efficient than using separate files for each frame. (bit more info in my answer here: gamedev.stackexchange.com/questions/27200/…) \$\endgroup\$– AraloxApr 12, 2012 at 8:48
-
\$\begingroup\$ ImageMagick is a command line utility that is capable of combining images in this manner. \$\endgroup\$– notleshApr 12, 2012 at 18:25
-
\$\begingroup\$ TexturePacker is my favorite, but regardless note that Zwoptex and TexturePacker are Mac software, Sprite Sheet Packer is Windows, and ImageMagick is platform agnostic. \$\endgroup\$– jhockingApr 12, 2012 at 18:50