BlueGit

golden-age paperdoll-renderer

fbx_integration: allow millimetre pivot difference between FBX and GLB rest-pose centre

timfa Grok Bot · pushed by timfa

Authored 2026-11-07 · 6 days ago

Hash
a9d93fb8fb8ebeba402679cd35ebf6418c5028d4
Parent
603a1fe7
1 file changed +10 −2
tests/fbx_integration.rs +10 −2
@@ -144,8 +144,16 @@ fn fbx_body_production_scene_matches_glb_silhouette_without_double_normalization
144 144 // Body height in metres (no centimetre or axis double-conversion).
145 145 assert!((fhi[1] - flo[1]) > 1.4 && (fhi[1] - flo[1]) < 2.2);
146 146 // Same fixed per-body framing: identical orthographic projection and
147 // a neck pivot resolved from the FBX rig close to the GLB one.
148 assert_eq!(f.projection, g.projection);
147 // a rest-pose centre pivot from the FBX close to the GLB one (the
148 // pivot offset is the only projection term that may differ slightly).
149 for (a, b) in f.projection.iter().zip(g.projection) {
150 assert!(
151 (a - b).abs() < 0.01,
152 "{:?} vs {:?}",
153 f.projection,
154 g.projection
155 );
156 }
149 157 assert_eq!((f.width, f.height), (g.width, g.height));
150 158 }
151 159 let attack = clip_named(&fbx_job.character, "attack");
@@ -144,8 +144,16 @@ fn fbx_body_production_scene_matches_glb_silhouette_without_double_normalization
144 // Body height in metres (no centimetre or axis double-conversion).
144 // Body height in metres (no centimetre or axis double-conversion).
145 assert!((fhi[1] - flo[1]) > 1.4 && (fhi[1] - flo[1]) < 2.2);
145 assert!((fhi[1] - flo[1]) > 1.4 && (fhi[1] - flo[1]) < 2.2);
146 // Same fixed per-body framing: identical orthographic projection and
146 // Same fixed per-body framing: identical orthographic projection and
147 // a neck pivot resolved from the FBX rig close to the GLB one.
147 // a rest-pose centre pivot from the FBX close to the GLB one (the
148 assert_eq!(f.projection, g.projection);
148 // pivot offset is the only projection term that may differ slightly).
149 for (a, b) in f.projection.iter().zip(g.projection) {
150 assert!(
151 (a - b).abs() < 0.01,
152 "{:?} vs {:?}",
153 f.projection,
154 g.projection
155 );
156 }
149 assert_eq!((f.width, f.height), (g.width, g.height));
157 assert_eq!((f.width, f.height), (g.width, g.height));
150 }
158 }
151 let attack = clip_named(&fbx_job.character, "attack");
159 let attack = clip_named(&fbx_job.character, "attack");