102

1 color=black> Below is a cache of http://xenia.media.mit.edu/~wave/PhDThesis/Chapter4/Ch4.pdf. It's a snapshot of the page taken as our search engine crawled the Web.
The web site itself may have changed. You can check the current page or check for previous versions at the Internet Archive. Yahoo! is not affiliated with the authors of this page or responsible for its content.
102
102
In the last chapter, we saw how to build the model of the character's body, props
and environment. We now move on to the question of animation, which in WavesWorld
specifically refers to the process of measuring and manipulating the model's articulated
variables over time. In a traditional computer graphics animation system, an animator
would directly control the values of these variables over time, usually by setting their
values at key frames or by attaching a spline to the variable and manipulating it directly. In
a physically based computer animation system, the animator might simply allow
simulated physics to run its course after setting up the initial conditions, and hope for the
best.
In WavesWorld, however, the animator builds and configures a set of processes,
called agents, that measure and manipulate the character's parts (i.e. the model built out
of eve objects) over time. These agents become the eyes and hands of the animator. By
building and layering configurations of agents together, the animator can build up
complex characters that they and their fellow character constructionists can interact with
at the task-level.
This chapter begins with a brief review of what agent means in WavesWorld. I
then segue into some background material that should give some insight into this agent-
based approach to animation. I briefly discuss my Master's thesis work, Build-a-Dude
(Johnson91), and some of the issues that arose during and after that work. I then walk
through a simple example of how one can use agents to build up the behavior generating
components of a character with a minimal body (a point on a line).
I then give a more formal introduction to how agents are used in WavesWorld. I
discuss some important issues that arise when building agents and hooking them
together, with a special emphasis on skill agents, which are agents that can both
measure and manipulate models. Finally, using some of the models I introduced in the
Introduction
4
An Agent-Based Approach to Animation 103
previous chapter, I explain a few more complex examples of how we can use agents to
create a character's behavior, where behavior is loosely defined as the result of processes
(agents) measuring and manipulating a model's articulated variables over time.
Before I begin discussing my agent-based approach to behavior, I need to briefly
discuss what I mean by agent. Unfortunately, the term agent is a rather overloaded
one, given both the amount of abuse it takes in the popular press and its dual nature in
the AI literature. In this dissertation, I use the definition of agent proposed by Marvin
Minsky in his book, The Society of Mind:
Any part or process of the mind that by itself is simple enough to understand -
even though the interactions among groups of such agents may produce
phenomena that are much harder to understand. (Minsky86)
In WavesWorld, an agent really just refers to a software module; an autonomous black
box that has a well defined purpose, a separate namespace and its own thread of control.
I use the term very carefully, and whenever it is used in this dissertation, it explicitly refers
to such a black box that, when opened, is readily understandable by someone who might
build such things (i.e. a programmer).
Build-a-Dude
In Build-a-Dude (Johnson91), the system I designed and built for my Master's thesis
work, I eschewed dealing with the issue of a character's body, and looked instead at the
composition of its behavior repetoire. I felt that if I allowed myself to either begin with the
graphics, or to try and tackle both the mind and the body simultaneously, I would be both
seduced and overwhelmed. Creating computer graphics is a compelling and heady
experience, and my intent with Build-a-Dude was to concentrate on the less visceral, but
still compelling, issue of the processes that generate a character's behavior. This system
was notable in that it was implemented in a fault-tolerant, parallel, distributed fashion,
where the processes generating behavior could run on a heterogeneous set of computing
devices. Even so, there were severe restrictions that precluded easily adapting it for the
task of building graphically simulated characters: the model it was manipulating over time
Whats an Agent?
Background 104
was really just text, and time was in discrete ticks, with all elements moving forward in
lock-step.
I didn't realize it at the time, but there were really two problems I was dealing with in
my SMVS work. The first was what are the low-level processes that comprise the behavior
repetoire of a character? What are the building blocks; what are the essential elements?
The second question was how are these elements configured? What mechanisms do
we use to sequence and select these elements' activity? At a base level, much of AI
research has centered on these same issues, but I was interested in it with a very special
slant towards building graphically simulated characters, not real robots or abstract
software machines.
Planning Algorithms
One enormous help and impetus in this exploration was an algorithm (Maes89)
developed by Pattie Maes, originally for robot locomotion. Situating my thinking with this
algorithm was enormously useful, and it dovetailed nicely with work my advisor had been
doing independently, trying to apply ideas from the ethological literature to the problem of
computer animation (Zeltzer83, Zeltzer91, Zeltzer88). At the time, I tried to reshape
Maes' action selection algorithm to fit all of the lower-level motor planning of an
autonomous animated character. My implementation of this algorithm (and our
extensions to it) are detailed in Appendix A.
Another problem that became apparent as I worked on Build-a-Dude and began
working on WavesWorld, was the pervasive need for being able to debug what was being
constructed. Given that what I was essentially trying to do was build a software
development environment where the application under construction was to run in a
distributed, parallel fashion over a wide range of resources, this should have been not
been surprising.
Early Worlds
I then began trying to actually construct graphically simulated characters using an
early version of WavesWorld. I built two worlds: raveWorld and sanderWorld.
raveWorld
RaveWorld was a collaborative one done with Abbe Don, and the intent was to
experiment with multiple simple characters interacting with each other in a rich 105
environment. Each character had a torso and a head, where the torso had some texture
map on it. The characters (ravers) were in a space where music was playing, where
attributes of the music (song name and artist, beats per second, current lyric, etc.) were
made sense-able to the characters. There were also three video screens in the
environment, which were playing a series of images (by cycling through several thousand
images from several sequences from films, texture-mapping them onto a polygon in the
space). The ravers all had names, and favorite songs, colors, and video sequences. They
also had other ravers that they liked and disliked, as well as songs they didnt like.
We built some simple skill agents, where a raver could dance to its favorite song, or
move closer to a nearby raver it liked, move away from a raver it didnt like, texture map
an image playing on one of the screens it liked, etc. We also built sensor agents to let it
know when its favorite song was or wasnt playing, when a raver it liked or didnt like
was nearby, etc. This all ran in real-time, with the display on a multi-processor SGI
(running at ~11Hz), computation distributed some ten or so machines, and the sound
and UI running on a NeXT machine.
sanderWorld
The next world I built was sanderWorld, which was inspired by the example used by
Maes in her original paper on her spreading activation planner (Maes89). I built my robot
sander as a simple 3D robot (actually a modified raver with two hands). It was in a simple
environment running on the same multi-processor SGI that raveWorld ran on, where a
user could manipulate the board with a data glove or by several other controls. I
implemented a GUI to manipulate and visualize the parameters, running on a NeXT
machine. Also, the agents in this world talked (using a variety of sampled voices), where
the audio was spatialized (sensor agents and some skill agents were on the left, goal
agents and the remaining skill agents were on the right). Whenever an agent was
executing, it described what it was doing by sequencing the appropriate sound samples
(again, running on a NeXT machine).
Lessons Learned
Building these two worlds was invaluable. I learned several things, all of them the
hard way. The first was that the elements in the environment that are obviously
perceivable
to a user (or viewer) must also be perceivable to the character; if its not, a
user is immediately fixated on why didnt character see that? This included things that