Blend Tree Versus New State?

I understand that Blend Tree’s make transitions between different animations that you add to them, by configuring transitions via parameters. However, can’t you do everything just by making a bunch of different states (with one animation each), and linking them together with transitions? When would you would need Blend Tree instead of just doing that? Just wondering, because Blend Tree’s and “States” seem very alike.

When you want to blend synchronized motion you use a blend tree.

By example if you have 3 clip: run froward, run left 45 degree and run right -45 degree. You can put all of them in the same blend tree and blend them based on the direction parameter. So now rather than having just 3 possible direction: -45 degree(run right), 0 degree(run forward) and 45 degree(run left). You have 1 state that generate a range of motion from run left to run right(-45 to 45 degree).

1 Like

After playing around with blend trees a little, I’m finding them pretty dang useful. For instance, I was making a demo of my rat. Generally, he’ll likely be used as a NPC, but for the demo I thought why not make him as a player for people to try it for 1 scene in the demo. Well, I didn’t make turning animations for walks and runs. So, I used a blend tree and mixed the walk with the normal turning animations. I extended the threshold so that less of the actual turning animations blended thru. With the run, I did the same thing, but with an even larger threshold of -6 to 6. The rat slows down a little during turns, but it works out perfectly.

1 Like

Blending between angles of movement, as mentioned above, is probably the best application, but here’s another simple example. Say you have only two animation clips: Idle and Run. With states alone, you can only have two motions: Idle and Run. But with a blend tree, you can blend varying amounts to go from Idle, to a slow walk, to a fast walk, to a jog, and eventually to Run. 5+ motions from just 2 clips!

And another example: You can also blend posture from a timid slouch to a chest-out strut. As the character gains confidence, you can gradually blend from slouch to strut. Since you can nest blend trees, you could add another layer for, say, crouching versus standing straight. So with the same blend tree, you slide smoothly from crouching-and-slouching to upright strutting just by changing the blend parameter values.

With individual states, you’d need at least six different clips: crouch+slouch, crouch+normal (midway between slouch and strut), crouch+strut, upright+slouch, upright+normal, and upright+strut. And that doesn’t cover all of the in-between possibilities, like a half-slouch.

That said, blend trees have drawbacks. A blend between Idle and Run is just an approximation of walking. It usually looks good enough, but to get a really perfect walk animation you usually need a dedicated walk clip. You can put this into the blend, tree, though.

1 Like