Game Engine Architecture

(Ben Green) #1
575

(known as blend by aim), and so on. It also provides various special nodes that
are capable of doing things like scaling the playback rate (R) of a clip, mirror-
ing the animation (which turns a right-handed motion into a left -handed one,
for example), and more.
The UE3 animation tree is also highly customizable. A programmer can
create new types of nodes that perform arbitrarily complex operations. So the
Unreal developer is not limited to simple binary and ternary LERP blends. At
the time this chapter was writt en, Unreal Engine 3 did not support additive
animation blending out of the box, although it’s certainly possible for a game
team to extend the Unreal engine to support it.
It is interesting to note that Unreal’s approach to character animation is
not explicitly state-based. Rather than defi ning multiple states, each with its
own local blend tree, the Unreal developer typically builds a single monolithic
tree. The character can be put into diff erent “states” by simply turning on or
off certain parts of the tree. Some game teams implement a system for replac-
ing portions of the UE3 animation tree dynamically, so that a game’s mono-
lithic tree can be broken into more manageable subtrees.


The UE3 Post-Processing Tree (Skel Controls)


As we have seen, animation post-processing involves procedurally modifying
the pose of the skeleton that has been generated by the blend tree. In UE3,
skel control nodes are used for this purpose. To use a skel control, the user
fi rst creates an input on the AnimTree node corresponding to the joint in the
skeleton that he or she wishes to control procedurally. Then a suitable skel
control node is created, and its output is hooked up to the new input on the
AnimTree node.
Unreal provides a number of skel controls out of the box, to perform
foot IK (which ensures that the feet conform to ground contours), procedural
“look-at” (which allows the character to look at arbitrary points in space),
other forms of IK, and so on. As with animation nodes, it is quite easy for a
programmer to create custom skel control nodes in order to meet the particu-
lar needs of the game being developed.


11.11.2. Transitions


To create a high-quality animating character, we must carefully manage the
transitions between states in the action state machine to ensure that the splices
between animations do not have a jarring and unpolished appearance. Most
modern animation engines provide a data-driven mechanism for specifying
exactly how transitions should be handled. In this section, we’ll explore how
this mechanism works.


11.11. Action State Machines

Free download pdf