1
$\begingroup$

I'm playing around with Godot and I want to have a 3D character with multiple animations so I can learn how the whole playing and blending of animations work. Since I am no 3D artist, nor animator, some googling led me to Mixamo where I got some characters and some animations to work with. I've been following the process described in this YouTube video for "fixing" the Mixamo files and combining multiple animations into one: https://www.youtube.com/watch?v=3Hk9ljcS1Ro.

Doing this manually in Blender sort of works, but is error prone and time consuming, so I found this script https://github.com/Johngoss725/Mixamo-To-Godot/blob/main/Mixamo_RM_Godot.py which I further modified and adapted to my needs. Now I can basically run this script and have it combine 150 different animations without skins and a single character with skin in a minute or two. Great success!

Except it only works with the XBot or YBot characters, all other characters I've tried this with results in a weirdly mangled character and I cannot figure out why...

Steps to reproduce:

  • New blender file -> Delete everything

  • Import XBot.fbx (I choose Automatic bone orientation and Ignore leaf bones)

  • Apply all transforms

  • Select the Hips bone

  • In Graph Editor select the Location keyframes -> Scale, Z, .01

  • Rename the action to T-Pose

  • Import Walking.fbx (I choose Automatic bone orientation and Ignore leaf bones)

  • Apply all transforms

  • Select the Hips bone

  • In Graph Editor select the Location keyframes -> Scale, Z, .01

  • Rename the action to Walking and stash it

  • Delete the animation armature

  • Back in the original XBot armature I open the NLA editor and select the stashed Walking action

  • Success!

Repeat the same steps for pretty much any other character (for example Dreyar) and you end up with a mangled animation...

I've messed around with various scripts and tools that all purport to handle this process automatically (i.e Mixamo -> Blender -> Godot) and they all have the same problem (in addition to many other problems) where they work with the XBot and YBot charachters, but none of the others.

Blender files, models and animations Result with the XBot model Result with the Dreyar model

Maybe it's my whole mental picture of how this should work that is wrong...

The way I understand it an animation is just a set of keyframes along a timeline, each representing the location and rotation of a given bone at a given point in time, along with some settings for how to interpolate between each keyframe.

Based on this it would seem logical that as long as my characters share the same skeleton with the same bones I should be able to apply the same animation to them with the same result. I understand there is a little more to it than that, but that is the basic concept, right?

But it seems that Mixamo does some "magic" when retargeting animations that I don't understand. The "easy" solution would be to download each animation for each character from Mixamo, but this is slow and tedious. It works for the XBot and YBot without downloading separate animations for each, so it should be possible to retarget them to other characters as well, right?

$\endgroup$

1 Answer 1

1
$\begingroup$

When I Import your FBX (Xbot or Dreyar) and under Dope Sheet > switch to Action Editor, I can simply assign Walk action to both and it works fine.

enter image description here

If you want to combine several actions go to NLA Editor and stack them as needed.

Edit

Later I tried also your second character Ch25 that has the switches in bone axis.

The thing is - Mixamo seems to be quite messy in sources. For models like Xbot I would have to enable Automatic Bone Orientation to get them in right direction ... for your Ch25 rigged in Mixamo and imported into Blender they are orientated correctly. It means these two rigs use different bone orientation and results in messy result when an action is shared in Blender between rigs.

Another Mixamo character like EXO_Gray on other hand has completaly different bone naming ... it means vertex groups are named accordingly ... it means completely incompatible with Xbot's action.

Conclusion

Since Mixamo's sources doesn't seems to be sync, you would have to use some retargeting addon. Addon Auto-Rig-Pro [$] worked for me at glance (you can find other scripts, but I'm not experienced with them, so I can't say how hard or easy is to use them).

Addon contains retarget feature. Since you let Mixamo to rig your character and you import FBX back into Blender ... select Source, Target, click to Build Bones List, Set as Root - mixamorig:Hips / mixamorig:Hips and press Re-Target.

enter image description here

enter image description here

Note: For fixing bone orientation see https://blender.stackexchange.com/a/249651/2214 there is one paragraph in the answer explaining that issue and how to avoid it.

$\endgroup$
2
  • $\begingroup$ Sorry for the huge post with probably multiple problems all in one. But yes, the issue was actually me using "Automatic Bone Orientation" when importing the character. If not checking that I was able to use the same animation for botch characters! Thank you! Now a side note, apart from the aesthetics is there any problem with having the bones oriented all crazy like this? I.e. all sticking out? I liked the way it looked when using "Automatic Bone Orientation" because the direction of the bones made sense to me this way. Can i "fix" them after importing without messing up the animation? $\endgroup$
    – DrLeary
    Dec 15, 2021 at 15:13
  • $\begingroup$ Edited ... see a note. $\endgroup$
    – vklidu
    Feb 10, 2022 at 7:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .