• Editor
  • When the same parts of illustration got several blending mode. how to save time?

Hi,
I have many projects that the same parts is drawn in several layers.
For example, the same sweat on human body will be 3 layers with normal/ screen/ multiply mode, but not exactly the same size.
If I export them to Spine, the same parts I have to do 3 times the work. (for mesh and weight)
Is there any solution makes me could use the linked mesh function?
Maybe some photoshop script that could export these layer in same size?

    Related Discussions
    ...

    To address the issue of exporting multiple layers with different blending modes in Photoshop for use in Spine, you can use a script to streamline the process. The key is to ensure that the layers are exported in a way that allows you to use Spine's linked mesh feature, which can save time by reusing mesh and weight data across similar images.

    One approach is to use a Photoshop script that exports each layer as a PNG file while maintaining the same size and position. This ensures that when you import these images into Spine, they align correctly, allowing you to use linked meshes. You can find a script for exporting layers from Photoshop to Spine here. This script can be customized to handle specific requirements, such as maintaining layer sizes and positions.

    Additionally, you can manually adjust the blending modes in Spine after importing the images. Spine supports different blending modes, and you can set these for each slot in the Spine editor.

    By using a script to export layers consistently and leveraging Spine's linked mesh feature, you can significantly reduce the amount of repetitive work required for setting up meshes and weights for similar parts across different layers.

    veyrix

    Maybe some photoshop script that could export these layer in same size?

    You can use the [trim:mask] tag. This forces the layer to be trimmed based on the size of the layer mask. This allows control over the size of an image even when using the Trim whitespace option.

    For example, the layers could look like this:

    Below is an example of a polka-dot star with a white outline. The white outline, polka dots, and fill are divided into three layers, and the layer group that brings them together has a [trim:mask] tag and a layer mask that serves as the trim reference.

    Unfortunately, if the slots are different, linked mesh is not available, even if the image sizes are the same. This is one of the features we plan to improve in a future release and you can find the issue ticket here: EsotericSoftware/spine-editor195

    However, if the images are the same size, you can reuse the mesh vertices and weights by first setting them for a mesh attachment, duplicating that mesh attachment, and then changing the image path, so [trim:mask] would still be useful in cases like yours.

      Misaki
      Thanks a lot!

      I tried it but if the layer size is smaller than the mask size, it will be export as small one.
      So eventually my layers are not in same size 🙁
      In this case, I have a lot of other layers which I want them to trim whitespace so uncheck it when exporting is not a option for my situation.

      If there is another way to complete it, please let me know ;(

        veyrix That is weird. Even in the star example I showed you, the layers inside the outline are smaller in size than the outline layer, but by using [trim:mask] they are all exported at the same size. Could you show us your layer structure? Or you can send us via email a PSD that can reproduce the problem: contact@esotericsoftware.com
        Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

        Oops,
        I have tried the export options,
        it seems the tag doesn't work...

          veyrix Ah, perhaps you are using PhotoshopToSpine.jsx instead of importing on the Spine editor? If so, adding a layer mask on a layer group won't work, you need to set the mask on the layer itself:

          We know that this can be quite a hassle if you have a very large number of layers, but we are currently mainly updating the PSD import feature that can be used in the Spine editor, so we hope you will use that.

            Misaki
            Thanks!!
            Yes, I am using PhotoshopToSpine.jsx since my project still using ver. 3.8.99
            It's solved after I adding the mask on the layer itself.

            I'll take a note of the tag when I use PSD import!

            Thanks again!