---
title: "Automate retargeting to MetaHuman"
canonical: "https://help.vicon.com/space/ShogunPost121/1253738008/Automate%20retargeting%20to%20MetaHuman"
format: markdown
---
Shogun Post 1.18 and later enables you to automatically set up a retarget to an Unreal Engine 5 Metahuman or Mannequin skeleton with the click of a button. 

If you need more control over retargeting or already use scripting to achieve this, you can instead run one or more of the supplied scripts. 

The following topics list the requirements for successful retargeting, and then describe each method.

> Macro (toc)

> Macro (anchor)



## Requirements for retargeting to MetaHuman or Mannequin

Before you start, ensure you have the following.

- An Unreal Engine FBX target skeleton that meets the following requirements:
  - The target must be either the MetaHuman or Mannequin character. We recommend that you use the Mannequin character model due to its simplicity compared with the Metahuman skeleton.
  - The Mannequin must be from Unreal Engine 5.0.3 or later to ensure it has the same skeleton as the MetaHuman.
  - For retargeting to work correctly, the FBX hierarchy must be in the form *Character\Retargeting\*[Locator]*\root\pelvis*. The *root* and *pelvis* objects must exist. Shogun Post automatically sets the pelvis as the sixth DoF (degree of freedom) root and removes the DoFs from root. The name of the Locator can be as required.
- A solved standard Shogun VSS (Vicon Solving Setup).
- Your Shogun Post project. You may need to relaunch Shogun Post to ensure the setup scripts are included.

> Macro (anchor)



## Automatically set up a retarget to MetaHuman

Use the Setup button to quickly retarget skeletons to Unreal Engine's Metahuman or Mannequin.

1. Ensure your current scene includes only one subject, which must be a solved standard Shogun VSS. A ROM usually works well.
2. To load the retarget skeleton, open the **Subject Setup** panel and on the **Retargeting** tab, ensure the **Automatic Setup** tab is selected.
3. From the Retarget Skeleton list, select **UE5 Mannequin**.
4. To load the retarget skeleton, click Load > Macro (inline-media-image)

 on the toolbar and import an Unreal Engine Mannequin or MetaHuman FBX.
5. If required, adjust the scale of the retarget skeleton.
6. Click **Setup** to automatically set up the retarget to the specified skeleton type.

> Macro (scroll-pagebreak)

## Set up a retarget to Metahuman using the supplied scripts

Use the supplied automated setup scripts to retarget skeletons to Unreal Engine's Metahuman or Mannequin in cases where you want more control over the retargeting than is available using the [fully automatic method](#AutomaticMetahumanSetup).

> ℹ️ **Note**  
> ℹ️ The scripts for retargeting with fingers are automatically installed with Shogun Post 1.10 and later. If you used the equivalent scripts with Shogun Post 1.9, you must overwrite them with the equivalent scripts from the current version of Shogun Post.

For most projects, to retarget to a UE5 MetaHuman skeleton you need to use only *SetupRetargetToUE5Mannequin.hsl*.

1. Ensure your current scene includes only one subject, which must be a solved standard Shogun VSS. A ROM usually works well.
2. To load the retarget skeleton, open the **Subject Setup** panel and on the **Retargeting** tab, click Load > Macro (inline-media-image)

 on the toolbar and import an Unreal Engine Mannequin or MetaHuman FBX.
3. If required, adjust the scale of the retarget skeleton.
4. If the script is installed in the default location (*C:\Program Files\Vicon\ShogunPost1.1#\Scripts\Retargeting*), to run the required script, in the **Script Editor**, type *SetupRetargetToUE5Mannequin; and *click the play icon in the **Script Editor** toolbar.
  If the script is not in the default location, add the relevant path to the Preferences (**General** > **Preferences** > **Directories** > **Scripts**) or click the Open button on the toolbar and browse to the location of the script to open and run it.
  This automatically creates a default retarget setup.
5. Run a retarget over the play range and confirm the target skeleton's motion looks correct.

### Semi-automatic setup and advanced use of the supplied retargeting scripts

For greater control over your project, you can choose to customize the supplied scripts (found in *C:\Program Files\Vicon\ShogunPost1.1#\Scripts\Retargeting*) or pick and choose which portions of the setup you want to run.

The following table describes the supplied scripts and how they fit together. 

> Macro (scroll-tablelayout)

| Script | Description |
| --- | --- |
| *AutoRetargetToUE5Mannequin_CreateFingerRotationConstraint.hsl * | This script creates a rotation retargeting constraint between two selected bones. It is called by CreateUE5MannequinFingerConstraints to create a rotation constraint for each finger bone. |
| * CreateUE5MannequinFingerConstraints.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.<br>If you want to include finger retargeting, run this script in your custom process to create finger constraints. |
| * DisableMetaHumanExtraBones.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.  
It turns off DoFs and hides the extra bones in MetaHuman skeletons.  
Run this script in your custom process if you are using a MetaHuman FBX as the retarget skeleton rather than a Mannequin FBX. |
| *PoseUE5MannequinForMapMode.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.  
It positions the target skeleton in the same pose as the solve skeleton. It also adjusts the translation of the root bone on the target skeleton so that both skeletons are standing on the floor.  
Run this script in your custom process before capturing a map pose to prepare the target skeleton for the best possible solve. |
| *PoseUE5MannequinLeftHandFingersForMapMode.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.<br>If you want to include finger retargeting, run this script in your custom process to position the target skeleton's left hand in the same pose as the solve skeleton.<br>Run this script in your custom process before capturing a map pose to prepare the target skeleton for the best possible solve. |
| *PoseUE5MannequinRightHandFingersForMapMode.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.<br>If you want to include finger retargeting, run this script in your custom process to position the target skeleton's right hand in the same pose as the solve skeleton.<br>Run this script in your custom process before capturing a map pose to prepare the target skeleton for the best possible solve. |
| *SetUE5MannequinDOFsSidesParts.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.  
Run this script in your custom process to set the DoFs for the Mannequin or MetaHuman skeleton.  
To set the DoFs, go to the **Subject Setup** panel > **Retargeting** tab > **Load** button dropdown > **Load Sides, Parts, and DoFs only**. |
| * SetUE5MannequinDOFsSidesPartsWithFingers.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.<br>If you want to include finger retargeting, run this script in your custom process to set the DoFs for the Mannequin or MetaHuman skeleton. |
| *SetUE5MannequinGeoTwists.hsl * | This script is called in the main script, but can also be called separately or edited if you want to customize the process.<br>Run this script in your custom process to set the geometry twist attribute of the target skeleton bones to a standard value. |
| *SetupRetargetToUE5Mannequin .hsl* | This is the main script. It calls all of the other scripts for a fully automated setup process.<br>For most projects, this is the only script you need to run. |