A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Manual/class-BlendTree.html below:

Unity - Manual: Animation Blend Trees

Animation Blend Trees

A common task in game animation is to blend between two or more similar motions. Perhaps the best known example is the blending of walking and running animations according to the character’s speed. Another example is a character leaning to the left or right as it turns during a run.

It is important to distinguish between Transitions and Blend Trees. While both are used for creating smooth animation, they are used for different kinds of situations.

Examples of similar motions could be various walk and run animations. In order for the blend to work well, the movements in the clips must take place at the same points in normalized time. For example, walking and running animations can be aligned so that the moments of contact of foot to the floor take place at the same points in normalized time (e.g. the left foot hits at 0.0 and the right foot at 0.5). Since normalized time is used, it doesn’t matter if the clips are of different length.

Using Blend Trees

To start working with a new Blend Tree, do the following:

  1. Right-click on empty space on the Animator Controller Window.
  2. Select Create State > From New Blend Tree from the context menu.
  3. Double-click the Blend Tree to enter the Blend Tree Graph.

The Animator WindowThe window where the Animator Controller is visualized and edited. More info
See in Glossary
displays a graph of the entire Blend Tree while the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
shows the currently selected node and its immediate children, if applicable.

For example, the Blend Tree on the left displays only the root Blend Node because it does not have child nodes. The Blend Tree on the right has a root with three Animation Clips as child nodes.

To add animation clipsAnimation data that can be used for animated characters or simple animations. It is a simple “unit” piece of motion, such as (one specific instance of) “Idle”, “Walk” or “Run”. More info
See in Glossary
to the blend tree you can select the blend tree, then click the plus icon in the motion field in the inspector.

A Blend Node in the inspector before motions are added. Use the plus icon to add animation clips or child blend trees.

You can also right-click and use the context menu to add animation clips or child blend nodes:

The context menu when you right-click on a blend tree node.

When the blend tree has Animation clips and input parameters, the Inspector window displays a graphical representation of how the animations are combined. Use the slider

This visualization changes as the parameter value changes (as you drag the slider, the arrows from the tree root change their shading to show the dominant animation clip).

A 2D Blend Tree with five animation clips

Select any of the nodes in the Blend Tree graph to display it in the Inspector window. If the selected node is an Animation Clip, the Inspector for that Animation Clip will be shown. 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.

Select either 1D or 2D blending from the Blend Type menu. The following topics provide more details on these blend types and the settings available in the Inspector window:

BlendTree


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4