Retargeting Animations onto a MetaHuman

A guide to walk through the requirements, setup, and process of retargeting exisitng animations onto a MetaHuman

Windows
MacOS
Linux

Animation retargeting is a feature of Unreal Engine that enables animations to be reused between characters with the same Skeleton Asset but that may have different proportions or additional bones. Through retargeting, you prevent your animated skeletons from losing their proportions or becoming unnecessarily deformed when using animations from differently shaped characters. Retargeting also makes it possible to share animations between characters that use different Skeleton Assets as long as they share a similar bone hierarchy and use a shared asset called a Rig to pass animation data from one Skeleton to another.

For our MetaHuman characters, they have a similar—but expanded—bone hierarchy to the Unreal Engine Mannequin's skeleton. This guide will take you through the necessary steps to retarget the UE4 Mannequin to the MetaHuman one.

For more in-depth information about animation retargeting, take a look at:

Prerequisites to Following This Guide

Before beginning this guide, download and add the Animation Starter Pack from the Unreal Engine Marketplace to your MetaHuman sample project. This pack contains the UE4 Mannequin and a variety of animations that you can use with the MetaHuman characters.

1 - Setting up the Retarget Pose

Before you can retarget animations from the UE4 Mannequin (or any other mannequin) to another, both Skeleton Assets should have a similar bone hierarchy and share an identical target pose. This makes it possible to retarget with few or no errors.

The MetaHumans sample project comes with Pose Assets for male and female characters that match the A-frame pose the UE4 Mannequin has. This ensures that retargeting the mannequin's skeleton onto the MetaHuman skeleton will be successful.

If you want to retarget your own skeleton, it is possible to manually pose your skeleton within the UE4 editor; however, this is not recommended because the skeletons should share a precise pose to work correctly. Instead, we recommend using a DCC application, such as Maya, and manually adjust the poses between both the source and target skeletons.

  1. Open the SK_Mannequin_Skeleton Asset located in the AnimStarterPack/UE4_Mannequin/Mesh folder.

    1_1_MannequinSkeletonEditor.png

  2. Open the metahuman_base_skel Asset located in the SampleMetaHumans/Common/Female/Medium/NormalWeight/Body folder. The MetaHuman Skeleton is shared by both the male and female characters, and will help simplify retargeting the UE4 Mannequin animations to them.

    1_2_MetaHumanMaleSkeletonEditor.png

  3. In the MetaHuman Skeleton Editor, go to the Preview Scene Settings panel. We'll need to set the Preview Mesh (Skeleton) to the male or female character, depending on which one we want to use to retarget animations. By default, it is set to the female character (f_med_brw_body_skmesh). This guide uses the male character. Use the assignment selection and choose m_med_nrw_body_skmesh. This step is important because this Skeleton Asset is shared between multiple characters.

    1_3_SkelEdt_AssignPreviewMesh.png

  4. In the Skeleton Editor for each skeleton, use the main menu to open the Retarget Manager found under the Window menu. It should open and dock on the left side of the editor.

    1_4_RetargetManager.png

  5. It's important that each skeleton (source and target) shares the same pose for the retargeting process. The MetaHuman Skeleton must match precisely to that of the UE4 Mannequin. To do this, you will use a Pose Asset created specifically for the male and female skeletons in this sample. At the bottom of the Retarget Manager panel, click Modify Pose and use the assignment box to select RetargetPoseMedAvgMale_PoseAsset.

    1_5_ModifyPose_SelectPoseAssetFile.png

  6. Click Import to use the Pose Asset that matches the UE4 Mannequin Skeleton. You can use the Hide/View Pose button to compare the differences.

Your MetaHuman Skeleton now has the precise matching orientation and position of bones to the UE4 Mannequin that will make retargeting later a success. Using this pose does not change the proportions of your MetaHuman Skeleton.

Default MetaHuman Pose

Modified MetaHuman Pose

2 - Defining the Retarget Rigs for Each Skeleton

During this step, you will set the type of rig the Skeletons use during the retargeting procedure. Since both are bipedal humanoid characters, use the Humanoid Rig that's included with Unreal Engine. It uses information from the skeleton's bone hierarchy to retarget the UE4 Mannequin to the MetaHuman one.

Both of our skeletons share similar bone structures with the exception that the MetaHuman has additional bones, like the hands and neck. We'll use this step to remap the ones in the neck of the MetaHuman so that they retarget correctly.

  1. In the Retarget Manager panel, under the Set up Rig section, use the Select Rig dropdown to select Humanoid Rig. The columns will populate with Source and Target bones. The Target column contains dropdowns to remap select bones in the hierarchy.

    2_1_SelectRig.png

  2. Repeat Step 1 for both the UE4 Mannequin Skeleton and the MetaHuman Skeleton.

  3. The MetaHuman Skeleton requires several bones to be specifically remapped. Use the Target column to select the bones listed below and the dropdown to remap them to the specified bone.

    2_3_SetTargetSpineBones.png

    1. spine_01 -> spine_02

    2. spine_02 -> spine_03

    3. spine_03 -> spine_04

  4. Click Save Do this for each Skeletal Mesh Editor.

This step is important for the simple reason that the MetaHuman Skeleton contains additional spine data that the original UE4 Mannequin does not. For animations to map properly, they need to know how to bring that data over. For example, the spine bones need to map from the UE4 Mannequin to the MetaHuman one. However, in cases like the metacarpal bones, there was no data from the UE4 Mannequin that requires remapping.

3 - Retargeting Selected Animation onto a MetaHuman

In this final step, you will take some animations and retarget those from the UE4 Mannequin to the MetaHuman character.

  1. In the Content Browser, open the AnimStarterPack folder. Locate the Walk_Fwd_Rifle_Ironsights animation and right-click to open the context menu. Select Retarget Anim Assets > Duplicate Anim Assets and Retarget.

    4_1_RetargetAnimAssets.png

  2. The Retarget Manager window will open, displaying the Source (UE4 Mannequin) and the Target previews. (The Target window does not yet display any of the MetaHuman Skeleton you will retarget.) Under the Select Skeleton list, select the MetaHuman Skeleton (metahuman_base_skel).

    4_2_RetargetMgr_SelectMHSkeleton.png

  3. Since the retargeting process duplicates the existing animation rather than replacing it, click the Change button to set a location in your project where you will save them; otherwise they will be saved in your root folder.

    4_3_RetargetSaveFolder.png

  4. Click Retarget. The folder you chose to store your retargeted animation will automatically open in the Content Browser.

Open your retargeted animation to verify that the retargeting process worked as intended. You can compare the original animation on the UE4 Mannequin to the retargeted animation on the MetaHuman male character.

4 - End Result

You have now walked through the process within Unreal Engine that uses the UE4 Mannequin to retarget existing animations created for another Skeleton Asset onto a MetaHuman character. While this guide focuses on using the MetaHuman male character, should you choose to use the MetaHuman female character, the steps are similar except when specifying the Pose Asset for retargeting and the Preview Skeletal Mesh used.

Here are a few examples of the MetaHuman male character using retargeted animations from the Animation Starter Pack .

Select Skin
Light
Dark
Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss

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