• Editor
  • Spine Multi-Texture Export Workflow

Related Discussions
...
Rouven a écrit

What is the workflow for normal maps?
Please correct me if I'm wrong, but it looks like we need to take the atlas generated by Spine, use a tool like Sprite DLight to create a normal map for the entire atlas and (likely) tweak it manually.
If we later add an image in Spine, the atlas is regenerated and we'll have to create the normal map again?

It would be great if there was a way to import normal maps into Spine alongside the regular sprites. Either with a file naming scheme, or from a Photoshop file (additional layer group for normal maps or something), and have the export generate a normal map atlas.

Nate a écrit

If you had your normal maps as individual files, Spine would pack them exactly as it does the images, so the two atlases textures would match.

If using whitespace stripping, you'd need to be careful that you have exactly the same whitespace in the diffuse and normal images. A tool that generates normals probably does this.

So to clarify:
(1) I need to make two sets of images: one for diffuse and another for the secondary map. Then...
(2) I export those two different sets of images in their own folders. Then...
(3) I use the Spine/libGDX Texture Packer and pack those folders one by one.

Questions:
Is this deterministic such that if all the images have the same dimensions, assuming the packer's trimming is disabled, they'll be packed with the same arrangement and can be reliably used for special multi-texture shaders?

The filenames for the secondary map texture don't have to exactly match the ones for the diffuse, right? That's not necessary for the packer to pack them exactly the same? If this is true, the region positions defined by the main .atlas really the only thing the Spine runtimes need to generate correct UVs.

Assuming I have Photoshop, the Spine program and my game engine setup with a test scene:
What is a good way to quickly iterate through repainting, repacking and previewing/testing changes to the secondary maps?

People will probably find this useful not only for shaders that take Normal Maps but also for other shaders that use specular or emission maps, cutout masks and other weird stuff used for effects.

Pharan a écrit

Is this deterministic such that if all the images have the same dimensions, assuming the packer's trimming is disabled, they'll be packed with the same arrangement

Yes. The names don't matter. Yes, the runtimes just need the regions.

Pharan a écrit

What is a good way to quickly iterate through repainting, repacking and previewing/testing changes to the secondary maps?

If you're testing in your game and you have individual source images, you'd have to save images, pack, and restart or reload the images in your game. The best you could do is to hot reload images in your game if they change, then edit the packed atlas images directly, optionally unpacking the atlas back to individual files (libgdx has a tool for doing this). Likely artists have better workflows, using image editing software that also shows the results instantly. There are probably some fancy commercial tools and also indie tools like Sprite Dlight and Sprite Lamp.

Nate a écrit

Yes. The names don't matter. Yes, the runtimes just need the regions.

Cool. That's good info.

Oh, I failed to emphasize enough that secondary maps aren't necessarily normal maps.

I mean I guess they may very well be, and that's where Sprite Dlight and Sprite Lamp already have good options for previewing. (Maybe not for actual Spine skeletons? Or can they?)

I'm particularly interested in using secondary textures for distortion or cutout shaders, for effects skeletons.
Does anyone know any related programs available that are good for seeing instant results in this area? I've actually always been curious about what tools 3D game effects animators use. Is everything proprietary in their respective studios in this space right now?