EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.36k stars 2.89k forks source link

Polygonal packing too agressive when a duplicated image is used as MeshAttachment #1665

Closed chanon closed 3 years ago

chanon commented 4 years ago

When setting 'happy' animation, this is what is happening (only in Unity): screenshot 609

Here is the complete project. The Spine files are in SPINE_SRC_ASSETS SpineIssue.zip

Other animations such as "angry" does not trigger this behavior. In the Spine application itself there are no problems.

HaraldCsaszar commented 4 years ago

Thanks for reporting! For clarification: (only in Unity) means displays incorrectly only on runtime side here.

Problem context: Three identical images female-us-3/head-normal, female-us-3/head-happy and female-us-3/head-angry are used as MeshAttachments at slot head, but have a different Mesh. head-happy has a mesh with 4 vertices (might be the initial quad when turning RegionAttachment into MeshAttachment), thus includes more surrounding space that the other tigher meshes do not include. Polygonal packing uses the tigher meshes however.

Workaround until this issue is resolved: Using the same identical image makes no real sense here. Two of the attachments could be removed or each one could point to the same shared image.

NathanSweet commented 3 years ago

4.0.77-beta