Blender fbx export warps animation

I took some of the modeling courses on udemy some time ago, and am now trying to make my own models for my own game. I’m trying to export a model and animation from blender, but the .fbx file is somehow getting completely messed up.

Here’s the blender file: cliff golem.blend - Google Drive
and the exported fbx: cliff golem.fbx - Google Drive

my export settings: https://imgur.com/lsqU1Yz

I can’t for the life of me figure out what is going wrong here. Has anyone seen this happening before? I could really use some help

2 Likes

Which game engine are you using? That can make a significant difference.

1 Like

I’m trying to export this to unity. But even just exporting it to a .fbx file and reimporting it o blender wraps the animation. I see the same warping when I import it to unity so I think the problem is in the blender output

1 Like

That’s quite likely. I don’t know a lot about FBX so I can’t comment on your export settings (hopefully someone else can), but I do know Blender has some issues with it for several different reasons. It doesn’t help that FBX is a proprietary format, and that it’s apparently lawyered to the hilt.

I tried downloading your model and importing it into Godot, which I’m a lot more familiar with than Unity. Both Blender and Godot have better support for glTF than FBX, so that’s what I used, and there didn’t appear to be any issues with that process at first glance. This further supports your theory that the problem lies with the export to FBX format.

Although FBX is the gold standard for importing into Unity, there are some add-ons designed to facilitate glTF import, and some written/video guides on how to use them. That suggestion is about as much help as I could offer though; you will probably need to experiment with these add-ons on your own if you decide to try any.

Good luck with it; I like where things are going based on the look of that golem! =)

1 Like

Unless you’re using an old version of Unity. Just save the blend file into your project folder. Then Unity will handle the import for you. Yes under the hood it uses FBX, but it can be difficult to get the right settings. The only problem in doing this is if you are working with others they will have to have Blender install for it to work properly from my understanding. That may not be the case once it’s imported, but I don’t know that for sure.

1 Like

Ahh, so Unity can do that too!

In Godot, you can isolate the models, animations, etc. from the blend file and save them as object scenes, at which point you don’t need the .blend file anymore at all - it’s basically just an extra encapsulation layer. If Blender becomes an issue for Unity team members, I would imagine you could do exactly the same thing by saving the .blend file’s contents to Unity GameObjects. Neat!

1 Like

Oh Wow! I didn’t know Godot could take blend files directly. Nice to know.

1 Like

I believe the issue here is the rigify rig. I’ve had the same problem with it in the past and never found a solution.
This post seems to outline the issue but I’m not sure how accurate it is as it’s several years out of date, and besides doesn’t provide a solid solution.

My advice here is to avoid using rigify for anything outside Blender, as convenient as it is. Your model is rather simple so it shouldn’t take too long to make a rig of your own.

2 Likes

That’s pretty interesting =)

The classic problem of [procedural generation in one tool] that the next tool has no way of reading or emulating. In one way or another, it seems like that’s at the heart of almost every “how do I get this into a game engine” problem. While the short solution is to bake it, I wouldn’t know where to begin doing that with rigs and animation data, ha!

Assuming that playing with file formats doesn’t do the trick for OP and save some work, I agree that your suggestion is probably the next best alternative. A little unfortunate if it comes to that, but making game-ready stuff can certainly be unforgiving at times.

1 Like

I was trying to find where to bake animation data in Blender but it appears to only “Bake Animation” during the export which is not helpful at all in this situation. It’s possible I’m missing something since it’s pretty late though.

Another option would be to use some other autorigger such as Mixamo, AccuRig or Auto-Rig Pro. It’s very possible that those will not have the same issue.

1 Like

thanks for the suggestions.

@CoreyKnecht You said you were able to export it to glTF without seeing this issue? Would you mind sharing what settings you used? I just exported it to a .glTF with the default settings and it still has the same warping behaviour.

IIUC the animation baking is happening when I export to .fbx, the export settings do the baking https://imgur.com/lsqU1Yz. The exported fbx file has a keyframe for every bone for every frame, so it seems to be doing that. I thought maybe I could try baking the animation inside of blender… in Object mode there’s the object → animation → bake animation dropdown but of course nothing in blender “just works,” the baked animation doesn’t move my rig at all. Given that the same issue is happening for multiple export types (.fbx, .glTF, .blend) I’m not sure if figuring out why my animation baking isn’t working will actually reveal anything, I imagine it will just be broken in the same way unfortunately.

If I put the entire .blend file into unity, it doesn’t seem to understand that there are multiple animation actions and just shows a single one called “scene.” I assume thats whatever action was last open, because it is the overhead slam one (just with the wrong name), and it sadly has the same warping artifacts.

I filed a bug report with blender #125159 - exporting animation to FBX warps that animation - blender - Blender Projects, maybe they will have some insight

1 Like

Actually, Godot handles this automatically by invoking Blender’s glTF export code when you add the .blend file to the project, so I didn’t even export the file at all. It’s very similar to what Dwayne explained in post 5 of this topic.

I did actually notice afterwards that the AnimationPlayer Godot built for your model only had one animation in it; however, that will probably become less of a problem if you are able to import the .blend file wholesale as per Dwayne’s suggestion. More than likely, you would be able to live-edit the .blend file and see the changes real-time in Unity, so worse comes to worst, you could probably get the animations in that way, but I feel like there’s more to the story when it comes to that.

That’s an excellent idea. Best of luck, and do write back with the results so we can learn a thing or two as well =)

1 Like

so just to follow up here, apparently its an issue with the animation causing too much stretch in the bones which causes a “shear” which can’t be captured by the export process, leading to the animation warping. Reducing the hand stretch on frames 30-50 fixes the export.

I’m a bit confused by all the other context in the linked threads though tbh… I had thought the “only deform bones” exporting option would strip all the other bones, parents, and constraints, which would remove the problem with the shear being applied by the stretch-to constraints. But it seems thats not the case.

Funnily enough I had another animation that was getting warped by what I thought was root motion, but it was actually this same issue. When I reduced the stretch of some of the key frames it fixed the issue

2 Likes

Oh wow, ok then! Great that you managed to get things working :+1:

1 Like

Animation baking is under Object->Animation->Bake Animation. Choose pose for armature. You can also access this while in pose mode thru Pose->Animation->Bake Animation.

2 Likes

Wow, Never knew about the shearing thing. You can turn off or reduce the IK Stretching. When you select an IK controller(hand or foot) In the Rig Properties panel in the n-Panel on the item tab there is

1 Like

Privacy & Terms