New options for creating a Texture Atlas
Daniel Sperl on October 30, 2010Thankfully, with Sparrow becoming more widely recognized, third party tools begin to pop up! This time, I want to point you to 2 great pieces of software that can help you create your texture atlases.
As you know, Sparrow has its own texture atlas generator. You find it in the directory “sparrow/util/atlas_generator”, with the README file describing how it is used. Have a look at this and this blog article for more information about it.
However, sometimes you need more power over how your atlas is created! Both of the tools I show you here have some unique advantages.
Texture atlas maker
Our friend Malcolm from Pixelrevision created this great (free!) tool especially for Sparrow. It allows you to convert Flash movies created in Adobe Flash CS for Sparrow.
Find it here: Pixelrevision Texture Atlas Maker
To use it, create a new project in Adobe Flash CS. Drag all the movieclips you want rendered onto the main stage and name them. Then, upload the resulting swf-file to the atlas maker (it runs directly in your browser!). It will create a zip-file containing your image and a piece of xml that can be loaded directly by Sparrow.
Here’s a picture of the sample movie. As you can see, the Mario character is part of a movie clip that was placed on the stage (left image). It’s important to give the movie instance a name (right image) - that name will then be used to reference the frames in the texture atlas.
The output looks like this - a neatly organized texture atlas with all frames of the movie clips rendered separately:
If you add the atlas to your Sparrow project, you can now create the movie clip with this code:
Texture Packer
The second tool I want to show you is Texture Packer.
Texture packer is a full featured sprite sheet generator, coming in a normal and a pro edition. While the normal edition is used exclusively via the command line, the brand new pro edition adds a very powerful and easy to use graphical user interface.
If you need more options than the Sparrow atlas generator provides, or if you prefer having a polished graphical user interface, I recommend you give it a try! (BTW, Sparrow is not in any way affiliated with the creators of the texture packer - we just think it deserves being promoted here!)