• Editor
  • Linked Mesh or Similar Effect with Slightly Differently Shaped Parts?

Misaki Thank you Misaki, I understand better now! As a beginner in game development, I still have a lot to learn. If there are any new questions, I will start a new post. Thanks again for your help! 😃

Related Discussions
...

Misaki I apologize for replying to this post again, but I feel this issue might be related to the current topic. Using the method you provided, I successfully placed different weapons and body parts under the same linked mesh and removed excess parts in the mask during the final export by using strip whitespace X and Y. However, I'm now facing a new issue with creating normal maps.

I followed the process in this post https://esotericsoftware.com/forum/d/13453-use-premultiplied-alpha-when-texture-packing-normal-maps/4 to create normal maps for each weapon and part using SpriteIlluminator. But I found that if strip whitespace is checked on both normal and albedo maps, the sprite positions on the exported images do not align. Is there any way to force the positions in the texture packer to stay consistent while still using strip whitespace?

Additionally, I have a minor question: if I place normal maps and albedo maps in the same folder, is it possible to export them separately based on file names or other identifiers? This would be more convenient for file management. However, this issue is not as important as the one above. Thank you very much! 😃

    wpw1221 Hmmm, that sounds strange. If you are following the method presented in that thread, I think you should be able to pack the textures in the same arrangement even if you check the StripwhitespaceX/Y checkbox. Did you use the texture packer to pack both albedo and normal maps? If either is packed at the same time as the JSON or binary export, the results may be different.

    If you have both packed with the texture packer, but the results are different, this may be a bug, and we would appreciate it if you could email us the image files that can reproduce the problem: contact@esotericsoftware.com
    (You can paint the images a random color or something so we can't see the specific images).


    Additionally, I have a minor question: if I place normal maps and albedo maps in the same folder, is it possible to export them separately based on file names or other identifiers? This would be more convenient for file management. However, this issue is not as important as the one above.

    It is impossible to separate packs if they are in the exact same folder. If the parent folder is the same and they are each in their own subdirectory, the texture packer will pack them as separate pages unless the Combine subdirectories checkbox is checked in the texture packer settings.
    For example, the folder hierarchy should look like this:

    <images folder>
          ├── <albedo>
          │ ├── body.png
          │ ├── head.png
          │ └──  ...
          └── <normal>
            ├── body.png
            ├── head.png
            └── ...

    In this way, two texture atlas pages can be obtained with a single texture packing.

    If you have both packed with the texture packer, but the results are different, this may be a bug, and we would appreciate it if you could email us the image files that can reproduce the problem:

    Sure! I have sent the content via email. 🙂

    It is impossible to separate packs if they are in the exact same folder. If the parent folder is the same and they are each in their own subdirectory, the texture packer will pack them as separate pages unless the Combine subdirectories checkbox is checked in the texture packer settings.

    To facilitate future skin replacements, I have organized the albedo folder based on the replaceable parts. However, I can try exporting the normal map images to a separate folder. Thank you again for your help!

      wpw1221 We have received your email, but it appears that the file was either not attached or was deleted during transmission. Could you please resend the file?

        Misaki I'm sorry, I forgot to upload the files after packaging them. Please check again. Thank you!

          wpw1221 Thank you for sending the file! I think I found the cause. You have Current project checked in the texture packer settings. I assume that you have the skeleton project open and then run the texture packer, which automatically packs the albedo map based on the information in the currently open project, so the pack result would be different from the normal map. As long as I did the pack with the same settings as yours (Strip whitespace X/Y checked) with a new Spine project open, the image alignment between the albedo map and the normal map matched perfectly. Could you try unchecking Current project and see if that solves the problem?

            Misaki Thank you, Misaki. I used your method to pack them with a new Spine project. Most of the layouts are consistent now, but there are still some minor differences that prevent the normal map from working. I have emailed you.

              wpw1221 Sorry for the wait to get back to you! It appears that you have checked Alias in the texture packer settings.
              In the images for the albedo map, the following two have different shadow color shapes, but in the images for the normal map, they have exactly the same pixel:

              • body/body_neck_skin_F_n.png
              • body/body_neck_skin_S_n.png

              When Alias is checked, two images that are pixel for pixel the same will only be packed once. The configure.jpg included in the .zip file you originally sent us had Alias unchecked, so it worked for me. Could you confirm that unchecking Alias produces the expected results?

              Thank you, Misaki! I tried it and found that unchecking "Alias" does indeed allow them to have the same layout.

              Additionally, I noticed that the folder structure for normal maps must match the folder structure for albedo maps. If the albedo folder has subdirectories (and you check "Combine subdirectories"), but you place all 57 normal images in one folder (without checking "Combine subdirectories"), this also causes their texture layouts to differ when packing.

              Thanks again!

                wpw1221 I’m glad to hear you've figured it out. Thank you for getting back to us! 🙂