Runtime Animation Retargeting

Retarget animations from Quinn to a MetaHuman at runtime.

Windows
MacOS
Linux

This tutorial will show you how to retarget the animations from the Unreal Engine 5 Mannequin (Quinn) to a MetaHuman at runtime, then use that MetaHuman as a playable character inside your Level.

This tutorial uses IK Rig leg placement functionality. Your animated MetaHuman's legs will conform dynamically to the terrain.

Required Knowledge and Setup

This page requires basic knowledge of Animation Blueprints in Unreal Engine.

Before you can follow the steps outlined on this page, you need to:

Workflow

This workflow consists of the following steps:

  1. Create the controllable MetaHuman Blueprint.

  2. Create and configure a new Animation Blueprint.

  3. Finish configuring the controllable MetaHuman Blueprint.

  4. Hide the Quinn mesh.

  5. Set your MetaHuman as the Default Pawn Class in the Game Mode Blueprint.

Create the Controllable MetaHuman Blueprint

First, create the controllable MetaHuman Blueprint. By the end of this tutorial, this Blueprint will be how you replace Quinn as the playable character in your Level with your MetaHuman.

The workflow below requires you to switch between two Blueprint Editors. Make sure you're in the correct Blueprint Editor before following a step.

Follow these steps:

  1. In the Content Browser, find the BP_ThirdPersonCharacter Blueprint Class. This Blueprint is located in the Content/ThirdPerson/Blueprints folder.

  2. Right-click the BP_ThirdPersonCharacter Blueprint and, from the context menu, select Duplicate.

  3. Name the duplicated Blueprint BP_MetaHumanCharacter.

  4. Double-click the BP_MetaHumanCharacter Blueprint to open it in the Blueprint Editor, then switch to the Viewport tab.

    Quinn character mesh

    The newly created BP_MetaHuman Character Blueprint still uses the Quinn Skeletal Mesh for now. We'll change that in the next steps.

  5. Go back to the Content Browser and find your MetaHuman's Blueprint. This Blueprint is located in the Content/MetaHumans/(MetaHumanName) folder, and is named BP_(MetaHumanName).

    This tutorial uses the Ada Preset, whose Blueprint is located in Content/MetaHumans/Ada and is named BP_Ada. Double-click the BP_Ada Blueprint to open it in the Blueprint Editor, then switch to the Viewport tab.

    Ada MetaHuman Blueprint

  6. In the BP_Ada Blueprint, select all Components under the Root Component:

    • Feet

    • Legs

    • Torso

    • Face

    • Hair

    • Eyebrows

    • Fuzz

    • Eyelashes

    • Mustache

    • Beard

    To select multiple Components, click the first Component you want to select. Then, holding down the Shift key, click the last Component you want to select.

    Use the Ctrl + C keyboard shortcut to copy the Components you selected.

  7. Switch to the BP_MetaHumanCharacter Blueprint. In the Components panel, click the Mesh (CharacterMesh0) Component, then use the Ctrl + V keyboard shortcut to paste the Components you copied in the previous step.

  8. Continuing from the previous step, in the Components panel, select and then click and drag the Components you copied earlier to parent them to the Mesh (Character Mesh) Component.

  9. Click and drag each of the Components you moved in the previous step to parent them to the appropriate Mesh Components. Your finished hierarchy should look like the screenshot below.

    Components hierarchy

    The order of the Components in this window doesn't matter, as long as all Components have the correct parent.

  10. Select the Body, Legs, Feet, Face, and Torso Components (1). Then, in the Details panel, navigate to the Transform section. Click the two Reset buttons (2) next to the Location and Rotation values to reset these values to zero.

    To select multiple non-consecutive Components, hold down the Ctrl key and left-click each Component you want to select.

Your Blueprint will still show the Quinn mesh overlapping Ada. We'll fix that in the next steps.

Create a New Animation Blueprint

