Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Blend Tree producing non-continuous blends

Discussion in 'Animation' started by jimdose, Nov 5, 2013.

  1. jimdose

    jimdose

    Joined:
    Mar 5, 2013
    Posts:
    9
    Hello,

    I have a strange problem with the blend tree in MecAnim. With 3 motion fields in the blend tree controlled by a float parameter from 0.0 to 1.0, you would expect values 0 to 0.5 to blend from anim1 to anim2, then from 0.5 to 1.0 from anim2 to anim3. Instead, the result for 0.5 to 1.0 is to blend from anim3 to anim2, with 1.0 snapping discontinuously to anim3.

    For example, if you had 3 motion fields with Look Left, Look Forward, and Look Right, adjusting the blend parameter from 0 to 1 should smoothly control the character looking from left to right. Instead it snaps back to the left at 0.5.

    I've put dropbox link to an example of this. Click on "AnimatorController" in the MecAnimBug folder. You may need to drag the model ("vincent") onto the preview panel to see it work. Then adjust the blend parameter on the animation controller. You'll see the head resets itself on 0.5 and 1.0.

    https://www.dropbox.com/s/g7jgmr3ejek9ci9/MecAnimBug.unitypackage
     
  2. jimdose

    jimdose

    Joined:
    Mar 5, 2013
    Posts:
    9
    Ok, I found out what was happening.

    All three anims had the same name for the clip, "Take 001". Apparently, Mecanim uses the string name of the clip to do the blends instead of using the reference that's in the blend tree, and so it picks the wrong animations to blend. This is clearly a bug with Unity. For now I can rename the clips, but I can see this producing unexpected results for lots of people.
     
unityunity