Skip to content

Rig Calibration.en

Claude Code edited this page Nov 20, 2026 · 2 revisions

Rig Calibration

中文 · English

Correct bone names are not calibration. An FBX A-pose is not Minecraft's arms-down neutral pose, and a high-heeled foot axis cannot reuse flat-shoe parameters.

Humanoid mapping

The humanoid table in profile.json maps semantic roles to real node names:

{
  "humanoid": {
    "hips": "Hips",
    "spine": "Spine",
    "chest": "Chest",
    "neck": "Neck",
    "head": "Head",
    "right_upper_arm": "UpperArm.R",
    "right_forearm": "Forearm.R",
    "right_hand": "Hand.R",
    "right_thigh": "Thigh.R",
    "right_shin": "Shin.R",
    "right_foot": "Foot.R"
  }
}

The left side is the semantic role; replace the right side with your model's real names. The workbench panels use the same role names. Missing hand roles omit that physical hand mount.

Axis correction

Each humanoid binding can be an object with node, referenceRotation and nativeRotation:

{
  "right_upper_arm": {
    "node": "MyArm.R",
    "referenceRotation": [0, 0, 0, 1],
    "nativeRotation": [0, 0, 0, 1]
  }
}

Both rotations are normalised XYZW quaternions, defaulting to identity. referenceRotation keeps its original rotation-axis correction meaning; nativeRotation post-rotates the imported bind-local rotation when constructing the native pose candidate, preserving local translation and signed scale and leaving source nodes, skin bind offsets, imported clips and unselected channels untouched.

How to calibrate:

  • align the upper arm and forearm to the native neutral direction first, then the wrist/palm
  • do the same for thighs and shins
  • preserve the intended shoe/sole orientation; a high-heeled foot bone need not point horizontally
  • measure every limb against its actual imported bind data — do not copy quaternions from another rig
  • derive headLook.forward from the real skin bind pose so it points at the model's face

The controller uses SkinBindPose.locals as reference; the pose stored in the node tree and the inverse bind pose can differ.

root and body branches

humanoid.hips is used to measure body proportions. Some rigs place the spine and pelvis in sibling branches under a shared control node; for those, map the common ancestor separately:

{
  "humanoid": {
    "root": "All",
    "body": "All",
    "hips": "Hips",
    "spine": "Spine1",
    "chest": "Spine2"
  }
}
  • root receives the whole-character renderer rotation, including swimming and elytra pitch.
  • body anchors native torso translation and bend.
  • Both are optional and fall back to hips, keeping existing pelvis-rooted rigs working.
  • Choose ancestors that cover the intended branches. Mapping hips to the shared control node loses the anatomical reference used for body proportions.
  • root and body may be the same node without applying the body blend twice.

Verification boundary

Unit tests cover strict profile parsing, candidate-only calibration, preserved bind data, clip behaviour with native disabled, a calibrated hand following root rotation, contact-weight lifecycle and the articulated knee hierarchy. The external FBX calibration tool checks limb directions numerically.

Bed/vehicle contact, swimming, elytra, sleep, death and model-specific finger grips still need separate visual checks. The offline tool lives in tools/avatar-validation/ in the repository.

Clone this wiki locally