This tutorial will show you how to retarget an Animation Asset targeting the MetaHuman skeleton to another MetaHuman with a different body type.
The Animation Asset used in this tutorial is from the MCO MoCap Basics pack, which you can download for free on the Unreal Engine Marketplace. The Asset has been retargeted from the Unreal Engine 4 Mannequin Skeleton to the MetaHuman Skeleton.
If you need a quick animation to test with, you can find several in the MetaHumans Sample on the Unreal Engine Marketplace. Make sure to download the Unreal Engine 5.0 version for the latest animations.
Required Knowledge and Setup
This page assumes you have some knowledge of the Skeletal Mesh Animation System in Unreal Engine, as well as animation retargeting.
Before you can follow the steps outlined on this page, you need to do the following:
Create a new Unreal Engine project. If you need help completing this step, refer to the Creating a New Project page in the Unreal Engine 5 documentation:
Download at least one other MetaHuman with a different body type and / or height than the one your animation targets, and import them into your project. If you need help completing this step, refer to the following pages:
For this tutorial, we will use the Ada and Hudson MetaHuman Presets, but you can use any MetaHumans.
If you don’t have any Animation Assets targeting the MetaHuman Skeleton, create one from the MCO MoCap Basics pack by following the tutorial below:
Workflow
The workflow consists of the following steps:
Set up the MetaHuman IK Rig to use the correct preview mesh.
Configure the MetaHuman to MetaHuman IK Retargeter Asset.
Select an Animation Asset to retarget, then correct for any issues created by the difference in height or body type.
Export the Animation Asset as a new retargeted Asset.
Configure the retargeted Animation Asset to use the correct Skeletal Mesh for your MetaHuman.
Set Up the MetaHuman IK Rig
In this step, you will configure the MetaHuman IK Rig Asset to use a preview mesh. A rig without a mesh will not appear in the Viewport.
In the Content Browser, search for the IK_MetaHuman IK Rig. By default, this Asset is located in the
MetaHumans/Common/Commonfolder.Double-click the IK_MetaHuman IK Rig to open it.
In the Preview Scene Settings panel on the right, set the Preview Mesh property to the f_med_nrw_preview Skeletal Mesh.
Save and close this Asset.
Configure the IK Retargeter Asset
In this step, you will configure the RTG_metahuman Asset to use the correct preview mesh for the target MetaHuman.
This Asset is automatically added to your Unreal Engine project if your project contains at least one MetaHuman.
In the Content Browser, search for the RTG_metahuman IK Retargeter Asset. By default, this Asset is located in the
MetaHumans/Common/Commonfolder.Double-click the RTG_metahuman Asset to open it. The Editor Viewport will show you two MetaHuman body meshes overlapping, with several panels to configure retargeting settings on the right.
In the Details panel on the right, from the Target Preview Mesh drop-down, search for and select the preview mesh that corresponds to your MetaHuman.
For this tutorial, the mesh you’re looking for is named
m_tal_ovw_body_preview. Search for it in the dropdown and select it.As a reminder, all MetaHuman Skeletal Meshes follow the same naming convention:
gender-presentation_height_weight_mesh-purpose. This tutorial uses the Hudson Preset, whose attributes are as follows:gender-presentation:
mheight:
talweight:
ovw
Preview meshes have the
\_previewsuffix.Still in the Details panel, in the Preview Settings section, set the X value of Target Mesh Offset to a value that's large enough to completely separate the Source and Target meshes in the Viewport. Typically, a value around 100 should be enough.
In the Chain Mapping panel on the right, click the Auto-Map Chains button.
At this point, you should see the two MetaHuman meshes in the Viewport, side by side. Both meshes should be using the same A-pose.
If the target MetaHuman pose is incorrect, make sure you selected the _preview Skeletal Mesh, not the _body Skeletal Mesh.
Retarget and Export an Animation Asset
Still working with the RTG_metahuman Asset in the editor, click the Asset Browser tab. This opens the Asset Browser panel, which contains all Animations that are compatible with the source Skeleton.
The Asset Browser only shows animations compatible with the skeleton used by the source Skeletal Mesh. If your Unreal Engine project contains multiple copies of the same Skeletal Mesh, you need to set up the skeletons used by each copy to be compatible with each other. To learn how to do this, refer to the Compatible Skeletons section of the Skeletons in Unreal Engine 5 documentation.
In the Asset Browser, double-click an Animation Asset to preview it in the Viewport. This tutorial uses the Walk_02_Cheerful_Loop_IP animation from the MCO MoCap Basics animation pack, which we retargeted from the UE4 Mannequin skeleton to the MetaHuman skeleton in the Retargeting UE4 Mannequin Animations tutorial. You can use any Animation Asset that is compatible with the MetaHuman skeleton.
You should now see the animation playing in the Viewport:
Use the timeline and playback controls along the bottom of the IK Retargeter Editor window to play, pause, and scrub the animation. Move the camera around the Viewport to identify potential issues, such as clipping.
If you have clipping issues, you may need to change chain attributes to fix them. To do this, in the Chain Mapping panel, click a Target Chain, then change one or more of its attributes in the Details panel. You can change both IK and FK attributes. Note that every Animation Asset will need a different setup, depending on body mesh and particular movement.
The video below demonstrates how changing the Static Offset (X) of the LeftArm chain affects the animation playing on the target Skeletal Mesh.
Once you’re happy with how your animation looks, click Export Selected Animations to export your animation.
This will create a new Animation Asset targeted to the MetaHuman Skeleton. Select the location where you want to Save the new Asset, then click OK.
You can now Close the IK Retargeter Editor window.
Configure the Retargeted Animation Asset
In the Content Browser, locate the retargeted Animation Asset and double-click it to open it in the Animation Editor. If you used the animation in this example, this Asset will be named Walk_02_Cheerful_Loop_IP_Retargeted.
Make sure that the properties highlighted in the screenshot below are set to your MetaHuman’s _body Skeletal Mesh:
Retarget Source Asset (1)
Preview Mesh (Animation) (2). To quickly locate your MetaHuman’s mesh, type their name (for example: Hudson), and the drop-down will display the correct mesh.
When searching for the preview mesh in these drop-downs, type your MetaHuman’s name to quickly locate the body mesh.
After you configure these properties, Save the Animation Asset and close this window.
Final Result
You now have an Animation Asset targeted to your MetaHuman’s Skeleton that works with their specific body height and body type. You can quickly test your animation by assigning it to your MetaHuman’s Body component in the BP_(MetaHumanName) Blueprint.