Tuesday, 29 July 2014

Blend Trees

Sometimes when animating you want to mix two or more animations

This creates a state where the blend tree is its motion instead of a single animation.


Double Clicking on the state, allows you to edit the blend tree

For now we will concentrate on 1D blend trees. Or in other words,one dimensional.

To start working with a new Blend Tree, you need to:
  1. Right-click on empty space on the Animator Controller Window.
  2. Select Create State > From New Blend Tree from the context menu that appears.
  3. Double-click on the Blend Tree to enter the Blend Tree Graph.

The settings will be read-only if the animation is imported from a model. If the node is a Blend Node, the Inspector for Blend Nodes will be shown.
You can select any of the nodes in the Blend Tree graph to inspect it in the Inspector.

When in two dimensional editing, there will be a directional button to show where your animation is in the scene, and there is also two axis, Axis Y and Axis X since its 2D. We can choose a animator parameter to represent the both Axis. For example we can choose  Velocity X and Velocity Y. Compare to 1D this choice is more open.Once you've chose your parameters,the next step is to attach motion. like 1D this could either be blend trees or motion Fields however not like 1D blend trees,the order which they are placed doesn't matter.
 Best used when your motions represent different directions, such as “walk forward”, “walk backward”, “walk left”, and “walk right”, or “aim up”, “aim down”, “aim left”, and “aim right”. Optionally a single motion at position (0, 0) can be included, such as “idle” or “aim straight”. In the Simple Directional type there should not be multiple motions in the same direction, such as “walk forward” and “run forward”.
This is how it would look like,the red dot will show the direction of the avatar,according to the animation transition.


No comments:

Post a Comment