Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Blend vs FBX animation issues

Discussion in 'Animation' started by Moosetaco, Mar 9, 2015.

  1. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    I've been trying to get animations working correctly and have been trying to get a twitching/shaking problem stamped out. This morning, after some good sleep, I jumped in and said, "What the hell... see what the .blend would do". The .blend file works while the .fbx is a bit dorked up:

    Now, this is all still new to me so this might be an error caused do to inexperience. I've dropped both files into a scene and both are setup identically except the file extension. Single animation is dropped on each model and I hit play. If the attached image doesn't display: The animation appears to play fine but in the FBX model (on the right) the feet and lower leg have a nice twitch going on, which the gif only mildly shows the twitch movement, while the BLEND model plays fine.

    I thought we are to import blend files as FBX. If that's not the case then I have no issue sticking with what works. robot.gif
     
    ModLunar likes this.
  2. jchapman723

    jchapman723

    Joined:
    Jan 27, 2014
    Posts:
    27
    Try checking the animation compression on the FBX (turn it off), and also the FootIK (assuming you're using mecanim). Lowering the animation compression fixed a lot of my jittery feet issues.
     
  3. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    So I read back over the animation section in the Unity documents and I guess I just misread the tidbit about .blend files in Unity. I'll just stick with the .blend files for now since it works.

    I tried playing around with compression but it didn't help any. Not entirely sure how to turn off the foot IKs either but if the IK bones on the arm aren't causing any issues why would just the feet? However, I do see that there are a lot more keyframes on a foot bone in the .fbx file, so it might be something along those lines.
     
  4. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    Ok.. I couldn't let it go and finally figured it out. I had the hips and spine bones incorrectly setup in blender
    :rolleyes:
     
    theANMATOR2b likes this.
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Glad you found the solution coldjalapeno. How was the setup wrong?

    The IK bones in the arms aren't effected in the animation above, because they are animated in FK not IK.
     
  6. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    I may have spoken too soon, although, the bones were still setup incorrectly. The hip bone was parented to an extra, unnecessary spine bone. After fixing the bone issue I made a couple of quick animations and it appeared to work fine but after creating my idle animation last night, same as the one on the above gif, the twitching was still present. I also noticed that the hand does a little twitch at the end of a 'punch' animation even in the .blend model. So I'm taking a step back and going to do some more research on setting up a proper blender rig/animation for mecanim.
     
    theANMATOR2b likes this.
  7. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    It's been a good minute but I got back around to investigating my issue. All I can say is that my rig was all jacked up so I opted for a simple Rigify rig. The Unity documentation on setting up Rigify is not accurate, to say the least. Followed this video and everything worked like a charm - Video doesn't have any voice instruction but following along is easy enough. Some day I'll get back into creating my own rig but this will do for now.
     
  8. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Just out of curiosity, what specifically was the issue with your rig?

    I had some animations go crazy once and I had a circular reference in my bones (via modifiers).

    As far as I know Unity imports .blend files by calling Blender to export for .FBX and then imports the generated FBX file :)
     
  9. Moosetaco

    Moosetaco

    Joined:
    Jan 27, 2013
    Posts:
    77
    I'm not really sure what the issue was other than lack of experience. :rolleyes:
     
    theANMATOR2b likes this.
  10. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    372
    It's been a while but I was coming across the exact same issue. I use Blender and my animations were coming into Unity very shaky/jittery. Turning off the animation compression in Unity didn't help. But this is what did help!

    Exporting Animations to Unity - Reduce Jitter.png

    It seems the source of the problem was Blender while it was creating the FBX file -- it wasn't sampling the animations frequently enough. I turned up the Sampling Rate under the Animation tab there (this is when you go to File > Export > FBX (.fbx) in Blender). The default value is 1.00, and 10.00 is the max. I bumped that up to the max, 10.00, and the shaking went away! The interesting thing is the file size of the FBX file created didn't get massive or anything.

    [EDIT: Um this actually presented other issues in my animations.. be careful. I'm going to mess around the export settings more actually..]
     
    Last edited: Mar 13, 2018
  11. eliteforcevn

    eliteforcevn

    Joined:
    Oct 25, 2018
    Posts:
    47
    is it solved?
     
  12. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    372