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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Mecanim - How to work with more complex (nested) blend trees?

Discussion in 'Editor & General Support' started by Jordii, Feb 13, 2013.

  1. Jordii

    Jordii

    Joined:
    Sep 14, 2010
    Posts:
    135
    Hey everyone,

    For a game I'm currently working on, I tend to, for most of the movement, work in more complex (nested) blend trees, rather than states. The main character has a 360 degree movement, so I blend between front/back/strafe left/strafe right through a blend tree, based upon degrees from input (think analog stick input). However, I want to be able to move further on from here and have a running version as well, which technically works perfectly fine with blend trees. I don't have a problem achieving this.

    But, seeing blend trees are becoming more complex as the project continues, I've noticed that they're hard to maintain. If I want to add another blend tree half way through the blend tree flow I cannot just attach/detach as easily as I can with states. Instead I have to remove the attached blend tree and redo a bunch of stuff, which make them awful to edit when they're becoming more and more complex. Seeing I can't use states to easily blend from a distinct walk to a very distinct run (states don't sync animations, which makes it jitter if I initiate running at the wrong time) I am forced to work with blend trees. From what it seems, blend trees aren't meant to be complex. However, there are times when this is actually the case. Is there an easier way to maintain these within Unity/am I not understanding something about Mecanim?

    Thanks in advance!
     
    OhiraKyou and Stuart Harrison like this.
  2. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Hi.

    It seems that you are understanding properly Mecanim ( ie BlendTree should be used for synchronized blending). We know that we have some work to do to make BlendTree more easily editable (as you said attach/detach etc..) and that is on our roadmap.

    On the very short term, we will release 2D BlendTrees. I think that these will really come in handy with the problems you are facing ( simply put your animations on a 2D plane, and we will take care of autoplacing on the plane, and do nice blending! look at this http://blogs.unity3d.com/2012/12/07/three-ninja-camp-vii-projects-at-a-glimpse/ ). What do you think ?

    And then for the future :
    - public API for BlendTree creation
    - more powerfull BlendTree graph tool

    So bottom line, I think your issue will be fixed in the near near future with 2dBlendTrees.

    cheers.

    pp
     
  3. Jordii

    Jordii

    Joined:
    Sep 14, 2010
    Posts:
    135
    Hey pierrepaul,

    This seems to be exactly what I'm looking for!Is there any ETA on this feature?
    Thank you very much for your reply :)

    Cheers!
     
  4. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Unfortunalety "When its ready" is the best ETA I can give. Lets say we doing our best to have this for you guys asap.

    pp
     
  5. sotirosn

    sotirosn

    Joined:
    Jan 5, 2013
    Posts:
    24
    Hey dudes, awesome job with this stuff, but I am kind of a noob and I was wondering how you would set something like this up...

    I am in need of making a quadruped and it would be nice to just give it an arbitrary list of scalar properties like so,
    bend body -> left to right
    arch body -> up to down
    twist body -> clockwise to counterclockwise
    spread legs -> in to out
    mood -> happy to glum
    speed -> IDLE to WALK to RUN

    Is there any way to throw in these clips:
    walk
    walk bent left,
    walk bent right,
    walk arched up,
    walk arched down,
    walk twisted cw,
    walk twisted ccw,
    walk happy,
    walk glum,
    walk spread out,
    walk spread in,
    all into a a walk state

    + same as above with run and idle

    or is this asking too much?
     
  6. beeboks

    beeboks

    Joined:
    Aug 11, 2013
    Posts:
    11
    It's been a year and there's still no ability to attach and detach sub blend trees, forcing a bunch of reworking if any blend tree changes need to be done. This feature is a must, and I don't see it as a candidate for unity 5.0 release either.
     
  7. oysterCAKE

    oysterCAKE

    Joined:
    Dec 3, 2012
    Posts:
    149
    Aye, the inability to effectively rework blend trees (plus UI & UX in general) has been a major irritation & occasonal bottleneck. Anyone that's tried the 5.0 beta that can say whether this has changed?
    Either way, progress on Mechanim throughout 4.x has been a considerable disappointment.
     
  8. Stuart Harrison

    Stuart Harrison

    Joined:
    Feb 11, 2015
    Posts:
    1
    It would be great to get an update about the progress of the improvements mentioned above. I'm beginning to get frustrated by exactly the same issues the OP noted above, over two years ago.

    Thanks.
     
  9. SergeantBiscuits

    SergeantBiscuits

    Joined:
    Jul 22, 2012
    Posts:
    17
    Has this really not been addressed? How many thousands of people use Unity and Mechanim, and fundamental basic functionalities like this go overlooked?
     
  10. GarveySoftware

    GarveySoftware

    Joined:
    Sep 28, 2018
    Posts:
    6