• Editor
  • Emission map

Hello! I'm working on a Unity project where I need to separate glow/emissive elements of a Spine character into different materials. Currently, when I use the built-in Texture Packer with separate folders (e.g. /images/body/ and /images/glow/), Spine correctly generates multiple PNG atlas images, but only produces a single .atlas.txt file referencing all of them.
For Unity, I would need these layers (e.g. glow/emission, skin variations) to be exported as separate .atlas.txt files as well, so I can assign them to separate materials and use them independently in shaders (e.g. as emission maps).
Is there a recommended way to achieve this within Spine, or would this require external tools or manual post-processing?

Related Discussions
...

To achieve the separation of glow/emissive elements into different materials in Unity, you can utilize Spine's texture packing capabilities by organizing your images into separate folders. This will allow you to generate multiple PNG atlas images. However, Spine currently generates a single .atlas.txt file that references all images. To have separate .atlas.txt files for each layer, you would need to manually edit the .atlas.txt file or use an external tool to split the atlas data into separate files. Alternatively, you can modify the Spine runtime to handle multiple atlas files, allowing you to assign them to different materials in Unity.

Hi, we are working in the same Unity project where we need to separate two glow/emissive elements of a Spine character into different materials. We have a green and a red glow/emissive verions.
Currently, when I use the built-in Texture Packer with separate folders (e.g. /images/body/ and /images/glow/), Spine correctly generates multiple PNG atlas images, separated atlas.txt files, but don't produce JSON file with referencing all of them.
By simple export function the Spine produces only one atlas.txt file and JSON cannot use the other, multiple PNG atlas files and atlas.txt files in Unity.

For Unity, I would need these layers (e.g. glow/emission, skin variations) to be exported as separate .atlas.txt files as well, so I can assign them to separate materials and use them independently in shaders (e.g. as emission maps).

Is there a solution for this within Spine, or would this require external tools or manual post-processing, perhaps modified Unity Spine runtime?

@palfisz Every atlas page also has its own material generated. Asset-wise each .atlas.txt file has one AtlasAsset generated for it, and each AtlasAsset references multiple Materials, one for each atlas page texture.

Did you encounter any issues with changing the materials for each atlas page texture?