feat: realistic skinned human figure + self-collision resolution - #26
Merged
Conversation
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_0155HaTaobTF48hVWvJwhj8h
Replace Michelle with the anatomical mannequin character (owner-exported Mixamo FBX): neutral, unclothed anatomy with visible musculature suits the physio/fitness content better than a fashion character, and the optimized GLB is 702KB vs 2.2MB (35MB source FBX -> FBX2glTF -> WebP textures + quantization + stripped animations). - character.ts: tolerate numbered Mixamo namespaces (mixamorig1:...) emitted by direct Mixamo exports. - Regenerate all four README GIFs with the new figure. - README: update the character attribution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0155HaTaobTF48hVWvJwhj8h
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.
(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.
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").
from the three.js examples, resized textures + WebP + quantization +
animations stripped (3.3MB -> 2.2MB).
the bar (was shoulder extension), crunch keeps feet planted with bent
knees, touch-toes folds without collapsing.
README GIFs from the live renderer; all four regenerated with the new
figure.
de-penetration tests; suite at 194 passing.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_0155HaTaobTF48hVWvJwhj8h