Skip to main content

Texture Packing

In Spine, a texture atlas layout can change whenever regions are added, removed, or resized. When this happens, users typically need to reapply any manual texture edits to the newly generated texture images.

EmoteLab avoids this problem by storing textures as unpacked images (the same state as when they are first imported into Spine). Whenever the atlas layout changes, EmoteLab repacks these unpacked images using the latest atlas file. This allows texture edits to persist across model updates without requiring manual rework of the users.

To ensure the EmoteLab texture packer and unpacker function correctly, all of the following rules must be followed:

  1. Image names must remain unchanged: EmoteLab (and Spine Editor) identifies images by name. If an image is renamed, it is treated as a completely new image, and any previous edits will not be applied.

  2. Folder structure must remain unchanged: The image path is included in the region name stored in the atlas file. Moving an image to a different folder changes its region name, causing EmoteLab (and Spine Editor) to treat it as a different image. For example, moving Hair/Hair_Bang.png to Hair_Front/Hair_Bang.png results in a different region and breaks compatibility.

  3. Image dimensions must remain the same: Changing the size of an unpacked image can cause incorrect packing results or visual artifacts when the atlas is regenerated.

  4. Texture pages must be square

  5. Image format must be PNG

  6. Rectangle packing mode must be used

  7. Enable Bleed and disable Premultiply Alpha: EmoteLab uses straight alpha

  8. Atlas file extension must be .atlas.txt

  9. Disable Flatten Paths

Spine texture export settings