• Editor
  • Editor-based Workflow for Emission/Metallic/Normal Maps

Hi Spine Team,

What's the recommended workflow for working with, and continually updating, the non-albedo maps of a Spine character?

Right now I'm going:

  1. Paint character in Photoshop.
  2. Export to Spine, animate, pack & export.
  3. Open exported packed texture map of character in Photoshop and paint over for my non-albedo maps.
  4. Bring it all into game engine.

And that's fine, except when I need add an extra slot or an extra skin, then the exported texture map understandably lays the images out in a different way in the packed texture. I say understandably because clearly Spine's gotta figure out the most efficient way of packing images and the new images change the flow.

But then I have to do a lot of Step 3 again to update the emission map to match. Not the painting over part, but still plenty of rotating groups of layers and making sure it all lines up properly again.

Is there a feature already in Spine that helps with this?

    Related Discussions
    ...

    Cranktrain I think the following threads will be helpful:
    https://esotericsoftware.com/forum/d/14916-normal-maps-creation/3
    https://esotericsoftware.com/forum/d/18545-sonic-fan-project/7

    Is there a feature already in Spine that helps with this?

    Unfortunately, there is currently no feature in the Spine Editor that allows automatic generation of normal maps. As mentioned in the threads above, using an external tool to generate normal map textures should be currently the most efficient way to do so.

    Hi Misaki, so to clarify: Currently the recommended way is to avoid the re-layout issue I've described is use Spine's texture packer feature operating on a different folder of images, one filled with the Emission or Normal export, rather than the Albedo images?

    And that produces the same texture map layout, presumably if all the images are the same width and height as their counterparts?

      Cranktrain Yes, your understanding is correct.
      If the images to be packed have the same width and height and you use the same texture packer settings, the textures should be packed in the same layout even if the images are replaced by other ones. If it does not work, please let us know!

      Cranktrain In addition to what Misaki already said, please be cautios with enabling Strip whitespace during atlas packing, as you might otherwise run into the problem of e.g. the normalmap image having no whitespace while the primary (albedo) map has, and thus ends up being stripped and packed differently.

      7 dana kasnije

      Thanks, a quick follow up question, is there anything in the latest Photoshop-to-Spine script that helps with this? I'm sure I'm a few versions out of date on that one having made a couple of changes to suit my project.

      I can see how the texture packer helps generate the same packed maps now, but the Spine exporter Adobescript for Photoshop that I've been using flattens all the groups and exports them to one place, by default an ./images/ folder. But if there's a Normal version and an Emission version and others, they ought not be treated in the same way like any of the albedo skins images, but probably end up in their own /images/ folders, ready for the Spine texture packer.

      As you can imagine, you probably wouldn't want to this manually on every export from Photoshop, copy-pasting files here and there, but would rather script it.

      I can see how I could alter the Adobescript to read the names of Groups to tell which normal/emission images could go where, or even a post-process Python script to move files around and send them to the texture packer... but I wouldn't be surprised if something of this nature is already in the latest version of the Spine exporter?

        Cranktrain I guess what you are looking for is the [folder] tag. This allows you to output images in a subfolder. Or you can use the [name:pattern] tag for the same purpose, e.g. add [name:normal/*] to the group name of layers for normal maps will output the layers in that group to the normal folder.
        Please refer to the README.md of PhotoshopToSpine for more information: https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop#tags