I have a FBX that contains a skinned mesh, skeleton and animations, how to can I import everything from the same FBX with Flax?
Flax imports either one or another.
If I switch to Animation, the skinned mesh is gone.
If I switch to skinned mesh, the animation is gone.
This FBX is already battle tested in Godot, Unity and UE. Everything, including the animations, imported with default settings out of the box in those 3, because I made a prototype in all the engines using the same FBX, so there’s nothing wrong with my FBX.
I also tried with GLTF to no success.
Documentation
The documentation is not clear on this one. Because from one side it says you have to choose whether the model file is a Skinned Model or an Animation, but then at the same time it mentions that picking up Animation imports the mesh.
But it seems not to be the case?
I’m absolutely lost and confused as to what is supposed to be the 1st and most fundamental step of a game engine - importing meshes and animations - I feel dumb here . So please, any help is appreciated!
Details
I have the following mesh which has a skeleton and two animations that I exported to FBX:
Yes, you I’ll have to import 2 time. One for model and the other for animation. In your animation if you set the preview model to be the model you want you should see the animation play.
So in my case, where I have some industrial machinery where some of the FBX files have 25 animations, I have to export it 26 times (1x mesh + 25x animations). Even Godot handles this transparently and out of the box I.e. drag and drop FBX/GLTF, done, model, skin, animations, collisions, all there.
Hopefully I will have another chance to play with Flax for another project then. Definitely not going through this madness for this current project, of splitting all my existing models.
If there’s a way to suggest features, this is definitely one to be suggested Seamless/Compatible Skeletal Mesh import process, to make it easy for ones trying to migrate from Unity or Unreal.
The FBX is fine and has everything, I used the same file to make the same game prototype with the other 3 big engines.
Unfortunately, the only one yielding a problem with this FBX is Flax.
Honestly, whenever I use Godot or Unity, their way of importing animations is so counter-intuitive to me. It’s just a lot easier to manage seperate animations files for me.
I don’t think this is a deal-breaker at all. Exporting those animation files separately should be a matter of minutes, if they’re all split correctly.
Now if I understood correctly, Flax will require me at least 52 additional steps for a single file that has 26 animations:
Export each animation individually
Import and prepare each one into Flax
What if I change or add a bone? I’m screwed, I’d have to re-export ALL separate animations again, whilst if it’s inside a single FBX, I re-export a single file, done, reflected in the engine.
Anyway I’ll give a try with Flax for another game prototype Really digging the feel of the editor!
The animation files are linked to the skeleton. I imagine they’d still work, unless you’ve been completely changing everything about the skeleton, but I’ve never tried to test that, so take that with a grain of salt.
Yes, this would be how to do it. Even in Unreal Engine, which supports importing everything at once, I’d still set up the animations separately. It becomes easier to manage down the road. For example, when changing a single animation, you don’t have to re-import the whole skeleton and all 26 animations down the road, and re-set them up, etc.
Blender Script to Export NLA Strips as separate FBX files. I spent more time on this than actually exporting manually (there’s a xkcd for that: xkcd: Is It Worth the Time?).
By the way, unfortunately, I gave up on Flax. Some of my animations have bones that drive blend shapes/morph targets. So when I export only the animation, the morph targets do not get exported alongside.
It’s never fair to compare engines, but as I said, in Godot, Unity and Unreal you just drag and drop the full FBX, it’s there, even the animations with blend shapes (and again I say, EVEN IN GODOT 3 which is kind of barebones for 3D)!
IMO, the 3D pipeline is not pleasing at all with Flax, it just complicates things.
Anyway, maybe for a simpler project I may give Flax a try in the future. For now, I’m done.
But other than that I love the premise of “Unreal and Unity had a baby” - this is like the perfect balanced engine! Plus no damn “Loading Assemblies” blocking the view all the time like Unity - I wonder when Unity is going to learn that there’s something called “asynchronous compilation”
So the greatest point for me so far in Flax was quick C# recompilation without blocking the workflow! (and of course just like with Godot and Unreal, Flax also has the source-code available, which is something I like, since I always end up tinkering with the engine/editor code).
You can make a feature request on the github https://github.com/FlaxEngine/FlaxEngine. It would be cool to have an ImportAnimations check mark on the skinned model or model import settings that would import the animations as well (maybe it could somehow get how many animations it has from the FBX and add them to the import list or just populate the animation settings as well once the check mark is clicked).
Good idea, we already support importing materials and textures from model asset so maybe we could also extract all animations from skinned model file as well. I’ll add task for it on a roadmap.