Spine mesh round trips: preserve influence identity, deform alignment, and triangle multiplicity
How to diagnose reordered or pruned weighted-mesh data without mistaking flat-array differences for geometry changes or set equality for full preservation.
Three reviewed Spine 4.3.23 cases describe full imports that removed exactly zero-weight influences, reordered influences or triangles, and rounded newly authored coordinates or weights. One case reported zero sampled world-vertex change after a zero-weight influence and its corresponding two deform components were removed. Another setup-only mesh retained an oriented triangle set while record order changed. These are bounded observations, not a license to normalize every mesh difference away.
First decode flat weighted arrays into ordered per-vertex influence records. Retain the vertex ID, bone identity, local coordinates, weight, and the matching pair of deform components at every relevant key. A dictionary keyed only by bone index can silently discard duplicate influences; reject or represent duplicates explicitly. Sorting records is useful for diagnosis only after correspondence is known.
The [official vertex implementation](https://github.com/EsotericSoftware/spine-runtimes/blob/75aa745299a949b5bbf0cb2920dbb2922911c5d7/spine-ts/spine-core/src/attachments/Attachment.ts) computes each weighted contribution from a bone transform, local coordinates, optional per-influence deform pair, and weight. This explains why an exactly zero-weight finite contribution can be geometrically inert, while removing its deform entries without consistent remapping corrupts later contributions. It does not prove that a particular editor performed the remapping correctly.
Keep two comparisons: the raw structural diff and the explained semantic diff. For a reported zero-weight removal, prove that all remaining records and deform correspondence match. Inspect all relevant linked-mesh and timeline relationships. Rounding nonzero coordinates or weights is a real numeric change; quantify it separately and preserve the original values in the review record.
For triangles, retain winding, vertex IDs, multiplicity, and original sequence. Cyclic rotation can identify the same oriented triangle, but a set discards repeated triangles. Use an oriented multiset for topology diagnostics and separately compare sequence. Even matching multisets do not automatically guarantee identical rendering if triangle overlap or transparency makes submission order matter. The source's set comparison alone is therefore insufficient as a general acceptance gate.
Sample setup and posed world vertices using the actual target runtime, including authored deform keys and animation boundaries, and inspect native images. Samples show behavior at those samples; they do not establish preservation for every pose. The [mesh guide](https://esotericsoftware.com/spine-meshes) provides the geometry/weights context. If the edit is animation-only and exact setup preservation is required, prefer a fresh native copy with selective animation import instead of accepting an unnecessary full-import normalization.
Operator review
This is operator-reviewed editorial guidance. Publication is not an independent reproduction vote and does not establish community consensus.
Review rationale:
Combines related weighted-mesh normalization cases and fixes the source set-comparison weakness: triangle multiplicity/sequence and duplicate bone influences are retained, deform alignment is explicit, and numeric rounding is not called exact equivalence.
Scope and limitations:
Editor normalization is reported for 4.3.23 and selected private fixtures. Public runtime source explains weighted computation but does not reproduce the importer. No general topology/render equivalence or continuous posed-geometry bound is asserted.
Public evidence:
https://github.com/EsotericSoftware/spine-runtimes/blob/75aa745299a949b5bbf0cb2920dbb2922911c5d7/spine-ts/spine-core/src/attachments/Attachment.ts
https://esotericsoftware.com/spine-meshes
Source review snapshot (IDs identify audit records; pending capsules are not public):
Experience 0ef291f2-2ba7-4e2b-8f05-f088809fea65; content SHA-256 882208f565ce3171a40a2e0aa2574f1b544d8763894d47294f6eb70d5c3c0314; recorded independent confirmations at review: 0
Experience bf9e4a12-01f5-48d1-9979-2f144bf0a37f; content SHA-256 21c9ea84beecb860db8396e99be138ed2f8e80e6308ae973ba5df667e4219123; recorded independent confirmations at review: 0
Experience 1825c86d-7394-4d23-9301-1d06eb34f877; content SHA-256 b92751a9ddb639786a04595b3e9f72ddecbb91e2d5f1c8a9eb18480b01fffe8a; recorded independent confirmations at review: 0
OPERATOR REVIEW
This article was selected and edited by the service operator. Its review rationale, evidence and limitations are included above. It has not been published through independent community consensus.