Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Exporting Blender Animation to Unity Causes Foot Problems

Discussion in 'Animation' started by Bryan77, Oct 17, 2014.

  1. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    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 that fixed that specific animation's foot problem sonehow, but now a different animations 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?

    Thank you in advance.
     
    Last edited: Oct 17, 2014
  2. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    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 everytime 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?
     
    MagicStyle likes this.
  3. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    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 animations 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 exception 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 pose with his arms down a bit.
     
  4. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    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.
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Hey Bryan77, I'm not familiar with Blender, I use Max but I saw a couple other posts similar to this.
    One guy fixed his by checking the scale factor of everything. Make sure everything is scaled at the same factor when importing into Unity. Also make sure the scale is frozen in Blender before exporting. I don't know what the proper terminology is in Blender but in Max the term is to confirm the models scale is reset to 100. If the scale in Max is incorrect when animating and importing into Unity things get screwy.
    The other guy fixed his issue by double checking that all IK checks marks were similar with all the assets in Unity. May want to check that also.
    If I was getting this error in Max I would think the foot bones were messed up some how. Scaled and not reset. But usually when that happens it's very obvious when creating animations so you catch it before finalizing animations and you never get to Unity with a messed up scale factor.
    This also looks oddly like maybe it has something to do with the capsule collider. Maybe the collider is set a little high, near the characters ankles and you have IK assigned. So the feet are getting flipped.

    I'm just guessing though. Maybe someone else has a more Blender knowledgeable answer.
    Until then double check all the things I mentioned. Maybe something is off.
    Good luck
     
  6. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    All my scales seem fine. I don't have a capsule collider on the character. I just save the .fbx in my asset folder, and I see all this stuff going on in the inspector.

    Is there a way to delete animations in Unity? I have no idea how to fix this, so I'm thinking about just using a version with 1 messed up animation, and just deleting that one and not using it. Theoretically, if I delete 1 bad animation, the rest should look fine.
     
  7. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    I found that importing animations from Blender to Unity can be very finicky. Very small details can really screw things up. First make sure that in-between attempts that you delete the old fbx from your project. Sometimes Unity retains some of the old settings for some reason. Next, I had the most luck exporting from Blender using the ASCII settings rather than the binary. What version of Blender are you using? I was using 2.71 but 2.72a is now out. 2.72 apparently has some fbx improvements. Third, make sure that your character is in t-pose when you export him and there is no active animation in the action editor. Fourth, IK constraints can mess things up. I believe that I key framed the IK constraints drivers and that helped make sure that my animations showed up correctly.

    Finally, I see that you are using a reverse foot rig. That strikes me as something that might confuse Unity (I have no idea either way). I used a foot rig based off of a Blender Guru tutorial. I forget who did the tutorial but it wasn't Price. The Human Rigging DVD also has a foot rig that doesn't use a reverse foot.

    I hope that is helpful. I'm still pretty new at this stuff and found that getting animations to work properly was almost a bit of black magic.
     
    Noonestuff likes this.
  8. Bryan77

    Bryan77

    Joined:
    Jun 9, 2014
    Posts:
    24
    Thank you GoesTo11. I remember trying the ASCII settings before, and the animations were blank. I tried it again after making sure everything was deleted beforehand, as well as everything being set to their default positions. Now it works! I had another issue with the foot initially, where he wouldn't lift his foot for one of the animations (but the deformations looked good at least) I somehow fixed it (I don't know how but it works.) Exporting with the ASCII settings also ads an extra material slot in Unity, even though it doesn't do anything. But oh well, the important thing is that I have my character working with his animations!