Five Animation Banks
So you have completed your animations, you have one or more sprite banks and loads of animations frames. How do you get them out to use in your games or demos?
Idle-standing Animation Frames
Imagery has a number of export options you can use:
Frame... - exports just the frame you are on
Sprite Sheet... - exports a bank or all banks to a sprite sheet with a number of options on how it is laid out
FIle Set... - exports a bank or all banks to individual files
Animation... - export the current bank to a number of different animated picture formats such as GIF
PICO-8 Cartridge... - export the current bank and add it into a PICO-8 cartridge
You can also print sprite sheets, which you can access separately from the File menu.
We are going to cover Sprite Sheets and File Sets in this quick guide.
Go to File -> Export -> Sprite Sheet... to begin the process.
The sprite sheet provides a preview of how your selections will affect the export.
First choose if you will export just one sprite bank or all sprite banks.
When exporting all sprite banks you also have the choice to place them all one one sheet, and if each bank will start on a new row, or if each bank will go into its own file.
Observe Loop -1 if ticked will not export the last frame if your loop playback setting for the bank is set to Loop-1. This is useful for puppet banks where the first and last frame are often identical.
There are three layout options:
Packed - all sprites are packed together, one after the other
Framed - each sprite adds a framed border around it
Atlas - each sprite is packed in on the sheet leaving no or few gaps
For Packed and Framed layouts, you can choose how many frame cells across you want and the frame size option for packed if to round up to the nearest 8 ot 16 pixel boundary.
For Atlas layouts you can choose to introduce a pixel border between frames, if to turn sprites 90 degrees to fit the space better and if the sprite sheet should be sized to a power of two.
You can choose the colour to use for the outside parts of the spritesheet, the sprite frame background and if you have a border its colour.
A sprite sheet can be forced to use indexed colour mode if your chosen image file format supports it.
Scale allows you to export at different sizes and if so, how pixels are resampled
Finally the sidecar creates an optional JSON or CSV file with additional information about the sprite frames.
The sidecar provides essential information about each sprite frame on your exported sheet such as the bank it came from, its position and size, duration and flag attributes. This is particularly useful for atlas exported sheets where frames are placed and rotated to where they best fit and will not necessarily be sequential.
When you have configured your export options, press the Export... button and you will be asked where to save, the filename and importantly you can change the file type. Generally PNG is the default file type but you can change to many popular formats.
If you chose to export a sidecar you will have a file of type JSON or CSV with the same name alongside your exported sprite sheet picture.
Note: sprite sheet export settings are remembered. After export, save your SPR file again to include your export options should you wish to re-use the same options again.
A file set works a little differently to sprite sheets, and as such there are fewer options. Instead of packing sprite frames on to one sheet, file sets creates a separately named file using the Bank names and frame index number for each animation frame.
Choose if exporting the current bank or all sprite banks.
When exporting all sprite banks you can choose to collect all the files together in one folder, or to create a separate folder for each bank.
Observe Loop-1 will exclude the last frame for banks that have that option, same as for sprite sheets.
For file sets you much choose the type of files to create, the default is PNG.
You can choose a colour for your sprites, or leave as transparent.
Sprite frames can be scaled up on export and like sprite sheets you can choose the resample method used.
You can choose to include a JSON or CSV sidecar file containing extra information about the frames in the banks.
And finally, if the file format allows, you can choose to export in an indexed colour mode.
When you have configured your export options, press the Export... button and you will be asked what folder to save your files to. No filename is required here, the name of the banks and frame number will be used automatically.