Commit aebd021
committed
feat: realistic skinned human figure + self-collision resolution
Replace the on-screen figure with a fully rigged, textured human
character (articulated fingers, sneakers, face) driven by the existing
solver skeleton, and stop limbs from passing through the body.
- posecode-render/character.ts: load a Mixamo-rigged GLB, calibrate its
T-pose onto the driver rig's rest pose (arms down, palms forward,
limbs aimed exactly along driver rest directions), then retarget
world-space rotation deltas bone-for-bone every frame, fingers
included. The driver skeleton is rebuilt to the character's exact
proportions so floor contact, prop pins, and reach-IK land exactly on
the visible mesh.
- posecode-render/depenetrate.ts: capsule-based self-collision pass
(torso, head, thighs, shins vs forearms/hands and crossing shins),
ROM-clamped and deterministic, run before contact solving in both the
viewer and the eval probe.
- Viewer: createViewer({ characterUrl }), characterActive getter,
procedural figure as automatic fallback; hidden procedural meshes keep
feeding bounding-box grounding. Playground + landing pass the local
GLB (?figure=classic opts out); embeds default to the hosted model
with a character attribute (URL or "off").
- Assets: playground/public/models/character.glb - Mixamo "Michelle"
from the three.js examples, resized textures + WebP + quantization +
animations stripped (3.3MB -> 2.2MB).
- Movement fixes visible with the new model: deadlift arms now hang to
the bar (was shoulder extension), crunch keeps feet planted with bent
knees, touch-toes folds without collapsing.
- scripts/capture-gifs.mjs (npm run gifs): headless regeneration of the
README GIFs from the live renderer; all four regenerated with the new
figure.
- Tests: skeleton-congruence retarget tests (synthetic T-pose rig) and
de-penetration tests; suite at 194 passing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155HaTaobTF48hVWvJwhj8h1 parent 63d9a2a commit aebd021
27 files changed
Lines changed: 1259 additions & 28 deletions
File tree
- docs/media
- packages
- posecode-embed
- src
- posecode-eval/src
- posecode-render
- src
- test
- playground
- public/models
- src
- scripts
- spec/examples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
Loading
Loading
Loading
Loading
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
0 commit comments