Imported animation is slightly different than the original, why?

I have a problem between UE and Maya. I import an animation from maya and same bones have slightly different locations, like in the picture. Left and right foot in maya are almost at the same height, in UE in the same frames there is 5cm difference. I also tried to re export back from ue to maya, and in maya it’s again correct.

Anybody knows why is this happening?

Likely depends on what skeleton you use during import.
Are you importing a new skeleton or utilizing the default one?
Does creating a new skeleton change this ?

I used the default mannequin. It’s the same with other skeletons too. Btw, I first exported an animation from UE, cut it and reimported on the same original skeleton.

Now I checked the original animation, and it has the same problem too. In UE it looks wrong and when exported in Maya it looks correct. I think it’s something related to the way keys are interpolated. The error is small but visible, you can see the feet go underground. I wish there is an easy way to fix it, I don’twant to fix it for every step

Btw, the animations are from marketplace pack called Open World Animset

The issue is likely not the animation but the blend space they are used in.
blend spaces notoriously distort the feet level and cause underground dips based on speed (percentage of interpolation. It’s usually worse at 50% between 2 animations).
To fix that normally you have to create a foot IK solver and make sure your feet always make contact with the actual floor instead of relying on the capsule for floor collision.

All that said.
you need to try to actually create/import a new skeleton along with the animation and see if the error persists.
some times the issue is similar to a constraint on the original skeleton. Though its not exactly a constraint as it isn’t something that can be modified - it’s more likely due to the retargeting system.

Importing the new skeleton along makes sure that the animation isn’t Retargeted to anything - it should be exactly what you see in Maya (or blender) 1:1 when you create the new skeleton asset during import.

Note that some times this effect is desirable - particularly when working animating the neck area. If you stretch the head up for instance (move the actual bone up) importing with the original skeleton removes that translation in most cases. So yes your animation looks different, but it is slightly more anatomically correct then disarticulating a neck out of joint…

That’s my 2c anyway. Do try the import new skeleton thing and see if it helps.

There is no blend spaces or retargeting involved. Animation looks different also when exported to maya. I don’t understand which new skeleton I should make, it’s the 100% standard unreal mannequin skeleton and mesh, with its original bind pose and everything.

Just during import. Don’t select any skeleton and see what happens.

Okay, I imported the animation with the mesh. And you was right, the feet are correct now, but, the rest is broken. WTF is going on?

Okay, so I exported the original mesh and animation and imported them in maya. And the problem is already here, the hand is completely distorted (also other places too, but the hand is more easy to see)

What is causing this? Btw, I tested with another version of maya on another pc, exactly the same.

Its possiblity just a bad marketplace animation. They are far too common.
try to revert to the original file first, and export that.
If that original file is the same you just need to fix it.

You can try to download blender and my plugin, bone breaker, to automate the process.

(Note that to follow animations correctly you have to toggle pole rotation back- I need to push a patch to address that if I can).
http://mosthostla.com/gamedev

If that doesn’t work you just nerd to clear that arm’s keyframes, return the arm only to the A pose, and animate it again.

What you are seeing and why it looks different t is unreal’s retargeting in action - it undoes translations.

It’s the original animation and mesh from the pack. It’s not that a big deal, I can fix it. I just want to understand why the same animation looks different in ue and in maya.

Basically they re-target to the base skeleton, so this often causes shifts in translation to be ignored between some (not all as far as I have seen) bones.

Yes, you right, it’s the retargeting. I realize that I never understood how it works. I always assumed the retargeting options are only applied when you use the retarget tool, but in fact it works like a filter on the raw animation data. So, when you have the retargeting “Skeleton” the translations are simply dropped out, as expected. And when you have retargeting set to Animation they are applied. So, basically, retargeting options are always applied

The default UE mannequin has retargeting set to “animation” on root, pelvis and ik bones, then “skeleton” on everything else. So, by default, on the hand and feet the translations from the anim will never be applied.

I took the original skeleton and one of the original animations from the Open World Anim Set from the Marketplace and put everything to Animation, and its all broken. So, basically they sell broken anims, lol!

Here, I made a video about how to fix it in maya by removing translations from keys, same thing as “retargeting - skeleton” does.

Ai, your shoulders are off too.

you should really take a look at my blender addon. It does oretta much all of that with 2 or 3 button clicks.
and on top of It, it makes the IK bones follow the limbs.
And it has the controls to rotate the correct bones and adjust things like shoulders.

the hand placement could easily be fixed by removing all the keyframes and resetting it to the base pose (alt g, alt r, alt s) then just re-adjusting the palm’s rotation and the finger position.

I do this enough that it takes me maybe 2 minutes to fix something like that permanently… you just need to learn the way blender works a wee bit.

Retargeting Translation: Skeleton means it will use the local translations from the skeletal mesh’s base pose instead of the ones from the animation data. That prevents your mesh from getting distorted in UE4 (e.g., if your mesh’s leg bones are not the same length as the mannequin’s). But since only the animation’s rotations are being used, it also means that you cannot “guarantee” that a bone’s location in world or component space will be the same as the original animation. So your feet may not stick to the ground.

MostHostLA’s suggestion to use IK is probably the best. You can set it up in a post-process Anim BP. Another solution is to retarget using HumanIK in Maya, which has options to force hands/feet/etc. to follow the exact positions of the original animation but then bake the resulting animation using only rotations. You could use that if you want to avoid dealing with IK in UE4.

This still wouldn’t correct interpolations and blendspaces from dipping down when close to a 50% blend would it?

Depends on the animation, but in general, no…really need IK for that.

[Edit] Although I should mention that the starter content and other animation assets have blendspaces where that doesn’t seem to be a problem, so it’s certainly possible to craft blend-able animations without those problems without implementing IK.