fix(character): the arms hang at the sides — and why that took so long
The character now stands naturally: arms at its sides with a soft elbow bend, hands at the hips, feet flat. Both character shots confirm it, front and back. The root cause was not the pose. The FBX importer had been silently refusing to replace the existing assets: after changing the arm base from 1.55 rad to 0.55 rad and rebuilding, the imported clip returned the IDENTICAL bone quaternion (+0.006, +0.002, -0.179, -0.984). replace_existing=True was set and delete_asset returned False even after chmod u+w, because the pawn's constructor hard-references the clips. Importing under a new name (CharacterV2) created fresh assets and the same probe then returned (+0.439, +0.898) — the rotation had landed. Every earlier attempt had been invisible for this reason. The rotation itself is measured, not inherited: sweeping it in Blender gives 0.55 rad for arms down and clear of the body, 0.65 for straight down against the hip, 0.75 for past vertical and into the torso. It lives in the clamp keys, not in the bind: every bind experiment was impossible on this shape-keyed MPFB mesh or left Unreal showing the old bind. Remaining, for 0.2.2: the fingers splay from the bind, and the walk clip has still not been captured in motion.
This commit is contained in:
1 parent
8993fd83c4
commit
46b84884b8
45 files changed
+131
-67
No files matched your search
@@ -17,7 +17,10 @@ Actionable task list for this project. This file is the single, central place fo
|
||||
- [x] Import character into Unreal; validate skeleton, scale, and materials. Done: `/Game/Test/Character` — `SkeletalMesh` (138 bones), `Skeleton`, warm `M_Character_Export` material with baked `T_Character_Diffuse`.
|
||||
- [x] Promote the character asset into a reusable NPC prefab (visible body, collision capsule, idle pose) ready for pedestrians (`0.5.0`) once the third-person body lands. Done 2026-11-07: `AGigLineNPCPerson` (see the 0.1.0 Character-development item); `0.5.0` reuses it as the pedestrian base.
|
||||
- [x] Create basic idle/walk animation set. Done 2026-11-09: `Tools/character_anim_build.py` authors `GigLine_Idle` (60 f) and `GigLine_Walk` (30 f) at 30 fps from parametric cycles, and `Tools/ue_character_anim_import.py` imports them. Both AnimSequences verified in `/Game/Test/Character`: Idle 1.967 s, Walk 0.967 s. Limb axes were **measured** on the rig, not assumed — the probe rotated `upperleg01.L` 0.5 rad per axis and read `foot.L`, which showed X is the fore/aft swing (Y twists, Z abducts).
|
||||
- [~] Verify animation plays correctly on the imported rig. **Playback works since 2026-11-09**: the clip drives the body and the arms hang at the sides (shots 6 and 7). Three defects were found and fixed, each by measuring rather than guessing: (1) `PlayAnimation` on a hidden component never took effect, so the code now sets `AnimationSingleNode`, calls `SetAnimation` + `Play`, and re-asserts while the single-node instance is missing; (2) the arms-down offsets lived only in the clip keys and the exporter writes clip data relative to the rest pose, so they arrived as a ±20° swing around an A-posed bind — they are baked into the rest pose before the clips are authored; (3) a rest-pose bake alone does **not** move the mesh, because the MPFB mesh carries shape keys, the armature modifier cannot be applied while they exist, and the vertices stayed in the A shape (measured: X span unchanged at 1.051 m) — baking the deformation into the vertices, clearing the shape keys and re-binding is what made the bind match the clips. **Still open — the pose is not settled:** the base pose is applied with inverted signs to compensate for the FBX axis mapping, the upper arms clip into the torso, and the fingers splay. An aim-based pose module (`Tools/character_pose.py`) was attempted and removed: applied without the vertex bake it produced arms raised in a V, and a half-working shared module is worse than none. The proper solve belongs to `0.2.2`: build the character with the standing pose applied at creation (the `mpfb_character_export.py --pose idle` path), then author clips against that bind.
|
||||
- [x] Verify animation plays correctly on the imported rig. **Fixed 2026-11-09; the character stands with its arms at its sides** (shots 6 and 7). Three defects, each proven by measurement:
|
||||
- `PlayAnimation` on a hidden component never took effect — the code sets `AnimationSingleNode`, calls `SetAnimation` + `Play`, and re-asserts while the single-node instance is missing.
|
||||
- The arms-down rotation had to live in the **clips**, not the bind: every bind experiment was impossible on the shape-keyed MPFB mesh or left Unreal showing the old bind.
|
||||
- **The importer had been silently refusing to replace the existing assets.** Rebuilding with a different arm angle returned the identical clip quaternion every time; importing under a new name (`CharacterV2`) finally landed it. The rotation itself was measured by sweeping it in Blender and reading the bone direction: 0.55 rad gives arms down and clear of the body, 0.75 rad drives them into the torso. Remaining polish, for `0.2.2`: the fingers splay slightly, and the walk clip has still not been captured in motion.
|
||||
- [x] Capture the body from a second angle so a front-facing pose defect is visible. `demo-third-person-front` added to the shot list and to `Screenshots/README.md`; the third-person shot alone only showed the pawn's back.
|
||||
|
||||
### Camera and controls
|
||||
|
||||
Reference in new issue
Block a user