|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]||[ Search: ]|
In an animation blending tree, the combination of animations is made by creating a tree of animation nodes that will blend the position and orientation of each bone of the skeleton of the Animesh, hence the name of the method. The structure of the tree, i.e. the choice of animation nodes and the way they are combined, will affect the behavior of the animation.
Each leaf of the blending tree is either a raw animation sequence (user-defined by an artist or acquired by technologies such as motion capture), or a procedural node, i.e. a node dynamically generating an animation. The other nodes in the tree are used for the combination of sub-trees in order to achieve complex animations and behaviors.
A windmill is extremely simple since it has a priori only a single animation: the
wheel turning. This animation will be defined in a very simple animation sequence
CS::Animation::iSkeletonAnimation), with e.g. two key frames.
In order to animate the mesh of your windmill, you would create a blending tree
containing a single animation node, a
that would simply play the wheel animation. Before that, you need to configure the
CS::Animation::iSkeletonAnimationNodeFactory in order to play cyclically,
otherwise the animation will be stopped after it has been played once.
The blending tree has a single node and looks like this:
Now, say that there is more wind, and that you want to change the speed of the
rotation of the wheel. For that, you would access the
in the blending tree (using e.g.
and change the animation speed with
Event if the first windmill example is very simple, it might just not work and
your wheel just don't do what you want. A way to analyze a bit further what is
going on is to use a
CS::Animation::iSkeletonDebugNode. With this node,
you would be able to display the structure of the skeleton of your mesh, and
hopefully to understand your problem.
In order to use the ‘Debug’ node, you would just add it at the top of your
blending tree, i.e. the root, with the the
as a child node. Now, when the animation is played, both nodes are activated,
and you can either animate your windmill and visualize the skeleton.
The structure of the blending tree now looks like this:
CS::Animation::iSkeletonDebugNode | | CS::Animation::iSkeletonAnimationNode
Now, say that you have several different animations of your wheel turning at
various speed, e.g. with the wheel starting to roll out when the speed is high.
You may use a
CS::Animation::iSkeletonSpeedNode that will take all these
animations as input child nodes, and combine them in order to generate a new
animation, whatever the rotation speed asked by the user.
Say also, that you want to attach some pieces of tissue to the wheel, and that
you want those pieces to ba animated through soft body physical simulation. For
that, you would use a
CS::Animation::iSkeletonRagdollNode in order to
create the physical rigid bodies that will represent the wheel (you would need
to provide the collision model of your animesh for that). Then you would create
a Genmesh animated by the soft body controller, and attach it to the rigid bodies
of your wheel.
Now, the structure of the blending tree looks like this:
CS::Animation::iSkeletonDebugNode | | CS::Animation::iSkeletonRagdollNode | | CS::Animation::iSkeletonSpeedNode | ---------------------------------------------------------- | | CS::Animation::iSkeletonAnimationNode CS::Animation::iSkeletonAnimationNode ('normal speed' animation) ('high speed' animation)
Other examples of setup of animations trees and general Animesh usage can be
found in the
avatartest application. The
csbias demo is also another
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
This document was generated using texi2html 1.76.