• Editor
  • Exporting a sprite sheet in a predictable grid

I have a character that it and all the animation frames fit in a 512x512 box. I would like to export all the frames to a single sprite sheet that is a multiple of 512 wide and 512 high. In each of the grid spaces of the sprite sheet, I would like to have the frame centered vertically. None of the animations change the horizontal position though some slightly change the vertical position.

I do not plan on using any exported atlas file or do any spline integration in my game engine. So essentially all I want is to export a traditional sprite sheet. Is this at all possible and if so, how?

Related Discussions
...

To export your animations into a sprite sheet where each frame fits within a 512x512 box and is centered vertically, you can follow these steps, combining advice from various forum discussions:

  1. Use a Transparent Image: Place a large transparent image in your Spine project that covers the maximum area your character and its animations would occupy. This ensures that all exported frames will have the same dimensions, fitting within your 512x512 requirement. Make sure this image is larger than any of your animations in all directions but does not need to move or be part of the animations.

  2. Export Settings: When exporting, choose the PNG sequence option to get individual frames. You mentioned that you do not plan to use any exported atlas file, which implies you'll be assembling the sprite sheet yourself or using a third-party tool to do so.

  3. Assemble the Sprite Sheet: Since you're looking for a very specific layout (multiple of 512 wide and 512 high, with frames centered vertically), you might need to use a third-party texture packer or sprite sheet assembler that allows for custom grid sizes and alignment options. Ensure the tool you choose lets you specify the grid size (512x512) and allows for vertical centering of each frame within its grid cell.

  4. Manual Adjustments: Given your specific requirements (especially the vertical centering without changing horizontal positions), you may need to make some manual adjustments to ensure each frame is positioned correctly within its grid space.

Unfortunately, Spine's built-in export options focus more on efficient packing for runtime use rather than creating traditional sprite sheets with fixed grid sizes and custom alignment. Therefore, while Spine can export the individual frames you need, assembling them into the specific sprite sheet format you want will likely require additional steps outside of Spine.

Ok, I figured it out after realizing there were "Strip whitespace X" and "Stript whitespace Y" checkboxes to uncheck in the Texture Packer Settings. So with those unchecked and the min width/height and max width/height set to the multiples of 512 I want and the viewport set to crop and -256, -256, 512x512 It exports exactly how I need it.