Rig Lab

The skeleton drifting behind the front page is not a video and not an animation library. It is a hierarchical rig with forward kinematics, quaternion pose blending, and a closed form solver, written from scratch and running in your browser right now. This page hands you the controls.

Grab a wrist or an ankle and pull. Every number below is read out of the running system.

Wireframe humanoid rig with octahedral bones, standing in bind pose

FK / IK match

An animator blocks a shot in FK, then switches a limb to IK to plant a hand. If the rig does not match the two solvers on the way through, the pose jumps on the frame of the switch and the take is ruined. Matching means reading the pose out of one solver and feeding the other the inputs that reproduce it.

Switch a limb below. Then turn matching off and switch again to see what the fix is actually preventing.

Drag to solve

Two-bone IK in closed form: law of cosines for the joint angles, a pole vector to choose the plane the elbow or knee breaks into, no iteration and therefore no jitter. Drag an effector past the limb's reach and the chain stops at full extension and says so, rather than letting the hand tear away from the target the way a naive solver does.

Put a limb in IK above, then drag its wrist or ankle in the viewport. Pole twist spins the break direction around the limb axis.

Why quaternions

Blending between two poses is the most common operation a rig performs and the easiest one to get subtly wrong. Spherical interpolation holds a constant angular rate between two orientations. Normalized linear interpolation is cheaper, looks almost right, and quietly eases: slow at the ends of a rotation, fast through the middle.

The two agree exactly at both ends of a blend and again at its midpoint, so checking the wrong frame proves nothing. They pull apart in between, twice per segment. On this rig the gap peaks a little over three degrees.

Scrub, and watch the divergence readout rise, fall to zero, and rise again.

Joint inspector

Every joint carries a bind offset from its parent and a local rotation. World space is what falls out of walking that tree from the hips down. Click a joint in the viewport to read its actual state.

Diagnostics

Measured, not estimated. The FK figure is the wall clock cost of evaluating the whole skeleton once, sampled over the last second of frames.

Source

The solver, the matcher, and the FK walk are each a small pure module with unit tests covering the properties that matter: bone lengths hold, reach clamps honestly, and a matched switch reproduces the pose it came from to within floating point noise.

Built in Dammam with TypeScript, Three.js, and no animation library.