Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygons packing may not pack an image regions correctly if it is referenced by some mesh attachments #849

Open
misaki-eymard opened this issue Oct 31, 2024 · 0 comments

Comments

@misaki-eymard
Copy link
Collaborator

Description:
If there are multiple mesh attachments that reference the same image, and if there are multiple mesh attachments, e.g., if any of them are duplicated, there is a problem with Polygons packing where some regions are not packed correctly.

Expected behavior:
Even if there are multiple mesh attachments that reference the same image, and even if there are multiple mesh attachments, e.g., if any of them are duplicated, all regions will be packed correctly.

Steps to reproduce:

  1. Download the attached .zip file: Polygons packing may not pack an image regions correctly if it is referenced by some mesh attachments.zip
  2. Open the Spine project contained in the unpacked .zip file using Spine 4.2.36. Here's what the skeleton included in that project looks like:
    Screenshot 2024-10-31 at 13 19 06
    Make sure that the light blue and red circle mesh attachments refer to the same image.
  3. First, perform a texture pack in this state to confirm that it packs correctly. Open the texture packer settings and load the json.pack.json contained in the .zip file to pack the textures. After loading, the pack settings should look something like this:
    Screenshot 2024-10-31 at 13 21 55
  4. Run the pack and check the output PNG. It should look something like this:
    Screenshot 2024-10-31 at 13 27 48
  5. Select slot A2 and duplicate it.
    Screenshot 2024-10-31 at 13 26 10
  6. Pack the texture with the same settings as you did in step 4.
  7. If you look at the output texture, you will see that the red circle has disappeared:
    Screenshot 2024-10-31 at 13 27 34

If you duplicate A1 instead of A2 in step 5 and pack the texture, you will see that this time only the red circle is output and not the light blue circle:
Screenshot 2024-10-31 at 13 29 38

Also, if you duplicate both A2 and A1, you will get a blank texture:
Screenshot 2024-10-31 at 13 29 52

The versions of Spine that can reproduce this issue:
Spine 4.2.36

This issue was reported in the following thread on the forum:
https://esotericsoftware.com/forum/d/27167-%E8%BF%99%E6%98%AF%E5%A4%9A%E8%BE%B9%E5%BD%A2%E6%89%93%E5%8C%85%E5%9B%BE%E9%9B%86%E7%9A%84bug%E5%90%97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant