material initial and pose fix

This commit is contained in:
bird_egop
2026-06-06 21:26:56 +03:00
parent 776bb9fcb3
commit 5baf3f324f
13 changed files with 536 additions and 248 deletions
@@ -143,7 +143,10 @@ public static class MshRestPoseBuilder
if (q.LengthSquared() < 1e-8f)
return Quaternion.Identity;
return Quaternion.Normalize(q);
// MSH/game convention is opposite to our System.Numerics/OpenGL transform convention.
// Conjugating converts the stored piece rotation into the viewport convention.
// The MSH keyframe rotation is stored as mesh-to-parent instead of parent-to-mesh, so the viewer needs the inverse.
return Quaternion.Conjugate(q);
}
}