Skip to content

feat: add gltf-skin-roundtrip example witnessing the skinned export contract#88

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/gltf-skin-roundtrip
Jul 20, 2026
Merged

feat: add gltf-skin-roundtrip example witnessing the skinned export contract#88
TMHSDigital merged 1 commit into
mainfrom
feat/gltf-skin-roundtrip

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Second of two new examples (after #87): the glTF skinned-mesh export follow-up from the ROADMAP pool — a seven-bone mech scorpion exported with export_skins=True and re-imported, witnessing the skinning contract the geometry round-trip left uncovered. Completes the pipeline arc: modeling/LOD → weighting → tangents → export → skins.

Contract witnessed

  1. Skeleton survivesskins[0].joints names all 7 bones; re-imported armature has same bones, same parent chain, rest matrices within 2.38e-07. The +Y-up conversion hits bone node translations exactly like meshes.
  2. Weights survive — JOINTS_0/WEIGHTS_0 on every primitive, disk weight sums at 2.98e-08, re-imported weights bit-exact (w_err 0.0) via straddle-safe position-key comparison.
  3. Deformation survives — identical pose on the re-imported rig, evaluated positions within 4.77e-07. Comparison is by rest-key, never sorted multiset: the exporter welds duplicate loops (32), so cardinalities differ and a sorted zip mispairs vertices (phantom 2.29 "deviation" measured and fixed during authoring).
  4. Parenting hazard — the exporter warns "Armature must be the parent of skinned mesh" and binds an armature by name otherwise; with two rigs it can pick the wrong one.

Version witness: skins pipeline stable — exporter/importer RNA byte-identical (probed with gltf-export-roundtrip), every measured value identical on both binaries.

Falsification evidence (temporary breaks, restored after measurement):

Probe Break Exit Measured
A export_skins=False 5 0 skins on disk
B all vertex groups stripped 4 0 groups ≠ 7 bones
C re-imported rig never posed 19 deformation deviates 0.9016

Contact-sheet gate: gltf-skin-roundtrip-contact-sheet.webp — verdicts: stage darkness ✓, wedge warmth ✓, subject fill ✓ (after a reframe pass), saturation ✓ (orange/teal), thumbnail legibility ✓ (twin scorpions with curled tails). Mean luminance 120.3 vs calibration 139.4 / 100.1 / 143.4 — inside range.

Proven by live run vs inspection:

  • Live run, local: check exit 0 on .scratch/blender-5.1.2-windows-x64/blender.exe (Blender 5.1.2, hash ec6e62d40fa9) and .scratch/blender-4.5.11-windows-x64/blender.exe (Blender 4.5.11 LTS, hash 4db51e9d1e1e) — identical values (bones=7 verts=440 eval_loops=1224 disk_verts=1192 sum=2.98e-08 rest=2.38e-07 w=0.0 pos=4.77e-07). Render exit 0 on both binaries (EEVEE), pixels iterated (4 drafts: framing, claws, angle, fill). All probes live.
  • Live run, CI: both smoke series on the PR head SHA — see checks.
  • Inspection only: nothing claims otherwise.

Test plan

  • Validate, validate-manifest, validate-counts (README substring 28 examples)
  • Blender 5.1 smoke + Blender 4.5 smoke — new step runs examples/gltf-skin-roundtrip/gltf_skin_roundtrip.py --
  • Ecosystem drift; Socket Security
  • Local binaries: .scratch/blender-5.1.2-windows-x64/blender.exe (5.1.2), .scratch/blender-4.5.11-windows-x64/blender.exe (4.5.11 LTS)

Integration: example dir + README (with pipeline-arc cross-references), gallery.json entry, plugin manifest, smoke step, top-level README ("Game asset pipeline" category now 5, counts 27→28), generated pages read character-by-character (alt and callout full), ROADMAP entry shipped-marked.

🤖 Generated with Kimi Code

…ontract

The geometry round-trip left the skinning side of the format uncovered:
skeleton, weights, and deformation must all survive it. A seven-bone
scorpion rig exported with export_skins and re-imported pins all three —
joint list and unit weight sums on disk, bit-exact weights and rest
matrices on re-import, identical deformation — plus the parenting hazard
(unparented skinned meshes let the exporter bind an armature by name) and
the sorted-multiset trap (the exporter welds duplicate loops; compare by
rest-key). The skins pipeline is byte-identical on 4.5.11 and 5.1.2.

Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Jul 20, 2026
@TMHSDigital
TMHSDigital merged commit c1a2f8d into main Jul 20, 2026
9 checks passed
@TMHSDigital
TMHSDigital deleted the feat/gltf-skin-roundtrip branch July 20, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant