Motion Transfer

Motion Transfer Tools

The Motion Transfer Tools are designed to transfer the Animation of an imported BVH file to an Avastar rig. So you will typically first create an Avastar character (the Target), then import the Animation, map it to Avastar, and finally transfer the Motion to the Avastar Timeline.

In a Nutshell

[PS Showtime url=”http://blog.machinimatrix.org/wp-content/uploads/2014/08/map_retarget.png”]
  • Create a new Avastar Character (or use an existing one).
  • Import your BVH animation file.
  • Map the corresponding Bones.
  • Transfer the Animation.
You find the entire import functionality in the Tool Shelf, Animation Tab, in the Motion Transfer panel.

Loading an animation file

Blender supports the import of BVH files out of the Box. You find the importer in the Top menu at:

File -> Import -> Motion Capture
retarget_02
retarget_01

Bvh File imported with wrong scaling

Note: You probably have to set the Scale factor to match the imported Armature and the Avastar armature. Otherwise you can easily end up in a situation like in the image aside.

Fixing Scaling

Even if the BVH Scaling matches roughly to the Avastar size, in most cases the match is not perfect. Because of this we have added the Match Scales function.

After you have imported the BVH file, You find the Match Scales tool in the vertical Tools Shelf Animation tab, in the Motion Transfer panel. we get back to this again in a moment.

retarget_03

This function rescales the imported Animation rig to match the Avastar rig’s Skeleton. but note, we only rescale along the Z-Axis. X and Y always get the same scale than

Mapping bones

When you import a BVH file, then the used Bones can have arbitrary names. Also your animation Rig can have different bones than the target Rig. This issue can be solved by using a Bone Map.

When it is collapsed, then the Bone map is hidden inside the Guess mapping button. You can expand the Map by clicking on the small + Icon left to that button.

A list of Bones shows up. The left column (Target) is a read only list of Bones in the target Rig (Avastar in our case). While the right Column is a list of bone names which appear in the just imported Rig. Initially the Map is empty and you have to fill it manually.

retarget_04

However, we have added a Map Guessing tool, which works nicely for Animations that already have been made for SL. You can just test the Guessing tool and see if your imported Animation rig is recognized. In the case above the guessing tool has identified the Animation Rig to be an SL/OpenSim compatible rig, thus all available Bones are automatically assigned and we do not need to bother with that.

Mapping utilities

The Bone picker lets you select one Source bones from the Animation rig and manually map it to a bone on the Target rig:

  • Open the Animation source Rig in pose mode
  • Select a bone
  • Click on the corresponding assign icon in the map (see image)
retarget_06

Now the source bone is assigned to the corresponding target bone (In the example rThig of the Animation Source is assigned to HipRight in the Avastar target)

The Range Mirror Copy lets you copy the limbs. Thus you only need to assign one half of the bones, then use this tool to automatic fill the symmetric bones on the other side.

  • Assign one side of your animation source Rig to the corresponding bones in the Avastar rig
  • Click on Mirror Copy to transfer the assignments to the other side of the Rigs.

The Clear Tool removes all associations in the Bone Map.

retarget_05

Pose tools

In order to transfer the animation we not only need the Bone Map, but we also need one timeframe in which the Source animation and the target animation use the same pose (at least a closely matching pose). This Reference Frame will then be used as guideline for the transformation tool.

Note: The Reference Frame does not need to be part of the transferred set of timeframes. Actually in most cases the timeframe 0 is not used by the imported Animation. So it can be used to create a matching pose.

retarget_07

Create a reference Frame

The following approach is only one possible way to go. This works nicely when both the target rig and the Avastar rig use the same rest pose (namely the T-Pose). The workflow is as follows:

  • Set the timeline to timeframe 0 (or any timeframe that is convenient for you)
  • Ensure the Avastar Rig is in Rest pose.
  • Open the Source Animation rig in pose mode
  • Select all Pose bones
  • Reset scale, rotation and Transformation (ALT +S, ALT +R, ALT +G)
  • In the Viewport press “i” and select “Rotation”. This creates a new keyframe for the Rest Pose.
  • Ensure the RefFrame in the Motion Transfer Panel is set to the timeframe where you just added the T-Pose (timeframe 0)
  • Now you are prepared to Transfer single poses or the entire Motion (see below)

Transfer Pose

Provided that the RefFrame contains the same Pose for the Animation Source Rig and the Avastar Target rig. In that case the Transfer Pose tool transfers the pose of the current timeframe from the Source rig to the currently selected Bones of Avastar Rig. You can select whichever timeframe you want to copy.
This is the timeframe as it looks after the Pose has been transfered:[break] retarget_10

Note: Timeframe 0 contains the Reference pose, while timeframe 1 has been transfered from the imported animation to the Avastar timeline.

retarget_08

Timeframe 1 before pose has been transfered

retarget_09

Timeframe 1 after pose has been transfered

Match Scales

The match scales function rescales the imported Animation rig such that it matches the Avastar rig. In detail the Rigs are compared in their Rest Pose. And actually it is the ratio of the Skeleton heights (Z) which determine the scale factor. Of course this approach only works when the Source Rig and the Avastar Rig have comparable topology.
retarget_11
retarget_12

Before Match Scales has been applied

retarget_13

After Match scales has been applied

 

Make Seamless animations (experimental)

This tool is used when you want to create a periodic Animation cycle. Lets assume your imported animation was not exactly created for looping. then this tool can be used to interpolate rotation changes and location changes such that the first frame and the last frame of the animation loop smoothly.
retarget_14

The numbers define the timeframe range over which the easing shall take place.

Simplify (experimental)

Simplify can be used to reduce the number of keyframes used in the imported Animation. We provide 3 options here:

  • No Simplification (default)
  • Lowes Global
  • Lowes Local
Note: The Simplify feature makes only sense when your animation contains hundreds of keyframes. This mostly happens when you import motion captured animations. Handle this feature with care.

These simplification methods are described nicely by Eyuphan Bulut in a scientific paper about
Keyframe extraction from Motion data

Transfer Motion

The most important function in this panel is the Transfer Motion function. This will transfer the motion stored in your imported animation timeline to the Avastar timeline.

You have to ensure that all parameters as explained above are correctly set. otherwise your animation will become distorted.

retarget_15

The little white cross is a nice helper tool too. Lets say you have found your animation is broken in the Avastar timeline, then you can wipe it out by clicking on this erase button.