Are offsets supported within the IK Retarget?

Hi guys, I’m wondering if I have found a bug, or am i just stupid to get retargeting working.
I’m trying to retarget an animation from a UE4 mannequin to the new, cool UE5 mannequin. The problem is that the UE4 mannequin have its foot_l/foot_r bones (and so ik_foot_l/ik_foot_r bones) slightly higher than the UE5 mannequin. So we are getting picture like this:

When we are setting IK & FK adjustments like so:

This difference in the bone positions is causing the feet to be noticeably off the ground when the retargeted animation is used in locomotion with the CR_Mannequin_BasicFootIK control rig (Third Person project). This issue may be solved by editing the custom “FootTrace” function, but I didn’t found a way to automate the finding of the offset. So, I have tried to solve this issue by using the static offset:

But it looks like the offset value have no effect on the retargeted animation. I have tried to find how other people have overcome this issue, but no luck :frowning:

P.S.
Just in case: I’m trying to get UE5 mannequins feet to stick to the ground, with retargeted animations. Because I do have different characters for my game that have different body proportions, so it could be nice to be able to use the IK retargeting to easily share animations between these characters.

1 Like

Answering my own question:

I was right about feet bone position difference (UE4 & UE5 mannequins), but I didn’t realize, that while UE5 mannequins feet are getting snapped to a position where UE4 mannequins feet bones are, the root bone remains in the same position. The exported animation skeleton will look like this:
image
So this is what is actually causing problems like floating feet, because the skeletal mesh origin/pivot is where the root bone is. And the static offset is the way to solve this.

Here is how you can set the static mesh offset (remember to do it for both leg chains). I don’t know if the value of -4 is suitable for all animations, but it worked for my retarget pose & animation combination.

This is how the exported mesh should look like (in terms of feet & root bone align:

UPDATE:
The solution above is not fixing all possible cases. I have tried the solution for different animations, and I have found out, that in some animation packages the IK bones are not moving at all (just not animated or broken link, or something…). You can check it by turning on bone visibility and try to play imported animation on UE4 and/or UE5 mannequins, the IK bones should follow feet/hands bones. to make it clear, this is how animation should look like:

And this, is how the animation should not look like on UE5 mannequin:


and UE4 mannequin:

In this case (UE4 mannequin) I have not done anything to the animation, it’s how it looks straight after import from library (it’s from the Generic NPC Pack)

I still have not figured out, how to fix this, or what exactly is going wrong here.

If this is your case, you will still get incorrect feet position when playing, if your animation blueprint contains this node:
image

As there is custom trace function (FootTrace) which is calculating correct feet position using root bone and IK bones. So, in order to get everything working, you have to either fix the animation sequence (make the IK bones move correctly) or you have to edit the “CR_Mannequin_BasicFootIK” blueprint.

UPDATE 2:
This video has short and concrete instructions on how to fix the IK bone problem once, and for every animation:

If you are using the Third Person Template, and have not done any changes into the “CR_Mannequin_BasicFootIK” blueprint, and related animation blueprints, you must replace these IK bone names with corresponding virtual bone names in the “CR_Mannequin_BasicFootIK” blueprint:

Now, you should be able to retarget any of your animations easily, and the floating foot problem should be solved.

P.S.S.
I hope this is clear enough, but ask me if it’s not.

2 Likes

Ok, I tried just now, and unfortunately dont work at all. You said GenericNPC Animation, see what happens if retarget to Anim_Throw_2. I found the best way to test animations is placing on anim_BP (for example on idle animation) because in the animation sequencer all looks perfect, but with anim_BP the IK is calculating, and it brokes everthing.
image
image

Another thing I see in this video of metahumans, its the fact that is not perfect. If you see the idle animation, look the legs how are more straight.
image
image

And, If you have the Pedestrian animation pack, one animation called Kneel_START.
image
image
It seems that after the retarget the feet are pulled hard to the ground, bending the legs and not letting the feet “slide” on the ground, like this kneeling animation.

Yeah, your problem is slightly different. Now, when you have the virtual bones set correctly. Feet are no longer floating, and are pushed to the ground. This is the reason, why legs look more straight (UE5 Mannequin has different proportions than UE4).

The reason why some poses/animations are getting broken when placed in the animation blueprint, is that the “BasicFootIK” control rig is actually very basik :slight_smile: what it does is looks if foot must be pushed to the ground and if so, then the foot is pushed using the foot_l/foot_r bone, which is OK for some animations, but for more complicated animations like the ones you have mentioned, or the Anim_Idle_6 (from Generic NPC Pack), you’ll have to implement more advanced control rig (the “BasicFootIK” is still a good starting point).

1 Like

@Mostarda_TK looks like that the solution of your problem is not as hard as I thought.

All I have done, is re created the “VB ik_foot_l” and “VB ik_foot_r” virtual bones, the old ones have pointed to the foot_l and foot_r bones, but the new ones are now pointing to the ball_l and ball_r bones.
image
image

And next, I had to update the skeletal mesh in the BasicFootIK control rig like this:

Pay attention to the 5. and 6. spots, you have to change default foot_l and foot_r values with ball_l and ball_r values.

And make sure you have replaced ALL of the old ik_foot_l bone names with the new “VB ik_foot_l”/“VB ik foot_r” bone names.

The result will be similar to this one:
image

But there will be another problem:

This is because the Mannequin by default do not have any bone rotation limits, so we have to configure those manually :frowning:

Bad thing - I have no idea how to do it, have to find some tutorials about this.
Good thing - I’m sure there are hundreds of tutorials explaining how to do it :slight_smile:

@Amanda.Schade Hi, looks like many people have problems with the UE4/UE5 mannequin IK bones, is there somewhere a roadmap or FAQ, where we can find, if this is a bug, or a feature? I mean, virtual bones work very well, but are the IK bones still present, because of backward compatibility or something? :slight_smile:

P.S.
Sory for bothering you, I just was not able to find any information about this myself :frowning:

Thanks, I will check this later. I alredy spent some days trying to fix all this thing all togheter, floating feet and broken IK. This thread was the best I found, I would like to see these “hundred” of tutorials haaha, because Its hard to find… oooor Im so bad at googleing xD

Thanks for the help, but I still have the issue of floating feet, except now it’s just the heels and both Manny and Quinn look like they pooped their pants.

I mean, I know the mannequins are different, but I thought the whole point of the IK Retargeting system was to solve the differences, not make the UE5 mannequins look like diaper-wearing chimpanzees.

Alas, I am gonna give up on the UE5 mannequins for now and just stick to UE4 ones, where at least the animations works out of the box.

1 Like

Yeah the ik & virtual bones are not handled by IK retargeting. What I did is to implement a new solver that can constraint those bones again. Will publish a video soon about how I did it. So far it supports ik and virtual bones. :wink:



In case you’re interested in learning how I created other tools to make the ALS character intergration more stream lined check out, https://www.youtube.com/playlist?list=PLslFX7TZAr8_kS1zdzEvrjBXI1gMRckZE.

But so far what I lose are the transforms of the ik_hand_gun bone. There I’m still trying to find a solution.