Skip to content

fix(render): stop spline overshoot and ground floor-planted hands/feet - #51

Merged
a-baran-orhan merged 2 commits into
mainfrom
fix/animation-overshoot-and-floor-contacts
Jul 13, 2026
Merged

fix(render): stop spline overshoot and ground floor-planted hands/feet#51
a-baran-orhan merged 2 commits into
mainfrom
fix/animation-overshoot-and-floor-contacts

Conversation

@a-baran-orhan

Copy link
Copy Markdown
Member

What

Fixes several movement artifacts by addressing two root causes in the render engine, generically — so every movement benefits, not just the reported examples.

1. Squad spline overshoot at loop-boundary anchors

The squad quaternion spline was fed a clamped neighbour into its control-point formula at the start-pose and reset keyframes, producing a backward-biased tangent instead of a rest tangent. Large rest-to-rest moves flung the joint the wrong way, then snapped back:

  • Biceps curl — the forearm sat still for ~0.2s then snapped 135° in a single frame (measured), then held. This is the reported "the curl happens suddenly, we don't see the movement."
  • Box squat — the same overshoot at the "Sit back" start threw the torso/hips forward off the chair ("goes forward / looks stupid").

Fix (timeline.ts): mark the structural anchors (start + reset) as rest points, collapsing their segments to a clean slerp. The curl now progresses smoothly through every angle (0→28→52→…→135°) and the squat's hips travel back monotonically. Smooths transitions across all movements.

2. Contact solving missed floor-planted hands/feet

  • Plank feet floating — ground-lock pivoted the body about the feet to plant the forearms, but never grounded the feet first, so the pivot sat wherever the toes happened to be. Fix (groundlock.ts): drop the feet to the floor before pivoting, so both ends land.
  • Plank & mountain-climber hands clawing — the flatten-palm / flat-fingers logic only recognised hands planted via reach/pin: hands floor. A high plank uses ground-lock: hands, so those hands were mis-read as idle and given the inward resting hook. Fix (contacts.ts + index.ts): treat ground-locked hands as floor-planted → palms down, fingers flat.

Why

These were reported as: weird plank/mountain-climber hands, plank feet off the ground, biceps curl snapping instead of curling, and box squat lurching forward. Rather than tweak each example, the fixes target the shared root causes so the whole movement library improves.

Testing

  • 248 tests pass, including the eval scorecard that checks grounding invariants for every canonical example.
  • New red/green regression test (render.test.ts): asserts the biceps forearm sweeps in bounded steps — fails without the fix (2.37 rad snap), passes with it.
  • Typecheck clean.
  • Verified visually in the playground: biceps curls smoothly, box squat sits back onto the chair, plank/mountain-climber hands lie flat, plank toes grounded.

Reviewer notes

  • The plank legs can still read as slightly elevated at some camera angles (the pose rests on the balls of the feet with shins raised); the toes reach the floor and all grounding invariants pass. Re-authoring the base plank pose for a flatter look is a possible cosmetic follow-up.
  • probe.ts updated to pass groundLock through alignFloorPalms so the headless eval pipeline stays faithful to the viewer.

Two root causes behind several movement artifacts, fixed generically so
every movement benefits rather than patching individual examples.

1. Squad spline overshoot at loop-boundary anchors
   The squad control-point formula was fed a clamped neighbour at the
   start-pose and reset keyframes, yielding a backward-biased tangent
   instead of a rest tangent. Large rest-to-rest moves flung the joint
   the wrong way then snapped back:
   - biceps curl: forearm sat still ~0.2s then snapped 135 deg in one
     frame ("curl happens suddenly")
   - box squat: the "Sit back" start overshoot threw the torso forward
     off the chair ("goes forward / looks stupid")
   Fix: mark the structural anchors (start + reset) as rest points so
   their segments collapse to a clean slerp. Smooths transitions for all
   movements. Adds a red/green regression test.

2. Contact solving missed floor-planted hands/feet
   - plank feet floated: ground-lock pivoted the body about the feet to
     plant the forearms without grounding the feet first, so the pivot
     sat wherever the toes happened to be. Fix: drop the feet to the
     floor before pivoting so both ends land.
   - plank / mountain-climber hands clawed: the flatten-palm / flat-
     fingers logic only recognised hands planted via reach/pin floor. A
     high plank uses ground-lock: hands, so those hands were treated as
     idle and given the inward resting hook. Fix: treat ground-locked
     hands as floor-planted (palms down, fingers flat).

Verified: 248 tests pass (incl. eval grounding invariants), typecheck
clean, and the moves confirmed in the playground.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
posecode Ready Ready Preview, Comment Jul 13, 2026 6:03pm

…ot-and-floor-contacts

# Conflicts:
#	packages/posecode-eval/src/probe.ts
@a-baran-orhan
a-baran-orhan merged commit c9aac4e into main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant