Sprite Render Script v0.6

by Matt Spencer
If you find bugs, have comments or requests, email me.

Features

Instructions

You must render from a camera, so put at least one camera in the scene. You can use as many cameras as you'd like, and pick a different one for each sequence you render. Change the settings, and then hit "Render Sequence" for each individual animation sequence. The Sprite Sheet Viewer will automatically pop up and show you the results. When you're finished rendering the sheet, hit "Save Image and Data" to export the image and the XML data.

From the viewer, you can (continuously) delete the last sequence in the sheet, or all of them. You can press "View Sprite Sheet" anytime to see the sheet. To avoid re-entering the settings every time the sheet is rendered, save them using "Save Render List". Use "Render from File" to render the sheet again later.

    Step by Step:
  1. Set the Sprite Sheet's width and height. This is the size of the exported image.
  2. If your sprite's frames need a small space between each packed frame, set the border 'padding' to something other than zero. Padding is measured in pixels. To tightly-pack rectangle sprites (for example, 64 x 64 frames in a 128 x 128 sheet), set the "padding" to 0. Also, make sure the rendered image touches the edges of the camera's frame, or it will be cropped.
  3. Now set the sequence's settings. All of these settings are included in the render list when its saved. First is the width and height of the frame. This is the size of the camera's initial render, the actual frame size will be smaller if it is cropped. (see tip #1)
  4. The sequence's name is optional and there for convenience. It's value is exported in the XML data.
  5. "Start" and "End" are the beginning and end of the sequence, in frames
  6. "Nth Frame" is the frame interval. At setting of 1 means every frame is rendered. A setting of 2 means the framerate is cut in half, etc. This is useful for lowering the effective framerate per-sequence. Sprite sheets can fill up quickly, and a high framerate isn't practical for larger sprites.
  7. You can optionally assign an "origin object". This object's position is converted into frame coordinates for each frame. If no object is selected, the camera's center is used (by default).
  8. A camera must be selected, or no rendering will happen.
  9. If you need to export custom data points with your animation, press "Create Point" to create any number of Sprite Points in the scene. Like the origin object, these points are converted to frame coordinates and stored with the animation data. When you select one of these points a rollout will appear at the bottom of the window, showing the editable properties of the point. These editable properties are exported with the point data, and allow custom values to be added to the exported XML file. If you know MaxScript, more properties can be added by modifying the custom attribute definition in "Custom.ms". (see tip #2)
  10. Now, press "Render Sequence" to render and bring up the sprite sheet.
(put an explanation of rendering layered, complex sprites with Sprite Points here)

Other Details

Planned Improvements (v0.7)