Does ground correction in animation retargeting always work?

Hi everyone,

Not sure if this is a bug or a limitation. As per the docs, sometimes retargets are not perfectly aligned with the ground. In that case we have the options “fixGroundReference” and “fixGroundReferenceDynamicRefNode”.

The problem I ran into is that fixGroundReference pushes one of the feet way too far below ground. When trying to add fixGroundReferenceDynamicRefNode it does help a bit but it seems it just dampens the negative effect of fixGroundReference. In effect, there remains an outbreak of one of the feet below ground, it quickly gets corrected, but this does cause a visible jump in the animation.

See here:

Can this be fixed by code?

If this needed to be fixed on skeleton level, would it be enough to parent a “GroundBone” to the current root node (mixamorig:Hips), keep it at zero and feed that to groundReferenceNodeName?

Best wishes
Joe

fixGroundReference is not a full “keep both feet above the floor” solver. It works from one configured groundReferenceNodeName and adjusts the root position so that this one node matches the source/target ground-reference offset.

So if you use the left foot as the reference, it works only while the left foot is the meaningful ground/contact reference. In a walk/run cycle where the left and right feet alternate as the lowest/contact foot, the chosen reference becomes wrong for half of the animation. When the referenced foot is lifted, the correction is still computed from that lifted foot, so the root can be moved in a way that pushes the other foot below the ground.

fixGroundReferenceDynamicRefNode can reduce this in some cases because it tries to switch to a lower node dynamically, but it is still a heuristic, not an IK/contact solver. When the “lowest” reference changes between feet, especially with different skeleton proportions or retargeting offsets, the correction can jump.

Adding a GroundBone parented to the hips at zero would not really solve this, because it would move with the hips rather than represent the actual lowest foot/contact point. To make this robust, the animation would need either a real animated ground/contact reference, or a custom post-process/IK step that computes the root vertical offset from the minimum of both feet/toes per frame and smooths transitions.