Hi, i have made a tutorial on how to use the Python plugin to fix the root motion in mixamo.com animations:
# Fixing Mixamo Root Motion with Python
Mixamo.com is one of the biggest source for free (almost) characters animations. Unfortunately its root motion support works really differently from what Unreal Engine 4 expects.
Fixing it is a pretty heavy (and manual) task: you need to add a new bone to the skeleton, fix bone influences and update animation curves for the new bone. You can dot it from Blender, Maya or whichever tool is able to modify fbx files. (and i am pretty sure there is a UE4 plugin somewhere to do it)
The following tutorial shows how you can accomplish the same task with a simple python script.
The scripts have been tested with Unreal Engine 4.16 and python 3.6. If this is the first time you use the Unreal Engine Python plugin i strongly suggest you to start with a more gentle tutorial: https://github.com/20tab/UnrealEnginePython/blob/master/tutorials/PlottingGraphsWithMatplotlibAndUnrealEnginePython.md#installing-the-python-plugin
## Steps
Once our mixamo assets are imported we need to do the following steps:
* Add a new bone to the skeleton that will be the root of the whole tree (the bone will be called 'root')
* Modify the SkeletalMesh bone influences as indexes will be shifted after the adding of a new bone
* Split the 'Hips' related animation curve in two other curves, one containing the root motion (translations, relative to local axis origin) that will be mapped to the 'root' track, and the other mapped to the 'Hips' track that will contain only rotations. The 'root' track must be the first one.
This file has been truncated. show original
Obviously feel free to improve the script for your needs
Awesome, this is very welcome!
Sully_3D
(Sully 3D)
August 11, 2017, 2:50pm
3
if you use the beta character from mixamo and import mixamo animations using the beta skeleton the animations look fine. Then all you gotta do is retarget it…
Miscni
(Miscni)
November 16, 2017, 12:51am
4
Any chance, that the plugin could work on 4.15?
fengkan
(fengkan)
November 23, 2017, 4:10pm
5
Great to know we can use python in UE now!
On 4.18 when I enable preview root motion it doesn’t move. It also doesn’t work when I use animation blueprint (animation stand still like in the preview). Root motion works with animations before this fix.