Exporting blender animation to Unity causes foot problems

Hello. I have a game character I modeled, rigged, and animated in Blender. I am trying to put it into unity. However, once it is in Unity, I noticed that some of the animations have the foot bone in the wrong spot, which makes it look bad. It is weird because the other animations are fine, just this one is bad. I re exported it, and then that fixed that animation’s foot problem, but now a different animation has problems. All the animations look fine in Blender. It is only in Unity that they look bad. Does anyone have an idea what could be going on here?

Blender’s foot rig

Soldier06.fbx and Soldier08.fbx
Messed up Animation

Good animation

Soldier07.fbx

this version has the march with flipped feet, while the shield march is fine in this version

Does anyone have an idea how to fix this?

Update. I tried troubleshooting by first making sure everything was named correctly. I exported, and the same thing happened. Then I exported again with no changes, and now I get this.

Now every time I export I keep getting this jumbled mess. It looks like a bigger version of what the initial problem was. This is also for every animation, not just a select few (like originally) Has anyone ever came across anything like this?

I did some more exporting, the new exports have him looking normal, except that the animations don’t work at all. He is perpetually in the walking pose.

Also, all my old exports where all the anitions worked (with the weird foot problems) too don’t play their animations, but instead have him in the walk pose. Here is Soldier07.fbx which I earlier mentioned did work (but with flipped feet) As you can see, the selected animation is “Default” Which should have him with his arms out. This is the same for all of my exports. with the exceptoin of Legionary01.fbx (Which does have animations, except it too has the foot problems as shown earlier) and Legionary02-08 in which he looks like a pile of parts as shown in my last post.

I don’t know what is going on.


“Default” should be in a T bose with his arms down a bit.

I re open Unity, and for some reason the animations work again, but still have the foot problems in some of them. I don’t know whats going on.

I have never had problems like this so I’m a bit lost trying to read through what your problem could be. Do you have a beta version of Unity? When I last checked (several months ago…) the newest download was a beta and there were many strange glitches. Are these traditional animations or IK?

Have you tried simply using the .blend in Unity instead of exporting to .fbx? That’s what I usually did and I never had problems.

I do notice that all of your ranges are outside the source take in your original pictures. I doubt that causes problems but you might want to fix that just to be sure.

Also, are you using custom shaders? I had some very strange glitches when using custom shaders, and they changed when closing and restarting Unity. I never solved them, but your latest post reminds me of that so that might be something to test.

I have never had problems like this so I’m a bit lost trying to read through what your problem could be. Do you have a beta version of Unity? When I last checked (several months ago…) the newest download was a beta and there were many strange glitches.

I believe I have the normal version of Unity.

Are these traditional animations or IK?

Well, the feet are IK. You can see in the top picture, that the one sticking out the back is the IK target for the shin bone. That is parented to the backwards angled looking one that allows him to lift his heels off the ground, while keeping his toes stationary. That bone, along with the toes are parented to the backwards looking control bone that allows him to tip toe completely (non deform) that one is parented to the forward looking control bone that I use as the main leg control.

Have you tried simply using the .blend in Unity instead of exporting to .fbx? That’s what I usually did and I never had problems.

I tried that just now, and I get an error saying that Blender could not be found, and to make sure blender is installed. I use blender through the .zip file. I don’t usually install it. The whole point of this soldier is actually to be included as en example model for a script that a friend of mine is selling on the Unity Asset store. The people who download this script and model might not have blender, which is why I was trying to use fbx. so that they can use it with no problem.

I just came home from work, and opened unity, and it looks like the big pile of polygons as shown in post #2, is no longer a pile, but rather looks normal. I also took a closer look at the model in the preview window, and saw that his spear is not lined up in his hand correctly in some of the animations.

I wonder if this is somehow related to the feet. because the spear is actually weighted to a spear holder bone, which is location, and rotation constrained to the hand. I did this so that in the “die” animation, I can lower the influence of the constraint, so that he can drop his spear, (and I can animate the spear bouncing off the ground)

The spear is correct in some animations, but wrong in others, just like the feet.

Its also very peculiar that some of my legionary were in a pile of polygons, yet now they are looking normal for some reason.

I do notice that all of your ranges are outside the source take in your original pictures. I doubt that causes problems but you might want to fix that just to be sure.

I think this might be due to all my animations starting on frame 0. I’ve always done this with no problems. The reason i do this is so that I can have looping animations where the first and last frame is the same. yet since the first keyframe is on 0, that frame never gets played, this way my loops are seamless. Otherwise I will have 2 frames be exactly the same, and my loops will look bad.

Also, are you using custom shaders? I had some very strange glitches when using custom shaders, and they changed when closing and restarting Unity. I never solved them, but your latest post reminds me of that so that might be something to test.

I’m just using “Toon/Basic Outline”

I just came home from work, and opened unity, and it looks like the big pile of polygons as shown in post #2, is no longer a pile, but rather looks normal.

I have had things like this happen, where everything goes haywire and a reboot fixes it. Possibly it isn’t related to the foot problem?

I believe I have the normal version of Unity.

Well, the feet are IK.

Only Unity Pro has IK support, maybe this is the problem? Other than that I am clueless. It almost looks like Unity is confusing 360 and 0 degrees or something like that, maybe you could double check and see if your animations are going out of the [-180, 180] range

thank you for reply KnightsFan.

The question on if my feet are IK are not confuses me, as that’s how one should always do feet. Unless you mean dyanamic IK for inside the game, so your character steps realistically up stairs and such. In which case he does not have.

I asked this question on the Unity forums, and someone told me to re export using the ASCII settings, and to make sure that everything was zeroed out, and set to default positions and such. I did export as ascii, and had some different issues, but I tried again making sure everything was super clean. (Loc rot scale all applied on my objects, slider set to zero, action editor set to default, etc.) And it seems it exports correctly now. I did have another probolem in that that foot wouldn’t go up for his step (but at least it didn’t deform weird) I selected that animation in the action editor to check it (it was fine) re selected default, and then exported again, and it was fixed. I don’t know what is causing these issues, but it looks like I got it fixed. Now I’m just waiting for my friend to get around to see if it works on his end for what he is trying to do.

Thanks for all the suggestions!