Auto-Setup IK Rig in UE5 for Reallusion Character Creator Models

Auto-Setup IK Rig in UE5 for Reallusion Character Creator Models

EDITED (2): Unreal 5.4 will have equivalent functionality included. If you came here looking for a way to eliminate the tediousness of setting up IK rigs in UE5, just upgrade to 5.4 when it's available. If you have an interest in seeing an example of how you can make a plugin to solve for tedious, time-consuming things you do in Unreal, you can check out the example described here.

Using existing Unreal (UE4 or UE5) mannequin animations with your imported Character Creator characters (or the reverse) generally requires that you retarget your animations to the skeleton for your character. When using UE5's animation retargeting system, one of the required steps is to setup an "IK Rig" asset for your Character Creator character. Setting up the IK Rig is a fairly tedious manual process that requires specifying the bones for each chain to map (arms, legs, spine, each finger on each hand, etc.) as well as settings related to IK Solver. I was unable to find a built-in automated method for setting up the IK Rig, so I decided to dig into the Unreal source code and try to see if I could find a way to create a plugin to automate the process...

In the end, I was able to cobble together a simple plugin for automating the IK Rig setup, and I've shared the source code for the plugin on GitHub:

EDITED: Better Way Found

  • NOTE: I'm leaving this article here since an example of modifying an IK Rig with code is useful if someone wants to do something procedural with rigs that don't exactly match UE4 Mannequin skeleton.

That said, if you do have a skeleton that directly matches the skeleton that has an existing rig, you can just add each skeleton to the other's Compatible Skeleton list in Asset Details.

  • Watch about 6 minutes into CC4 To Unreal Engine 5 with IK Rig, UE5 Retargeter, and Foot IK Control Rig for details.

  • Open first Skeleton asset for your new character.

  • Go to "Window" / "Asset Details" in the top-level menu.

  • Add other Skeleton to the Compatible Skeletons list.

  • Open other Skeleton asset (that already has IK Rig) and add first Skeleton asset to its Compatible Skeletons list.

  • Now, you can just duplicate the IK rig for the UE4 Mannequin (comes with Standard Unreal assets)

    • Rename duplicated rig and open it the IK Rig asset.

    • Change preview skeletal mesh to your new character mesh.

    • Hit "Reset" button in top button bar to reset positions of everything relative to new model.

  • Then, proceed with setting up animation retargeting. There's no need for this plugin in that case.

General Usage

  • Create an "IK Rig" for your skeletal mesh in the Content Browser.

  • Right-click on your new IK Rig asset and click "Scripted Asset Actions" / "IK Rig" / "Setup UE4-Style IK Rig".

  • If the IK Rig editor was already open, be sure to close it and re-open it to see the changes.

Open the IK Rig and behold the newly applied bone chain and FBIK solver settings! This assumes your skeletal mesh follows the general UE4 mannequin structure, which is the case with Character Creator characters.

Notes on Retargeting

  • YouTube has several tutorials on how to do Unreal to Character Creator animation retargeting which you can follow. You can just replace the part about setting up the "IK Rig" with the use of this plugin. Here's a nice concise one that's just under 5 minutes: Retarget Character Creator 4 (CC4) character to UE4 Mannequin in Unreal Engine 5 Then reverse target

  • To retarget animations to your character, you must create an "IK Rig Retargeter" using the source skeleton for your existing animations and then set your new IK Rig as the target.

  • If you open the "IK Rig Retargeter", it seems that there might be a bug where all the available animations won't show up in the Asset Browser (I only see default the one default UE4 Mannequin animation in UE 5.1.1).

    • If this happens to you, you can still right-click on a set of selected animations in Content Browser and select "Duplicate and Retarget Animation Assets".
  • The default CC4 A-Pose seems to result in finger tips pointing back oddly and arms too far out when retargeting UE5-mannequin animations.

    • You can edit the default pose to turn down all finger tips by about 20 degrees and tilt the shoulders down about 10 degrees (or at least that worked for my sample character).

Useful C++ Classes

  • UIKRigDefinition

    • This represents the Unreal asset for the IK rig.
  • UIKRigController

    • This is the class you are supposed to use to modify an instance of UIKRigDefinition.
  • UIKRigPBIKSolver and UIKRig_PBIKBoneSettings

    • These are the classes for the FBIK solver and its solver-specific bone settings.
  • Check out the plugin's source on GitHub for example of how to use them: