/
Automate retargeting to MetaHuman

Automate retargeting to MetaHuman

Use the supplied automated setup scripts to quickly retarget skeletons to Unreal Engine's Metahuman or Mannequin.

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.

Requirements

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 the scripts to work correctly, the FBX hierarchy must be in the form Character\Retargeting\[Locator]\root\pelvis. The script expects root and pelvis objects to exist. It 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 new setup scripts are included.

Use the scripts to retarget to the Unreal Engine 5 MetaHuman

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 (on the Subject Setup ribbon, select Subject Setup)and on the Retargeting tab, click Load on the toolbar and import a 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.11\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

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

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

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.

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.

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.

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.

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.

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.

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.

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.

For most projects, this is the only script you need to run.

Related content


© Copyright Vicon Motion Systems. All rights reserved.

Vicon trademarks