Search Unity

Blend Shapes not animating correctly

Discussion in 'Animation' started by CrowPickle, Feb 11, 2015.

  1. CrowPickle

    CrowPickle

    Joined:
    Dec 31, 2013
    Posts:
    3
    I have a character with expression blendshapes that I have animated in Unity. While I am previewing the animation clips, they work as expected. However, when I run the game, Unity subtracts the beginning keyframed blendshape weight from the entire animation.

    First example: The blendshape is keyframed from 25 to 100, but in-game it animates from 0 to 75.
    Second example: The blendshape is keyframed from 100 to 0, but in-game it animates from 0 to -100.

    Can anyone help me figure out why Unity is normalizing the first keyframe to 0?

    EDIT: I've discovered that setting my blendhsapes to the start weight of the animation ON THE PREFAB will eliminate this weird offset that's happening. Unfortunately this only solves for a single animation. If I have another animation with different blendshape start weights, I run into the weird offset problem again.
     
    Last edited: Feb 11, 2015
  2. CrowPickle

    CrowPickle

    Joined:
    Dec 31, 2013
    Posts:
    3
    SOLVED!

    As it turns out, it was the Blending mode option in the Animator's layer options. For blend shapes to work correctly, I needed to set the blending mode to Override and create an avatar mask that masked all parts of the rig (blend shapes are not bone dependent so you should mask all bones).

    There's still very little documentation about using blend shapes in Unity so I hope this growing pain of mine might help someone out in the future.
     
    theANMATOR2b likes this.
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    @CrowPickle - thank you very much for updating your thread. This will definitely come in handy for other animators using blend shapes / morphs.
     
  4. Debashish_bj

    Debashish_bj

    Joined:
    Nov 11, 2014
    Posts:
    14
    My blendshapes are not animating correctly inside Unity3D.
    I am using Legacy Rig setup, its a custom rig made in 3DS Max.

    I tried using Keyframe reduction, but still the problem occurs.
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    Best to make a unique thread for your issue @Debashish_bj
    And you need to provide a little bit more information. What happens when you don't use keyframe reduction?
    Do the morphs work in Max?
     
  6. Debashish_bj

    Debashish_bj

    Joined:
    Nov 11, 2014
    Posts:
    14
    Sure, yes.
    When keyframe reduction ON, still the problem persist.
    Yes, the Morphs are working smoothly inside 3DS Max,

    also, for every anim clim (frame numbers), I keyed the particular morph to ensure proper functioning when exported to Unity3D, but still Unity did not detect the anim.
     
  7. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    Did you check animations, skin, deformations & morphs in the export? I believe deformations and morph are not checked by default.

    Try a simple rigged sphere with 2 simple morphs. Export and import into Unity. See if that works if all export settings are correct.
     
  8. Debashish_bj

    Debashish_bj

    Joined:
    Nov 11, 2014
    Posts:
    14
    ok..
    I will try this basic test.
    Thank you
     
  9. rossstyantsemteq

    rossstyantsemteq

    Joined:
    Apr 1, 2019
    Posts:
    2
    What the heck... this is happening to me in UNity 2018... how is this still happening... Setting the blend mode to Override is not an option for me as this is an additive animation layer... i can't set it to override because it will ruin the other facial animatoins that are going on. I'm animating one blend shape for example from 90 - 100 in a loop... and when i run it - it actually animates that blend shape from 0 -10... this is rubbish... or, anyone tell me what i'm doing wrong?
     
  10. pitokmid

    pitokmid

    Joined:
    Jul 13, 2019
    Posts:
    1
    Just found out... before exporting set all blendshape weights to 0. otherwise unity will add up on top of whatever facial expression you exported.