0
$\begingroup$

I am looking for a method to automatically retarget facial bone actions between two identical rigs with different morphology, so that poses from the source rigs can be used on the target rig. Relevant is really only the translation component for each animation curve, because rotations are used much less in facial animation.

The best method I found so far is to take the dimensions of the source and target rig and calculate a scaling vector (per axis) based on the difference. In short:

scaling_vector = target_dim / source_dim

Just to make things clearer, here are two poses applied to the same Rigify rig: enter image description here

I am looking for better algorithms to solve this task and ideally respect the relative distances between bones in the source and target rigs.

$\endgroup$

1 Answer 1

0
$\begingroup$

I found a satisfying solution. Instead of scaling the entire animation based on one factor (see above), I am calculating the difference in direction and orientation for all bones in source and target rig. This allows me to calculate pretty accurate scaling factors for each bone in each pose.

  1. Calculate vectors for each bone to all other bones in both rigs (rest pose).
  2. Go through each pose and get the translation vectors for each bone in world space.
  3. Find the closest matching vector in the source rig (from 1) by comparing distance and orientation.
  4. Find the same vector in the target rig (from 1).
  5. Get the scaling based on the difference in length for these two vectors.
  6. (optional) get the rotation difference for the two vectors.
  7. Apply the scaling (and rotation) to the translation vector.
  8. Create new keyframe

I am using this to scale a pose library between rigs of the same structure and it's very accurate on the rigs I tested so far. I am not sure if this would work very well for an entire animation. The biggest limitation is that it only works for rigs with exactly the same bone naming and structure.

I am still interested in other solutions, if anyone reading this has experience with bone retargeting.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .