Ali Şahan Yalçın
IK Bone Baker for Unreal Engine

IK Bone Baker for Unreal Engine

An Animation Modifier that bakes a skeleton's IK bones onto their FK counterparts and works the bone pairs out by itself. Fixes retargeted animations whose IK chain was left sitting at the reference pose.

IK Bone Baker is an Unreal Engine 5 editor plugin that adds one Animation Modifier. It copies a skeleton's IK bones onto the FK bones they are meant to follow, for the whole animation, and works out which bone belongs to which by itself.

I made it after retargeting a pile of animations onto Manny and watching the character animate from the waist up with its legs nailed to the floor.

The mannequin's IK bone chain hangs off the root rather than off the limbs, and foot IK Control Rigs use ik_foot_l and ik_foot_r as their goals. Most source skeletons have no equivalent bones, so the retargeter leaves those chains unmapped and they sit at the reference pose on every frame. The Control Rig then solves the legs towards a goal that never moves.

The fix is to copy the FK foot onto the IK foot for the whole animation. The engine ships a Copy Bones modifier that does this, but it wants the bone pairs typed in by hand. On a folder of a hundred retargets that is a hundred times the same five rows.

What it does

  • Works the pairs out from the skeleton itself. Any bone whose name is the prefix plus the name of a bone that exists is a pair, so ik_foot_l finds foot_l on its own.
  • Resolves against each animation's own skeleton, so you can select a folder spanning several skeletons, add the modifier once, and apply once.
  • Handles IK bones that hang off other IK bones. ik_hand_l and ik_hand_r are children of ik_hand_gun, which is itself baked, so they have to be worked out against their parent's baked transform rather than the one it started with.
  • Leaves chain roots alone. Moving one drags its whole chain along.
  • Bakes the same whether or not the animation has root motion.
  • Prints every pair it resolved, so you can see what it did instead of guessing.

How it is built

  • One UAnimationModifier subclass in one UncookedOnly C++ module, so it is compiled out of packaged builds.
  • It depends on nothing but the engine's own Animation Modifier framework. Drop the folder into any project's Plugins/ and it works.
  • The resampling follows the engine's UCopyBonesModifier: sample the pose per frame, resolve in component space, convert back to local before writing. That class is not exported from its module, so it could not simply be subclassed.
  • The pose is sampled once per frame and copied. Sources are read from the untouched copy, so a freshly written bone cannot drag a later pair's source along with it. Targets accumulate in the working copy, which is what makes the nested hand bones come out right.

Screenshots