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

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.