You can use IK Rigs to create animation retargeting between different skeletal meshes. This differs from Unreal Engine's traditional Animation Retargeting feature in that you can transfer animation between skeletons with varying numbers of bones, bone names, and orientations, while optionally maintaining precise hand or foot contact points using IK.
Retargeting animations provide a way to share animation data between multiple different skeletons, without needing to create and manage new animations outside of UE.
This page provides an overview of the IK Retargeter.
For information about using UE’s automatic retargeting tools, see the IK Retargeter documentation.
Prerequisites
Your project has two different skeletal meshes to evaluate the retargeting process.
You already created IK Rig assets and defined retargeting chains within them. Refer to the Retargeting Bipeds with IK Rig page for how to do this.
Creation and Overview
To create an IK retargeter, click Add (+) in the Content Browser, then select Animation > IK Rig > IK Retargeter. A dialog window appears where you must select the IK rig that you want to retarget animation from. Once selected, name and open the IK Retargeter asset.
The IK Retargeter contains the following tools and options:
The Play button is now on the toolbar, click Run Retarget to play the retargeted animation.
Toolbar: Here you can save changes, browse associated assets, and more.
Run Retarget and Show Retarget Pose toggle switch; toggle between retarget pose options.
Asset Settings; click to display selected operations and the total execution cost directly in the editor.
Op Stack and Hierarchy panel:
When set to Op Stack a default operation stack appears in the panel. Add new operations by selecting Add New Op. Highlighting an operation in the stack opens the operation settings in the Details panel.
When set to Hierarchy a list of character bones appear. Select a character and filter bones and their assigned chains from the list of bones.
Asset Browser: Here you can select the animations from the source to preview in the editor and export the selected animations.
Retarget Output Log: Displays debug information, warnings, and errors indicating the current status of your IK Retargeter.
Details and Preview Settings panel:
When set to Details, a list of settings appear in the panel.
When set to Preview Settings, different previews of the retargeted animations appear in the editor and the viewport.
Viewport: Here you can preview and debug the source and target characters being retargeted.
Retarget Chains
Limbs and other appendages you want to transfer in the retarget process must be defined on both the source and target IK rigs. This is a process similar to "characterizing" your rig as seen in other applications like Autodesk MotionBuilder or Maya. The main difference is you define it by joint chains, rather than by individual bones. This provides flexibility in retargeting characters with vastly different bone structures.
For example, if your target character contains more arm joints than your source, the retargeting behavior still works correctly because you are defining the entire arm chain, no matter the number of bones.
Source arm chain.
Target arm chain.
Chain Creation
Retargeting chains are automatically created from the IK Rig Editor toolbar by clicking Auto Create Retarget Chains. To create a chain, open the IK Rig asset for both characters, navigate to the IK Retargeting panel, then do the following:
Click Add New Chain (+).
In the Add New Retarget Chain dialog window, ensure Chain Name is set correctly, then click Add Chain. In most cases, the IK rig automatically assigns this value from its list of common chain names.
Typically you do not need to add IK goals unless your retargeting requires additional IK adjustments, such as Speed Planting, Stride Warping, or Blend to Source. Add IK goals to your new retarget chain by selecting Add Chain and Goal. Afterward, you’ll be prompted to create an IK solver and determine how the solver behaves.
You can also create chains by selecting every bone in the intended chain, right-clicking on them in the Hierarchy panel, and selecting New Retarget Chain…
Chain Properties and Names
Chains require the following parameters to be set:
| Name | Description |
|---|---|
Chain Name | The name of this chain. This name can be arbitrary, but it should match with the intended retarget chain in the other IK rig. The matching chain name process is determined by a fuzzy string match. Therefore, while your chain names in each IK rig do not have to match perfectly, you should still try to match them. For example, a chain name of |
Start Bone | The starting Bone of the retarget chain. If you are retargeting an arm, then typically you would select the upper arm bone here. |
End Bone | The ending Bone of the retarget chain. If you are retargeting an arm, then typically you would select the hand bone here. |
IK Goal | You can optionally select an IK Goal here in order to stabilize limbs or chains which may not be retargeting with good accuracy. This means you also need to create Solvers for those goals, which executes their solve after the retargeting process. |
The Chain Name property automatically fills in itself depending on the name of the selected bones used when creating the chain. The system looks for common bone names used, and then picks a name that best matches the selected bones. This mapping list is as follows:
| Chain Name Mapping | Bone Names to Search For |
|---|---|
Head |
|
Neck |
|
Leg |
|
Arm |
|
Spine |
|
Jaw |
|
Tail |
|
Thumb |
|
Index |
|
Middle |
|
Ring |
|
Pinky |
|
Root |
|
For symmetrical chains, such as arms and legs, the auto-naming feature is determined by comparing the average location of the bones in the chain, and then assigning a prefix of Left or Right. If the selected bones are mostly located on the negative X side, they are "Left", positive X is "Right", and if they are relatively centered on the X axis, then they are considered "Center" and no prefix is applied.
If multiple chains are created for bones with similar names, a numerical suffix will apply for each subsequent chain. For example, if you were retargeting a creature with multiple heads, then the resulting chains would read as Head_1, Head_2, and Head_3. You can manually name your chains however you like, but this convention is helpful to establish standard naming conventions and retarget quickly using other IK Rigs.
Pelvis
In addition to defining chains, you must also define the pelvis bone. This is done so the character's root motion can be defined and transferred in a proportional way.
Like chains, the pelvis is defined in the IK Rig Editor. To do this, open the IK Rig asset for both characters, navigate to the Hierarchy panel, right-click the bone and select Set Pelvis.
Once done, the pelvis indicates with the selected bone in the Hierarchy and the IK Retargeting panels.
Retargeting Stack Framework
The retarget stack framework is a collection of modular operations which are evaluated on a bone chain selected from the bone hierarchy. The retargeting operations are a more performant way to edit skeletal meshes and retarget animations.
You add custom operations for the retargeter by selecting and arranging only the operations necessary for a select bone chain to retarget a pose or animation. Each operation can be reordered within the stack.
Some operations have a sub-stack of operations for custom logic and evaluations that need to be applied in a certain order or method to expand an existing operation.
All retargeting operations support setting custom LOD thresholds. Custom LOD thresholds are set per-operation, this provides a way to skip costly steps automatically at higher LODs. Some operations have debugging capabilities in their settings.
You can create your own ops using C++.
Visit the Retarget Operation Stack page to learn more about the retargeting operation stack and the individual operations.
Retarget Pose
Depending on the reference poses of the characters being retargeted, you might need to edit this pose in the form of a base Retarget Pose. Typically you need to do this if your target character's reference pose is different from the source, such as being in a T-pose, rather than an A-pose. Matching these retarget poses increases the accuracy of the retargeting.
Source character's reference pose is an A-Pose.
Target character's reference pose is a T-Pose.
You can resolve reference pose discrepancies by toggling to Editing Retarget Pose in the toolbar, then edit, import, or export different poses using the Retarget Pose tools in the Hierarchy panel.
Clicking Source or Target changes the focus of the Retarget Pose tools and Hierarchy panel to either the source or target character.
Create and Edit Pose
Although you can edit the Default Pose for any of your retargeted characters, we recommend creating new retarget poses if you need to make adjustments. To do this, click Create (+) > Create, name the new retarget pose, then click Ok.
Next, ensure Current Retarget Pose is set to your new pose, then enable Edit Mode. You can now select and modify bones in the viewport and match the poses. When finished, disable Edit Mode.
For extra precision, you can numerically modify retarget poses in the Details panel where a rotation value of 0, 0, 0 returns the bone to its reference pose.
Importing and Exporting Poses
Rather than manually creating new retarget poses, you can also import them from Animation Sequences or Pose Assets.
To import from an Animation Sequence, click Create (+) > Import from Animation Sequence. In the dialog window, select the sequence to import from and set the following parameters:
Sequence Frame defines a specific frame of the animation sequence to base the imported pose on. By default this will be set to 0, which will use the first frame of the animation.
Pose Name defines the name of the Retarget Pose upon importing.
To import from a Pose Asset, click Create (+) > Import from Pose Asset. In the dialog window, select the pose to import from, click the dropdown menu to set the specific pose name to use, then select Import Retarget Pose.
You can also export retarget poses as a Pose asset to share with other IK Retargeting assets in your project. To do this, click Create (+) > Export Pose Asset, give your asset a name, then click Save.
Miscellaneous Workflows
The Retarget Pose area also contains the following miscellaneous tools to assist with creating and editing your Retarget Pose:
| Name | Description |
|---|---|
Current Retarget Pose | Displays the current Retarget Pose used by either the Source or Target character. Initially this will only list Default Pose, and populates when you create new poses. You can click the dropdown menu to select different poses. |
Running Retargeter / Edit Retarget Pose | When enabled, this engages the retargeter so you can preview the results of the current retarget pose using animation sequences. Disabling this switches back to Edit Retarget Pose mode, where you can continue to make further refinements if necessary. The viewport highlights in a blue outline to indicate that the Edit Retarget Pose mode is enabled. |
Retarget Pose Blend | When making several edits to a retarget pose, it may be helpful to preview what changes have occurred on which bones. To help this, you can edit the Retarget Pose Blend slider. Setting it to 0 changes the pose back to the Skeletal Meshes default reference pose. Setting it to 1 changes the pose to the current Retarget Pose. |
Reset | You can use the Reset menu to reset the retarget pose back to the skeletal meshes default reference pose. You can select the following options:
|
Auto Align | Automatically aligns bones on the source skeleton to target, or aligns the bones of the target skeleton to the source. You can select the following options:
|
Duplicate | You can duplicate the current retarget pose by clicking Create (+) > Duplicate Current, then naming the new pose. |
Rename | Rename the current retarget pose by clicking Rename, entering a new name, then clicking Ok. |
Hierarchy Display
The Hierarchy panel displays the skeletal hierarchy of either the source or target character, depending on which is enabled. Bone names indicate if they are used in Retarget Chains by highlighting in addition to the retarget chain column displaying the name of the chain being used.
You can search to locate and filter specific bone names or retarget chains.
You can also click the filter dropdown menu to set the following filters:
Hide Bones Not in a Chain: Hides bones not used within a chain, regardless if the IK retargeter is using the chain.
Hide Bones Not Retargeted: Hides all bones not used by the IK Retargeter.
Hide Retargeted Bones: Hides bones used by the IK retargeter
Preview Animation and Export
The Asset Browser panel is used to preview and export the retargeting effect on different assets. Double-click an asset to play it.
Once you are satisfied with your retargeting results on the target character, you can export the animations to compatible Animation Sequences for that character's Skeleton. To do this, select the animations you want to export in the Asset Browser panel, then click Export Selected Animations.
In the export dialog window, choose the export folder, then optionally specify the following rename properties:
Add Prefix, which adds text before the new asset name.
Add Suffix, which adds text after the new asset name.
Search for and Replace with, which searches for existing names in the file name and replaces it with the name specified. Search and replace is not case sensitive.
Click Export to save your retargeted Animation Sequences.
Retargeter Properties and Settings
Asset Settings
The runtime for each operation is visible in the Details panel when the Asset Settings button is pressed and Profile Ops is enabled from the Details panel.
| Name | Description |
|---|---|
Source IKRig Asset | The source IK rig to copy animation from. |
Source Preview Mesh | The source skeletal mesh. You can change this, and the IK retargeting system will use name matching to attempt to make the IK rig compatible with a different mesh and skeleton. |
Target IKRig Asset | The target IK rig to copy animation to. |
Target Preview Mesh | The target skeletal mesh. You can change this, and the IK retargeting system will use name matching to attempt to adapt the IK rig to the provided skeleton and proportions. Incompatibilities are printed as warnings or errors in the retarget output log. |
Target Mesh Offset | A positional offset that can be applied to the target skeletal mesh to offset it from the source. This is useful to help with previewing both characters, or if the target character is very large, requiring a larger offset. |
Target Mesh Scale | A preview scale modifier which you can use to increase or decrease the target character's scale. This is useful if your target is very small or large relative to the source, where changing this value can align their sizes more closely for convenience. |
Source Mesh Offset | Similar to Target Mesh Offset, this is a positional offset you can apply to the source Skeletal Mesh to offset it from the target. |
Show Source Mesh | Show or hide the source skeleton mesh in the editor viewport. |
Show Target Mesh | Show or hide the target skeleton mesh in the editor viewport. |
Show Source Skeleton | Show or hide the source skeleton in the editor viewport. The viewport must be showing bone to see the skeleton. |
Show Target Skeleton | Show or hide the target skeleton in the editor viewport. The viewport must be showing bone to see the skeleton. |
Override Source Skeleton Color | Override the source skeleton color in the editor viewport. |
Source Override Color | Select a new skeleton color. |
Override Target Skeleton Color | Override the target skeleton color in the editor viewport. |
Target Override Color | Select a new skeleton color. |
Ignore Root Lock in Preview | When set to true, animation sequences with Force Root Lock enabled act as though the setting is disabled. This affects only the preview in the retarget editor. Use ExportRootLockMode to control exported animation behavior. This setting has no effect on runtime retargeting where root motion is copied from the source. |
Debug Draw | Provides a way to target chains. Tools are individualized by operation and controlled through the op stack. |
Profile Ops | Toggle performance profiling of the op stack. |