Just found out this issue when trying to re-export all my scenes using 2px padding instead of 1px to get rid of visual glitch.

I have a scene background with 2048 width, exporting to 2048x2048 texture. Under polygon packing, the export will failed with paddingX, paddingY set to 2 even if EdgePadding is set to false. If paddingX, paddingY set to 1, will export will be fine. However, in Unity there will be visual glitch ( lines ) so I think I need it to be at least 2.

I am using rectangle packing to work around the problem but if possible, I hope this can be fixed.

Sample Project:
Spine Polygon Packing Issue.7z


Weird. I tried on another scene which also has a background of 2048px wide. However, it can export using polygon with even 5px padding correctly.
Looks like something is wrong with the uploaded one here.


I took a look at the export and found that setting the padding to 1px actually give me a packed image with no padding (empty space) between the sprites. I guess that explains why when I have padding set to 1px (Polygon Packing), I still see the artifacts in game.

Here is the packed image with padding = 1 (Polygon Packing):

and here is the packed image with padding = 2 (Polygon Packing):

You can see that padding =1 actually has no padding. On the other hand, padding =2 give me 2px empty space between sprites.
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
  • Postovi: 300


Another good find. Sorry for the trouble these 4.0 bugs are causing you, though we are very glad to know about and fix them.

Your initial problem with packing not succeeding was a bit of luckiness. Padding on polygons is done by offsetting the polygon, which is to say it is expanded by half the padding amount. When two of the expanded polygons are packed against each other, the two halves of the padding add up to the original padding. For reasons only the floating point gods can say, your particular mesh after being expanded ended up being a teeny bit too large. That made it not fit. We've fixed this in 4.0.59-beta, which we'll release in a few minutes.

I'm able to reproduce the issue you see where 1px padding ends up giving you zero padding. It could be our fix for the other problem helps here. If you still see it in 4.0.59-beta, please let us know. I see eg the expected 1px gap:


Edit: 4.0.59-beta is up now.

  • Postovi: 11939

Natrag na Bugs