jeremy 760cf12788 feat(characters): hair-fit measurement + head-features contract
Ozan's hair system rebinds Quaternius styles (100% rigid to one Head bone) onto
whichever body loads, corrected by three hand-tuned constants in
CharacterBuildData.HeadFit. Those constants are only valid against the skull they
were tuned on, and nothing re-checks them when a body is rebaked. Both ship bodies
are currently wrong, in opposite directions.

tools/measure_head_shell.py:
  --fit     solve HeadScale/HairOffset from two cranium landmarks. A scale-about-
            pivot plus a translate has exactly two degrees of freedom per axis, so
            the crown + widest-cranium slice determine both outright -- no bed pass.
  --sweep   score every style against the clearance it was AUTHORED with on its own
            stock rig (a mohawk stands proud, a beard hangs at the chin -- absolute
            crown height is not the test).
  default   full Head-weighted shell AND the cranium band. The full shell is what
            MakoHeadFit quotes; it is inflated several cm by jaw/ear/neck weight
            bleed and is not the surface a cap sits on.

Measured against the shipped GLBs:
  Lena  cranium needs Y 0.960, carries 1.431 (+49%) -- every style floats 4.4-7.3cm
  Mako  cranium needs Y 1.186, carries 1.346 (+13%) -- every style sinks, buzz cut
        2.2cm into his skull, moustache 8.0cm low
Solved constants take Mako to 0.00cm worst error over 10 styles, Lena to 0.29cm mean.

docs/characters/head-features-contract.md records the system, the measurements, and
what a 3-constant fit still cannot reach: Lena needs 1.613 in X but 1.311 in Z, a
23% anisotropy that stretches an authored cap sideways and drags ear cutouts along a
diagonal. That is Ozan's logged residual and wants a per-body geometry bake. Mako's
anisotropy is only 3%, so constants alone should suffice for him.

Also noted: the whole hair set shares just two base textures, so "authored per-colour
hair textures" -- the fix the wiki writes off in favour of the /0.55 swatch hack --
is 16 PNGs.

Crown placement is rest-pose arithmetic; X/Z and the in-bed look are unverified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 16:07:34 -07:00

animation

Jeremy's animation-pipeline hub AND the Mac↔PC bridge for converting files and implementing animations. iClone 8 + Video Mocap live on the PC; Blender 5, the retarget tools, and the ariki-game repo live on both. This repo carries the skills, tools, and the files in flight between machines.

Bridge workflow (Mac↔PC)

  1. PC: export FBX from iClone (Blender preset, Range=All, Preserve Bone Names ON) → drop into exchange/incoming-fbx/ → commit + tinqs push.

  2. Either machine: tinqs pull, run the retargeter →

    blender --background --python tools/cc_retarget.py -- \
      --src exchange/incoming-fbx/<take>.fbx \
      --out exchange/converted-glb/<pack>.glb --name <ClipName> \
      --target <path-to-ariki Superhero_Male_FullBody.gltf>
    

    → commit the GLB + tinqs push.

  3. Implementing machine: copy the GLB into ariki-game assets/quaternius/dancegen/ (auto-discovered by ClipCatalog as <pack>/<ClipName>), add a dance JSON, verify in the dance test bed.

  4. Optional: reference footage for QA goes in exchange/reference-video/.

Large binaries (.fbx, .glb, .mp4, .task) ride Git LFS — see .gitattributes. Clean out exchange/ folders once a take has shipped into the game repo.

Layout

  • .claude/skills/ — Claude Code skills (auto-discovered when running Claude here)
    • animation-creation/ — creating clips on the shared Quaternius skeleton: existing packs, Mixamo/Kevin retargeting, composite baking, dance JSON (paths reference the ariki-game repo)
    • iclone-video-mocap/ — iClone 8 + Video Mocap plugin advisory: filming rules, workflow, cleanup, FBX export, game integration
    • pose-estimation/ — MediaPipe video→pose-landmark extraction (scripts/extract_pose.py, compare_poses.py; models in models/, venv rebuilt via scripts/setup.sh)
    • retarget-animations/ — deprecated early retarget notes (kept for history)
  • tools/ — Blender-headless retargeters (all bake onto the Quaternius rig and export mesh-stripped GLB, one NLA track per clip)
    • cc_retarget.py — Reallusion CC/iClone CC_Base_* FBX (60fps; TempMotion guard)
    • mixamo_retarget.py — Mixamo FBX (prefix auto-detect)
    • kevin_retarget.py — Kevin Iglesias Unity FBX (B-* rig; hardcoded target path — non-portable)
    • mocap_retarget.py — MediaPipe pose JSON → GLB (rotation solving, no source armature)
    • bake_run_punch.mjs — composite upper/lower clip baking reference
  • AGENTS.md / .agents/ — agent context (identity, wiki, plans, rules); see AGENTS.md for the knowledge map

Canonical target rig

All retargeters default to ariki-game's assets/quaternius/base-characters/.../Godot - UE/Superhero_Male_FullBody.gltf via a repo-relative path — when running from this repo, pass --target with an explicit path to that GLTF (or a local copy). Output GLBs are consumed by ariki-game's ClipCatalog from assets/quaternius/{kevin,mixamo,dancegen}/ as <pack>/<ClipName>.

Provenance

Copied (not yet removed) from ariki-game tools/ + .claude/skills/ + .agents/plans/, and ~/.claude/skills/pose-estimation. The ariki-game originals are still in place; the Windows-side iClone FBX conversion handoff (ariki-game/.agents/handoff/iclone-fbx-conversion.md) depends on them.

S
Description
No description provided
Readme 5.3 GiB
Languages
Python 97.3%
HTML 1%
JavaScript 0.7%
Roff 0.7%
PowerShell 0.2%