Animation Retargeting (Different Skeletons)

Retargeting animations for use between different skeletons.

Windows
MacOS
Linux

Retarget1_1.jpg

Note: This feature is not available before Engine Version 4.5

Animation Retargeting (Different Skeletons) allows animations to be reused between characters that do not share the same Skeleton asset. This is different from Animation Retargeting , which involves retargeting animations between characters that share the same Skeleton asset.

Rigs allow you to retarget animations for characters that have different Skeletons by passing Bone information from one Skeleton to another. After selecting your Rig, you can share it between your Source Skeleton and a Target Skeleton (the Skeleton you wish to retarget animations to). Then, you match up the Target Skeleton's Bones to the Nodes stored in the Rig.

Once all the Bones in the Target Skeleton have been setup in the Rig, you can then retarget animations that are used by your Source Skeleton to your Target Skeleton. You can even retarget entire Animation Blueprints along with all its associated data, which saves time if you want to quickly move all animation assets from one Skeleton to another.

Getting Started

In order to get started with animation retargeting between different skeletons, you will need to select a Rig asset for both Skeletons to share. This section will show you how to access the Humanoid Rig that comes as part of the Engine Content and assign it for use.

For this walkthrough we are going to use two asset packs available for free in the Marketplace that have multiple skeletons and animations in it that we can use to retarget.

If you have two Skeleton Assets ready to use, you can skip the note below and use your assets. If you do not, you can add the two packs outlined below.

In the Marketplace, search for the following packs:

  • Animation Starter Pack: We will be using the UE4_Mannequin_Skeleton as our Source Skeleton.

  • Paragon: Phase: Phase will be our Target Skeleton for this example, but any of the Paragon heroes will work if you wish to choose another.

Then, in the Unreal Launcher, find the pack and select Add to project. You can select any project for this guide.

Setting up the Rig

The steps below will show you how to access the default Rig and retarget animations:

  1. The steps below will show you how to access the default Rig and retarget animations:

  2. Inside the Content Browser navigate to the AnimStarterPack/UE4_Mannequin/Mesh folder and open the UE4_Mannequin_Skeleton asset.

  3. Click Retarget Manager in the main toolbar. Go to the Set up Rig tab, and from the Select Rig dropdown, choose Select Humanoid Rig.

    !

  4. Click Save and minimize the window.

  5. Inside the Content Browser navigate to the ParagonPhase/Characters/Heroes/Phase/Meshes folder and open the phase_skeleton asset.

  6. Click Retarget Manager in the main toolbar. Go to the Set up Rig tab, and from the Select Rig dropdown, choose Select Humanoid Rig.

    !

Retargeting Bones in the Rig

  1. With the Rig assigned, next you will need to match up the Source Skeleton to the Target Skeleton Bones. There are two ways to do this, one automated and the other not-automated. To use the automated feature, under Select Rig on the Target Skleleton, select Automap. This will automatically port over the Bone assignments from the Source Skeleton.

After using Automap, we recommend checking the Target assignments to verify the automap brought over all assignments correctly.

To manually make the assignments, compare the Source Skeleton rig with the Target Skeleton rig. There are two configurations you can use while adjusting the Rig, Base or Advanced. The Base Configuration uses the key elements that are needed to ensure the animation is successfully retargeted. The Advanced Configuration allows you to include and specify additional Bones that should be included as part of the retargeting process.

For example, if the left and right hands were included as part of the retargeting process, but individual fingers were not. Retargeting an animation with the Base Configuration will ensure that the base motion is copied to the new Skeleton, however if the Source Skeleton had animated fingers and the Target did not, the retargeted animation would not animate the fingers and you would have stiff looking hands. You may encounter situations where there may be additional Bones in one Skeleton that are not included in the other; you can omit these as adjustments can be made to the Target Skeleton to account for this.

Under Character > Bones check or uncheck Bone Names to toggle the names on and off. This is helpful when making adjustments to the rig.

Testing the Rig

  1. In the Content Browser, under AnimStarterPack, select an animation that you want to retarget to the new Skeleton.

  2. Right-click on the animation and choose Retarget Anim Assets > Duplicate Anim Assets and Retarget.

    RT_DuplicateAnim.jpg

  3. In the Select Skeleton window, you should see your Skeleton in the upper portion of the window, select it and click Select.

    retargetanim.png

  4. A copy of the animation you selected to retarget will be created in the same folder of your Target Skeleton, and this animation can now be used with your character.

    retargeted_phase_anim.png

Retargeting Adjustments

When setting up a Rig to share between Skeletons, you may encounter situations when one Skeleton has additional Bones that the other does not have (in the Getting Started section, if you used Skeletons specified in the example, you may have noticed extra Bones in the Mixamo Skeleton's hands for example). This can sometimes cause issues but can be fixed by recursively setting translation retargeting to the Skeleton.

For example, here is a shot before adjustments:

Retarget13.png

Notice how the fingers appear contorted due to the extra Bone not specified during the Rig set up.

Here is an example after adjustments were made:

Retarget15.png

You can specify Bone Translation Retargeting through the Skeleton Tree view. Here we are Right-clicking on the last digit in each finger and setting Bone Translation to Recursively Set Translation Retargeting Skeleton.

Retarget14.png

Retargeting an Animation Blueprint

After setting up a Rig for two Skeleton assets to share, if there is an Animation Blueprint associated with the Source Skeleton, you can retarget it for use with your Target Skeleton.

  1. Right-click on an Animation Blueprint and select Retarget Anim Blueprints -> Duplicate Anim Blueprints and Retarget.

  2. Highlight your Target Skeleton and press Select.

All the assets and logic associated with the Animation Blueprint (Animation assets, Blend Spaces, etc.) will be copied and placed in the same location as your Target Skeleton.

animblueprint_remap.png

Phase is a specific character with her own unique kit, so some of the Mannequin Animations may not map to Phase correctly. For the purposes of explaining remapping, this is not a significant issue.

Retargeting a Base Pose

There may be instances where you want to retarget animations to a Skeleton that is slightly different than the base pose of your Source Skeleton. For example, let's pretend that Phase's default pose set her spine at an angle to left instead of centered, like the Mannequin.

base_pose_new_phase.png

If you try to retarget any animations from the Mannequin to Phase, the animation will not show correctly because the base poses are different. To avoid this, you can retarget the base pose of the Source Skeleton to the Target Skeleton to make sure they are both the same.

base_pose_mismatch.png

  1. To retarget the base pose, in your Target Skeleton, go to Manage Retarget Base Pose.

  2. Select View Pose to see the current pose. To edit the pose, click on the skeleton and use the Rotation (E) widget to adjust the pose. In this view, you can only adjust certain parts of the skeleton, such as the spine and pelvis. If you adjust the skeleton select Modify Pose > Reset to revert any manual adjustments you made and restore the pose to the original pose. To save any manual adjustments to the current pose, select Modify Pose > Use Current Pose. This saves the pose you adjusted as the default pose.

  3. Something something here...Checking bullets and numbers working properly.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback