Rouven написав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 написав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.