Parent epic: #517
Goal
Map a clip from one skeleton onto another. Indie devs need this constantly — buy a Mixamo animation on rig A, apply it to character rig B. Currently QtMeshEditor's AnimationMerger only merges clips between compatible skeletons; this slice handles the incompatible case.
Scope
AnimationRetargeter static helper in src/AnimationRetargeter.{h,cpp} — mirrors AnimationMerger's API style.
- Bone mapping:
- Auto-mapping via fuzzy name match (
hand_L ↔ LeftHand, etc.), Mixamo convention detection, common Unity/Unreal naming.
- Manual override UI: a two-column "Source bone → Target bone" mapping panel.
- Save/load named bone mappings as JSON sidecars (
mixamo_to_unity.bonemap) for reuse across projects.
- Retargeting algorithm:
- Compute T-pose alignment between source and target (use the existing
PoseLibrary from Slice D as the T-pose source if available; otherwise the bind pose).
- Per-frame: convert source bone-local TRS to a hierarchy-independent representation (forward-kinematics-based "pose delta") then re-evaluate against the target skeleton.
- Optional rotation-only retargeting mode for character work (preserve target's bone lengths exactly).
- Optional position-also retargeting for facial/finger detail.
- GUI: a "Retarget Animation" wizard:
- Pick source clip (current or imported).
- Pick target entity.
- Auto-map → review → manual overrides.
- Preview side-by-side.
- Apply → new clip on the target entity.
- CLI:
qtmesh anim source.fbx --retarget target.fbx --bonemap mixamo_to_unity.bonemap --anim Walk -o target_walking.fbx.
- MCP:
retarget_animation.
Acceptance Criteria
Effort
~12 days. Algorithm complexity is real; auto-mapping is the most schedule-fragile part.
Parent epic: #517
Goal
Map a clip from one skeleton onto another. Indie devs need this constantly — buy a Mixamo animation on rig A, apply it to character rig B. Currently QtMeshEditor's
AnimationMergeronly merges clips between compatible skeletons; this slice handles the incompatible case.Scope
AnimationRetargeterstatic helper insrc/AnimationRetargeter.{h,cpp}— mirrorsAnimationMerger's API style.hand_L↔LeftHand, etc.), Mixamo convention detection, common Unity/Unreal naming.mixamo_to_unity.bonemap) for reuse across projects.PoseLibraryfrom Slice D as the T-pose source if available; otherwise the bind pose).qtmesh anim source.fbx --retarget target.fbx --bonemap mixamo_to_unity.bonemap --anim Walk -o target_walking.fbx.retarget_animation.Acceptance Criteria
scene.anim.retarget.*recorded.Effort
~12 days. Algorithm complexity is real; auto-mapping is the most schedule-fragile part.