Search Unity

blendshapes not working with animator controller existing

Discussion in 'Animation' started by unity_tUEmZeRU8aAX2A, Jul 2, 2019.

  1. unity_tUEmZeRU8aAX2A

    unity_tUEmZeRU8aAX2A

    Joined:
    Jun 27, 2019
    Posts:
    1
    hi, have a player with idle, walk and run animation, created a blendtree and set navagent speed as parameter to control the blend of the animation.

    player also have blendshapes to make body skinnier when equipped with armor or whatever. And the weight is adjustable in inspector.

    but when at run time, all the weights just return to 0, and not adjustable anymore no matter by hand or by scripts.

    if I remove the animator controller, there is no problem to adjust the weight of blendshapes.

    can anyone shed me some light on this matter? I googled the problem, but found no similar situation. I'm pretty new to game dev with unity.
    o_O:(
     
  2. waller_g

    waller_g

    Joined:
    Jan 16, 2017
    Posts:
    12
    Bumping this because I am experiencing the exact same issue. I'm hoping this will necro the original question and maybe get an answer.
     
  3. waller_g

    waller_g

    Joined:
    Jan 16, 2017
    Posts:
    12
  4. waller_g

    waller_g

    Joined:
    Jan 16, 2017
    Posts:
    12
    Just for posterity's sake, I'm posting the solution I found here. https://answers.unity.com/questions...2.1556685552.1586958488-1906029853.1484055447

    I have no idea why the selected answer works, but, it works. It adds a tonne of micromanagement to my model exports, especially while they're still in active development, but it's what has to be done, I guess.

    I would still love to know if there is another, more viable solution to this that isn't a hacky abuse of blender's data blocks.
     
    DumlerJason likes this.
  5. DumlerJason

    DumlerJason

    Joined:
    Mar 28, 2020
    Posts:
    8
    The solution in the above post worked for me.

    In Blender 2.8?, I unchecked the "Relative" option under my blend shapes, which removed the blend shapes being relative to the base blend shape. While testing the blend shapes I'll have to remember to check it.

    I saved my Blender file (I did not export to FBX), imported the file into Unity, reassembled all the parts of the file, and then I was able to assign blend shape values while my character executed the idle animation.

    The underlying cause is that the blend shapes, which are not part of any animations in Blender, are assigned a value of "0" in the animations when they are read in from the Blender file. The animations are read only once imported, so the blend shape values cannot be removed from the animations. If you're playing an animation, an idle animation for instance, the blend shapes will constantly be set to "0".

    I'm going to say this is an issue that Unity needs to address (or not, I haven't paid anything for it) because Unity offers the Blender import option. Blender is responsible for saving a file that Blender can read, and Unity is responsible for reading the Blender file because they say they can. Their reading of animations and blend shapes is JaNkY and they should fix it. Or not. Again, I haven't paid anything for Unity.
     
    waller_g and Recluse like this.
  6. Recluse

    Recluse

    Joined:
    May 16, 2010
    Posts:
    485
    Last edited: Dec 14, 2020
  7. Marnus-Koek

    Marnus-Koek

    Joined:
    Mar 23, 2021
    Posts:
    2
    Damn these years old posts always seem to come in clutch! if you have a model and a animation blend file each saved seperately remember to tick the relative box off in both. learned that the hard way.
     
    Sanman2005 likes this.