219
Chapter 7
A First Look at Adding Animation
V
    minimum of about twenty frames per second for the motion
to appear continuous. And in every frame, the models in your scene are potentially
changing their position, shape, color, and other properties.
But digital animation does an almost astonishing amount of work for us. A model can
change in many ways over a series of frames. Recall the three basic primitives: Translate
(move in 3-space), Scale (in three dimensions), and Rotate (in 3-space). When a model is
animated in Maya, these are the three core properties that dene the animation of a model
from frame to frame. We can also animate other properties of an object, like color and
transparency. And yet, we dont have to tell Maya how to change our scene for every frame.
How does Maya make the task easier? e workhorse of movement in a 3D scene is
interpolation. We can set what are called “keyframes.” Periodically we change the prop-
erties of a model, place it in a frame somewhere on the Maya timeline, and then set a
keyframe. Maya does the rest. It interpolates between keyframes so that models smoothly
change their properties. Maya contains knowledge of how objects interact with each other
in a 3D world, and so we can also program models to be propelled through space and
collide with each other. We have already looked at particles colliding with objects, and
later in this book we will look at multiple solid objects colliding. But right now, we are
only concerned with the process of animating a single model, and we will do this via
keyframing.
Before we look at keyframing we will start with a limited but easy form of animation.
MOVING AN OBJECT ALONG A MOTION PATH
One of the easiest ways to set up movement in a Maya scene is with what is known as
“path” animation. A model can follow a curve drawn through a scene. We can make an
aircra y by overhead and we can even make it bank while doing so. One variation on this
is to animate a camera and to render the scene from the perspective of a camera moving
along a path. is can be breathtaking and even dizzying.
220 3D Animation for the Raw Beginner Using Maya
We will move a can of Spam along a path and into the mailbox we built earlier in
Chapter 4. In Figure7.1, we see a photo of a can of Spam, which will be used as a texture.
Figure7.2 shows the scene in wireframe. e mailbox is in the middle. e can of Spam is
in the upper le and close to us, so it looks big. Figure7.3 shows a render of the scene at the
beginning, with the Spam high up and far away.
Creating a Path
In Figure7.4, we select the CV curve tool. We lay down a curve in 3-space in Figure7.5.
e can of Spam is actually that short tubular object above the mailbox; it does not
have its texture or its top and bottom in this image. At this point, we need to decide
how many frames we want to use for the Spam ying into the box. e Timeline is set
to 100 frames.
FIGURE 7.3 e Spam on its way—rendered. FIGURE 7.4 NURBS curve tool.
FIGURE 7.2 Spam scene.FIGURE 7.1 Can of Spam.
A First Look at Adding Animation 221
Putting an Object on a Path
Now we go to the Animation Main Menu, as seen in Figure7.6. We Shi-select the CV line
and the Spam, then, as seen in Figure7.7, we choose:
Animation Main Menu → Animate → Motion Paths → Attach to Motion Path
FIGURE 7.5 Curve for motion path.
FIGURE 7.6 Selecting the Animation
Main Menu.
FIGURE 7.7 Attach to motion path.

Get 3D Animation for the Raw Beginner Using Maya now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.