Animated .fbx: from Unity to Blender, and then back to Unity without it breaking?

I have a rigged and animated model in Unity. I wish to make some modifications to it which can only be done in a 3D editor, such as Blender. But the very act of importing into Blender, then exporting back into Unity messes the rigged model up in such a way that the old animations don’t work properly anymore.

I feel like I’ve made one successful step in solving this, which is to get rid of the incredibly annoying “armature” parent that Blender gives every .fbx skeleton on export. I.e. if it was “Root>Pelvis>…” to begin with, when exported out of Blender it’s now “Armature>Root>Pelvis>…”. I fixed that - with the help of Alessandro Ribeiro’s Blender fbx addon. But unfortunately that alone wasn’t enough to solve the problem.

Has anyone successfuly and ultimately solved this seemingly simple problem, which I’m sure is very ubiquitous?

Ever got this solved. Stumbled multiple times over the problem, still not solved for me…

Yes, I think I have. Thank you for bumping this thread, I forgot I had created it.

I recently successfully imported a rigged and animated model from Unity into Blender, deleted the mesh, made my own new mesh in its likeness and skinned it to the old rig, then exported this into Unity - and the old animations worked properly.

The main culprit here seems to have been bone orientation. It somehow changes on import. This is a screenshot from the FBX export dialog:

Unfortunately I don’t remember the exact settings, I think it might have been as simple as flipping one of the axes to negative. I tried every possible combination (luckily there are only 12 I think), and one of them clicked.

I think i tried every variantion now. Didnt find a version that works.
Images


The Version that seems to have the right orientation if i look at the amature/root bone is “primary” Y and “secondary” X…
Till then i will do it the hard way and import the animations also…

Wow, well, I guess your rig might have a different issue then?

For sure I would test whether the animations work properly within Blender at least. In my case unfortunately the animations were in the .anim format I believe, no way to test in Blender.

I forgot to add that the moment of fbx import from Unity into Blender is also important. This is the dialog that I’m talking about:
9341744--1306946--2023-09-19 15-53-26.png

  • Ignore leaf bones - this is deleting those “nubs” at the end I believe, don’t think it’s actually important, but just to be safe I leave it off
  • Force connect children - this is a pretty big one, I think. In that, it might actually change the internal hierarchy of the rig and thus screw it up later down the road. If you leave if off, then bones might be floating in the air separate from each other but it doesn’t mess up the rig.
  • Automatic bone orientation - honestly don’t know what it does exactly but it sounds like it might be worth fiddling with
  • And obviously determining the bone axes incorrectly on import might be causing the issue.

I remember changing some of these import settings too so might be worth checking out.

Also try to choose “FBX all” for Apply scalings.

How did you managed to import from Unity? I’ve been trying with some old models that i did but some good animations, no success on it.

Well, what do you mean exactly? The .fbx model files are stored in the project folder. You can just go there and copy them to wherever you need, or import them from that folder directly into your 3D editor software. There’s also GameObject > Export to FBX.

The thing is i can import to Blender, but in Blender only the model and the rig comes out, the animation is still only visible in-engine, even with Export to FBX.

Are you sure the animation is actually stored inside the model .fbx and not separate file? (separate .anim or a separate .fbx)
When it’s in Blender you have to check what Actions have been imported by going Outliner window > Blender File > Actions dropdown or Dopesheet window > switch to Action editor and there’s a dropdown with all the actions currently in the file

Unfortunately this problem still persists. Reversing the axis on export (Y/X to X/Y) isn’t the panacea I had thought it to be. I seem to have tried every single option for export from Blender and import settings in Unity, but no luck.

FBX is a native Autodesk format so Blender having problems with it is somewhat expected.

Still, I wanna keep trying for the heck of it.

Left: model imported from Blender with Blender animation, right: original model trying to use Blender animation. All the bones are the same, Generic rig. Noticed that the bones themselves move exactly the same, but for some reason the model on the right (original model) deforms weirdly. Could be an issue with SkinnedMeshRenderer/bone indices.

My FBX blender to unity pipeline is now based around this. Maybe it can help

Thanks, but not quite at the point where I’m ready to spend $28 on the off chance it might solve this.

1 Like