Skip to content

Fingers that move, and a grip on what a hand holds - #4

Open
rehan-remade wants to merge 3 commits into
mainfrom
rehan/hands
Open

rehan-remade wants to merge 3 commits into
mainfrom
rehan/hands

Conversation

@rehan-remade

Copy link
Copy Markdown
Contributor

A hand is about 40 px of the frame, too small for the joint reader. So a creature with hands came out with stiff, open ones, and anything it held had to pass through the palm.

This gives a rig fingers, closes them around what the hand holds, and reads them from the clip with a hand model.

It's all optional. A rig.json without the new keys builds, solves and packs exactly as on main (checked below).

What's in it

  • Four optional rig.json keys (blender/common.py, blender/build_rig.py):
    • fingers: three bones per finger, folding toward the palm. Each finger's weights stay on its own finger.
    • points: joints the reader reads that ride on a bone. The hand bone now ends at the middle knuckle, and the index and little-finger knuckles ride on it, so three fixed points give the hand's roll.
    • props: a prop's own vertices follow its bone alone.
    • hold: a handle, as a capsule. The builder folds each finger onto it, thumb last.
  • The reference frame, the dataset and every export use that grip, or a loose curl for a free hand. Training poses get a random hand each, from open to a fist.
  • mocap/hands.py, after the fit: fingers and wrists from WiLoR, in both views. It's the finger tracking of prompt2rig, fitted to two cameras. The reader already knows where each hand is and which one it is, so no detector runs.
  • tools/capture.sh runs it when the rig has fingers and PROMPT2RIG_HQ is set. Without it the capture finishes with the fingers in their default pose.
  • Packs, loops and mirrored motions carry the fingers (blender/pack_glb.py, tools/shape_clip.py, mocap/mirror.py).
  • tools/hands_exam.py: a motion with known fingers in, centimetres out.
  • docs/hands.md, with pointers from the README, docs/PIPELINE.md and the rig and capture skills. plugin.json goes to 0.1.2, so installed plugins pick up the skills.

The fit and the gates aren't touched. mocap/solve.py only learns that a joint can ride on a bone.

Numbers

The exam: 168 frames, a biped holding a sword, its free hand opening and closing three times while the arm turns it every way. It's a clean render, so this is the best case.

the free hand, whole capture fingertips off hand's turn off
reader and solver only 7.4 cm 23°
with the hands step 2.4 cm 9°

Given the true joints, WiLoR puts fingertips 1.9 cm from the truth. MediaPipe Hands found the hand in about a third of each view's frames and was 5.2 cm off, so it isn't usable at this size.

Checked

  • Old creatures are unchanged. A creature without the new keys: rig_info.json and every skin weight identical to main. The dragon example (examples/dragon_roar): motion.json byte-identical to main.
  • A biped with a sword, on this branch: the rig, three H3 Max clips through tools/capture.sh, tools/score_takes.py and tools/pack.sh.
    • Two of the three takes pass the gates. The kneel is at 0.79 against 0.8.
    • The pack has four clips with fingers in each. A looped clip's fingers wrap with no seam.
    • Its reader was trained before the rebase onto main. The branch rebuilds the same rig and the same dataset samples (4 of 4 checked).
  • A rig with only the left hand given: the right hand is its mirror, at rest and posed.
  • Without PROMPT2RIG_HQ: the capture finishes with default fingers. Without a GPU the hand model still runs, slowly.
  • pyflakes: the same six warnings as main, none new.

Not in this PR

  • An example creature with fingers. The one this was built and tested on isn't in the repo or the release, so there's nothing here to run the hands path on yet. That's also why there are no pictures.
  • The tool that found that creature's finger points. It reads another project's rig. Until it's ported, the 20 points per hand are placed like any other joint.
  • Windows. The shell changes go through run_blender and pyout, but they haven't been run there.

Licence

  • No model or weights are added. mocap/hands.py only calls the hand models through their own packages.
  • WiLoR is CC-BY-NC-ND and needs MANO, which is non-commercial. docs/hands.md, the README's licence section and the capture skill all say so.
  • A hand reader trained the way the joint reader is would keep the whole chain clean. It isn't built.

🤖 Generated with Claude Code

rehan-remade and others added 3 commits November 10, 2026 15:40
A hand is about 40 px of the frame, so the reader can't see fingers: hands came out stiff and open, and a held prop
went through the palm. Four optional rig.json keys change that. "fingers" builds three bones per finger that fold
toward the palm, and keeps each finger's weights on its own finger. "points" are joints that ride on a bone, so the
reader reads three knuckles per hand, which stay put whatever the fingers do. "props" makes a prop's own vertices
follow its bone alone. "hold" closes a hand's fingers around a handle. The reference frame, the dataset, the GLB,
packs, loops and mirrored motions carry the fingers: as a motion gives them, or in their default pose.

A rig.json without the keys builds and solves exactly as before: rig_info.json, the skin weights and the dragon
example's motion.json are identical to main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
mocap/hands.py runs after the fit on rigs with fingers. The reader has already found each wrist and knuckle in both
views and the rig knows which hand is which, so each hand is cut out where it is and WiLoR reads it, with no detector.
The two views are blended by how squarely each sees the palm, the finger bones are aimed along their measured
segments, and the wrist is turned toward the measured palm. It's prompt2rig's finger tracking, fitted to two cameras.
tools/capture.sh runs it when PROMPT2RIG_HQ is set, and finishes with the fingers in their default pose when it isn't.

tools/hands_exam.py scores it on a motion with known fingers: over the whole capture, the free hand's fingertips go
from 7.4 cm off to 2.4 cm, and its turn from 23 degrees off to 9.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
docs/hands.md has the rig.json keys, the capture step, the exam and what isn't done. The README, docs/PIPELINE.md and
the rig and capture skills point to it. WiLoR is CC-BY-NC-ND and needs MANO, which is non-commercial: the README's
licence section and the capture skill say so. plugin.json goes to 0.1.2, so installed plugins pick up the skills.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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