Motion Retargeting
You spend a day in a motion-capture volume recording your best actor — a tall, long-legged performer
— walking, waving, leaning a hand on their hip. The take is gorgeous. Now the director says: put that
exact performance on Gnug the goblin, who is half the height with stubby legs and long
arms. You press play, and the magic evaporates. Gnug's feet skate across the floor like he's on ice; on
the next shot they sink ankle-deep into it. The hand that so naturally settled on the actor's hip now
hovers a fist's width out in empty air. The two hands that clasped in front now overlap and clip
through each other.
Nothing is wrong with the mocap. The problem is that the recording is a performance for one
body being replayed on a different body. Fixing that — carrying a performance faithfully from the
actor's skeleton onto a differently-proportioned character — is motion retargeting,
and it is one of the load-bearing pillars of every game and film pipeline that reuses captured or
hand-animated motion.
What a mocap clip actually stores
This is the crux, so let's be precise. A mocap clip is not a movie of world-space
positions frozen in stone. What the solver hands you is, for every frame, a root
transform (where the hips are and which way they face in the world) plus a
joint rotation for every joint down the skeleton — the shoulder's angle relative to
the chest, the elbow's angle relative to the upper arm, and so on down the chain.
World-space positions of the hands and feet are then computed by forward kinematics: start at
the root, and walk down each chain applying rotation then bone-length offset, rotation then
offset, joint by joint. Write a joint's world transform M_i as the product
down its chain from the root:
M_i \;=\; M_{\text{root}}\,\prod_{j\,\in\,\text{chain}(i)} R_j\,T_j,
where R_j is joint j's rotation (the part the
clip stores) and T_j is the fixed translation by that
bone's length (a property of the skeleton, not the clip). The angles are the
actor's; the bone lengths belong to whichever skeleton you feed them into. Copy the actor's angles onto
longer or shorter bones and the world-space endpoints — the feet, the hands — land somewhere else
entirely. That single sentence is the whole retargeting problem in a nutshell.
- A clip stores joint rotations (plus a root transform), not world-space
positions.
- World-space endpoints are rotations composed with bone lengths — so the same
rotations on a different-length skeleton produce different endpoint positions.
- Retargeting must therefore repair the things that live in world space —
contacts (a foot on the floor, a hand on a hip) and semantics
(hands that were meant to meet) — which raw angle-copying breaks.
Two things break: contacts and semantics
It helps to name exactly what goes wrong, because the two failure kinds want different fixes.
- Contacts are the places where the body touches the world or itself. A planted foot
on the ground, a hand pressed on a table, a fist resting on a hip. Get the bone lengths wrong and a
planted foot either sinks through the floor (target legs shorter than the actor's) or
floats above it (target legs longer). During a walk this shows up as the dreaded
foot slide (or "foot skate"): the foot that should be locked to the ground while
the body passes over it instead drifts, because the stride length the angles encode no longer
matches the character's leg length.
- Semantics are the meaning of a pose that isn't about the floor: two hands
that clasp, a hand that lands on the hip, fingertips that touch the chin. These are relationships
between body parts, and they, too, are world-space (well, character-space) positions that
angle-copying quietly wrecks.
Two broad approaches
There are two fundamentally different ways to move a performance onto a new skeleton, and understanding
the trade-off between them is the heart of this topic.
- (1) Copy joint angles. Map each source joint to its target counterpart and copy
the rotation R_j straight across. This preserves the actor's
style perfectly — every bend and lean is exactly as performed — but it does
nothing to protect world-space contacts, so on different proportions feet slide,
sink or float and clasped hands miss.
- (2) Preserve end-effector positions. Decide where the hands and feet
should be in the target's world (feet on the ground, hand on the target's hip) and use
inverse
kinematics to solve the joint angles that put them there. This
nails the contacts — but every angle IK changes is an angle that is no longer the
actor's, so some of the performance's style is lost.
Neither pure approach is the answer. Angle-copying alone gives you sliding feet; pure IK alone gives
you clean feet but a stiff, de-styled performance where the character no longer moves like your actor.
Real pipelines blend the two: copy angles as the base to keep the style, then run IK
only where it matters — on the contact frames — to snap feet and hands back where they belong.
The standard pipeline
Almost every retargeting tool, from a game engine's humanoid retargeter to a film-grade solver,
follows the same four movements.
- Map the skeletons (bone correspondence). Build a dictionary that says "source
left-upper-arm ↔ target left-upper-arm", and so on for every bone. Humanoid rigs use a shared naming
convention (a "humanoid avatar") so this map is mostly automatic; custom rigs need it by hand.
- Reconcile rest poses. The actor might be captured in a T-pose (arms straight out)
while the character is authored in an A-pose (arms angled down). Copying raw local rotations across
two different rest poses shears the arms. The fix is to copy the rotation relative to each
skeleton's own rest pose: strip the source's rest offset before copying, then re-apply the
target's. Angles then mean the same thing on both bodies.
- Copy the rotations. With the map and rest-pose reconciliation in place, copy each
joint's rotation from source to target, frame by frame. After this step you have a full-length
performance in the actor's style — and, on different proportions, broken contacts.
- IK passes to restore contacts, with scale compensation. Detect the contact frames
(which feet are planted, where hands should touch), then IK-solve the leg and arm chains to pin those
endpoints back to the floor or the hip. Alongside this, rescale the root motion by
the hip-height ratio so the character's stride matches its own leg length instead of
the actor's.
Scale compensation: the numbers
The single most useful ratio in retargeting is the hip-height ratio (equivalently,
the leg-length ratio). If the actor's hip sits at height h_s when standing
and the character's at h_t, define
\sigma \;=\; \frac{h_t}{h_s}.
Multiply the root's horizontal translation (and hence the per-step stride) by
\sigma and the character now covers ground in proportion to its own legs.
Skip this and a short character replaying a tall actor's root motion will overshoot — the root
glides further than the legs can carry it, and every planted foot must slide to keep up. Scaling the
root by \sigma removes the bulk of the slide before IK even runs; the IK
pass then cleans up whatever residual remains on the contact frames.
The same pose on two bodies
Below, the identical set of joint angles is applied to a tall skeleton (the actor, left) and a short
one (the character, right). Both have had their planted feet IK-locked to the same floor
line: notice the ankles sit exactly on the contact plane in both panels even though the leg
bones differ in length. Without the IK lock, the short character's feet — driven by the tall actor's
hip height — would hang above this line. The upper body keeps the actor's lean and arm carriage (style
preserved); only the leg chain was re-solved to honour the contact.
This is the picture to keep in your head: the pose's shape (the angles) is shared, but the
contact (feet on the floor) is enforced separately on each body. Retargeting is the machinery
that keeps both true at once.
Worked example: a tall actor's walk on a short character
Suppose the actor stands with a hip height of h_s = 1.00\,\text{m} and a
comfortable walking stride (hip travel per step) of 0.80\,\text{m}. The
character is shorter, with hip height h_t = 0.60\,\text{m}.
Naïve angle copy. Copy every joint rotation, including the root's horizontal
translation, straight across. Each step, the character's root advances the actor's full
0.80\,\text{m} — but its legs can only reach so far, so the planted foot must
slide forward about
0.80 - 0.60\cdot\tfrac{0.80}{1.00} = 0.80 - 0.48 = 0.32\,\text{m} per step to
keep up. That is a gross, skating slide: the feet are clearly not gripping the ground.
Scale-compensated root. Apply \sigma = h_t/h_s = 0.60 to
the root translation. The stride shrinks to
0.80 \times 0.60 = 0.48\,\text{m} — matched to the character's own legs. Most
of the slide vanishes immediately.
IK foot-lock on contact frames. For each frame where a foot is flagged as planted, IK
pins that ankle to its ground position from the moment of contact until lift-off, so the residual
creep goes to zero and the foot reads as truly gripping. Meanwhile the spine, arms and head still carry
the actor's copied angles, so the character keeps the performance's swagger. Sliding fixed, style kept —
that's a good retarget.
Extra joints, missing joints, and odd rest poses
Skeletons rarely match one-for-one, and the bone-correspondence step has to cope.
- Extra joints on the target (a tail, a third spine bone, a longer neck chain): they
have no source to copy from. Leave them at their rest pose, drive them procedurally
(a wagging tail), or distribute a mapped joint's rotation across several target bones so a long chain
bends smoothly.
- Missing joints on the target (the actor has three spine joints, the character
one): fold the source rotations together — compose the missing chain's rotations into the single
target joint so the overall bend survives even if the fine subdivision doesn't.
- Different rest poses (T-pose source vs. A-pose target): always copy rotations
relative to each skeleton's rest pose, as in the pipeline's step 2, never as raw local
values — otherwise a limb that was straight in the source ends up bent in the target by exactly the
rest-pose difference.
Money and consistency. A modern game might have hundreds of characters — humans, dwarves, ogres,
children — sharing thousands of animations: idles, walks, runs, combat moves, emotes. Capturing or
hand-keying every clip afresh for every body shape would be astronomically expensive and would make the
library impossible to keep coherent (fix the "tired walk" once and every character should inherit the
fix). Retargeting lets one shared animation library drive an entire cast: author the
motion once on a reference skeleton, then retarget it onto everyone. The whole humanoid-animation
economy of game engines rests on it.
Two opposite mistakes bite beginners. Angle-only retargeting (copy the rotations and
stop) feels tempting because it perfectly preserves the actor's style — but it is
blind to world-space contacts. On any character whose proportions differ from the actor's, the
feet slide across the floor or clip straight through it, and clasped hands drift apart. It looks fine on
the actor's own skeleton and only breaks when proportions change, so it sneaks past casual review.
The over-correction is position-only retargeting — solve everything with IK
to hit exact endpoint targets. Now the contacts are perfect, but you have thrown away the joint angles
that carried the performance: the result is stiff, generic, and no longer moves like your actor. The
elbow that swung with a particular flourish is now just wherever IK put it.
The professional answer is neither extreme. Blend both: copy angles everywhere to keep
the style, and IK-correct only the contact frames — the moments a foot is planted or a
hand must touch — leaving the free-flight frames on the copied angles. Contacts fixed, style intact.