Next, you will create an Animation Blueprint and retarget it. Follow these steps:

  1. Continuing from the previous section, in the Blueprint Editor for your BP_MetaHumanCharacter Blueprint, click the Body Component to select it (1). Then, in the Details panel, in the Mesh section, find the Skeletal Mesh property and click Browse to Asset next to it.

    This will open the Content Browser at the location of your MetaHuman's body Skeletal Mesh. For Ada, this mesh will be located in the Content/MetaHumans/Ada/Female/Medium/NormalWeight/Body folder and it will be called f_med_nrw_body.

  2. Right-click the f_med_nrw_body Skeletal Mesh and, from the context menu, select Create > Anim Blueprint. Name your new Blueprint ABM_MHRuntimeRTG.

    This action will create a few additional Assets in the same folder. You don't need to worry about those.

  3. In the Content Browser, double-click the ABM_MHRuntimeRTG Blueprint to open it.

  4. Right-click in the AnimGraph, then search for and create a Retarget Pose from Mesh node. Connect this node to the Output Pose node, as shown below.

    Connect the Retarget Pose from Mesh and Output Pose nodes

  5. Click the Retarget Pose from Mesh node to select it. Then, in the Details panel, in the Retargeter Asset dropdown, select the RTG_Mannequin Retarget Asset.

  6. Compile and Save the Animation Blueprint.

Finish Configuring the Controllable MetaHuman Blueprint

There are a few more steps to configure the controllable MetaHuman Blueprint you created:

  1. Go back to the BP_Ada Blueprint. In the Functions panel, click the EnableMasterPose function, then press Ctrl + C to copy it.

  2. Switch to the BP_MetaHumanCharacter Blueprint. Click in the Functions panel, then press Ctrl + V to paste the EnableMasterPose function.

  3. Switch to the BP_Ada Blueprint. In the Functions panel, double-click the Construction Script to open it. Shift-click each of the following nodes (or left-click and drag to select all of them), then press Ctrl + C to copy them:

    • Enable Master Pose (all three of them)

    • Feet

    • Legs

    • Torso

    Select the three Enable Master Pose nodes, as well as their Skeletal Mesh Components

  4. Switch to the BP_MetaHumanCharacter Blueprint. In the Functions panel, double-click the Construction Script to open it, then press Ctrl + V to paste the nodes you copied.

  5. Connect the output pin of the Construction Script node to the input node of the first Enable Master Pose node, as shown below.

    Connecting the Construction Script node

  6. Still in the BP_MetaHumanCharacter Blueprint, switch to the Viewport, then click the Body Component (1) to select it. In the Details panel, in the Animation section (2), set the following properties:

    • Animation Mode: Use Animation Blueprint

    • Animation Blueprint: Search for and select the ABM_MHRuntimeRTG Animation Blueprint you created earlier in this tutorial.

Hide the Quinn Mesh

The last thing you need to do in the BP_MetaHumanCharacter Blueprint is to hide the Quinn mesh. To do this, follow these steps:

  1. In the BP_MetaHumanCharacter Blueprint, click the Mesh (CharacterMesh) Component to select it. Then, in the Details panel, change the following properties:

    • Visible: Uncheck this check box.

    • Visibility Based Anim Tick Option: Set this to Always Tick Pose and Refresh Bones.

    Use the Search box in the Details panel to quickly find properties.

  2. Compile and Save the Blueprint.

Set your MetaHuman as the Default Pawn Class

Next, you need to assign the BP_MetaHumanCharacter Blueprint as the current Game Mode's Default Pawn Class. This tells your game to use your MetaHuman as the playable character when the game starts.

Follow these steps:

  1. In the Content Browser, navigate to the Content/ThirdPerson/Blueprints folder.

  2. Double-click the BP_ThirdPersonGameMode Blueprint to open it.

  3. Set the Default Pawn Class property to BP_MetaHuman Character.

    Changing the Default Pawn Class

  4. Compile and Save the Blueprint.

Final Result

When you play your game, the player character is now your MetaHuman. The MetaHuman has idle, run, and jump animations. Their feet conform to the terrain.

Select Skin
Light
Dark
Help shape the future of MetaHuman Creator documentation! Tell us how we're doing so we can serve you better.