Mixamo Multiple Animations .fbx → Blender → .babylon Format

Hope this is the right place to post this!

This guide walks through importing multiple Mixamo .fbx models with animations into Blender and exporting as .babylon format.

Hope others can find this helpful!

5 Likes

Welcome to the community !!!

We should definitely find a place for it in the documentation, ping @PirateJC to take care of it :slight_smile:

1 Like

Thank you! :smiley:

Hey @gbz! Welcome to the Babylon Family! This is awesome documentation! I’d be more than happy to add this to our docs page for you! Quick favor to ask. In reading through this guide, it looks like you need to have the Blender to Babylon.js exporter installed correct? This one: GitHub - BabylonJS/BlenderExporter: Exports From Blender to Babylon.JS in JSON / .babylon format

Do you think you could add something to your doc about needing to have this installed? Maybe towards the beginning of your guide? Thoughts?

Thanks again for doing this!

1 Like

FYI.
Another usefull MIxamo to Babylonjs guide.

1 Like

Thank you, @PirateJC!

As you suggested, I added a step about installing the BabylonJS BlenderExporter and a few other things!

Please let me know if we can add anything else :smiley:

1 Like

Here we go!

https://doc.babylonjs.com/resources/mixamo_to_babylon

Thanks again for contributing this great doc! Love it!

2 Likes

@PirateJC, thank you so much! :smiley:

1 Like

Nice tut!

1 Like

Going through the docs for this guide when I delete the armature it deletes the animation. I’m not sure what is going wrong. Is there a video of these processes?

Hi @bluopp, please check out the video posted as a reply to this question: Problem Loading Meshes with Textures

There is also this video, which I have used in the past as a reference.

1 Like

Sorry for the necro but I wanted to list somethings that helped me. Following the guide that gbz made I was able to get multiple animations in a single babylon file but my mesh had to be scaled by 0.01 when importing into babylonjs, I’m not sure how gbz was able to get a reasonably scaled model directly from the exporter without the animations screwing up.

Another thing I’m not sure if it is a problem with the blender exporter but my animation ranges were off by a single frame, I had to increment each ‘from’ point by 1 and then everything played great!

1 Like

@DarkMatter, I’m currently facing both of these exact issues as well.

  1. Mesh Size

IIRC, Mixamo .fbx models were imported into Blender at 0.01 scale. However, trying to Apply Scale to 1 causes the entire model to move and the animations to distort (have no idea why). The only solution I could come up with was to scale the model by 100X to get a resulting scale of 1 (0.01 * 100 = 1). After exporting to .babylon and importing into Babylon.js code, I have to scale the model back down by 0.01X. Since weapon models are then parented to this character model scaled at 0.01, these weapon models are scaled down by 0.01X when parented. It would be much more convenient if I could somehow set the parent character model to scale 1, but couldn’t figure out how to do this (tried baking transform into vertices).

  1. Animation Ranges

As DarkMatter mentioned, sometimes the animations range’s from and to are off by a few frames, so I have to manually go into the .babylon text file and tweak the from and to numbers through trial and error for correct animations.

I was looking through the exporter code and there appears to be an issue if the animation doesn’t start on frame 0. The animation range is then incorrectly set as starting from 0 instead of whatever the offset is. The fix is pretty easy and makes it so we don’t have to modify the babylon files manually.

To fix the scaling issue I download the mesh from Mixamo and delete the armature so that only the mesh is in the file then scale the mesh by 0.01. You can then reskin the mesh in Mixamo and when you follow gbz’s tutorial the scale is correct so you don’t have to do it in the engine and all children won’t be scaled funny.

2 Likes

@gbz I noticed you had an issue that if you did not have the tpose animation be the last one your animations were corrupted. This is because when the exported is exporting the mesh it is in the last pose that was exported. If you switch the blender mode to edit before exporting the mesh it will ensure that the mesh is in the correct t-pose. When I get time I’ll fork the exporter and fix the mesh exporting issue and the range error.

1 Like

@DarkMatter, thank you so much for taking the time to understand the Blender Babylon Exporter source code and helping develop a fix for these issues that we’ve faced :smiley:

I on the other hand don’t understand why deleting armatures doesn’t delete animations? I’m not that familiar with Blender. @gbz can you add some explanation why we are deleting some armatures? I suppose because they are not needed, since we only need their animations and maybe don’t need their skeletons to be redundant, however, I’m confused how the animations stick around. Why does that happen? And what if I imported the wrong animation and actually want to delete it?

Short answer is objects do not own others. That way they can be shared.

Same with materials. They will be removed on save, if not referenced by something, or forced to be kept, which you can do to keep animations or materials around which are not in use.

BTW, this the same way in Babylon.

Ok, that makes sense. Importing an FBX file will import different types of data including meshes and animations, and deleting the mesh doesn’t automatically delete the animation. But then after we delete the redundant armatures, what is this magic that allows the left over maximo animations to animate the mesh they weren’t originally imported with? Is this just a convention of naming the bones?