Whew, okay, good to be done with last week's work. This week we'll be taking our first steps into the wonderful world of animation via the Bouncing Ball Express and a process called "layered" or "component" animation.
The first thing to make sure of when starting this project is, of course, to set your Maya environment to the Animation menu set from the pulldown at the upper left of your workspace. Now, go ahead and create a primitive: either a polygon or NURBS sphere. The sphere will be your new bouncing ball. Also create three NURBS circles to act as your ball controllers. You'll probably want to scale their components (F8 for Component Mode) each a little differently to make them visible near each other, like in the picture below:
Parent these three controllers in order from the largest (as parent) to the smallest and then Delete History (Edit --> Delete by Type menu) on them. Name the controllers translate_ctrl, scale_ctrl and rotate_ctrl, in that order, and then parent the ball under rotate_ctrl (the smallest circle). You may also wish to create a NURBS or polygon plane primitive to act as your floor plane. Otherwise, just use the generic Maya grid to represent the floor plane.
Now you're all set and ready to animate! You'll want to set up Maya's windows so you can see your soon to be created keyframes a little more clearly. Press the 4th icon in the view presets toolbar at the left of the screen to choose the Persp/Graph preset so that the Graph Editor is included in your workspace. You can also find this preset under the Window --> Saved Layouts menu.
To get things started off quick, let's set an initial key. Because this is a layered approach to animation, we're only going to animate one aspect of this bouncing ball at a time. We'll start with the up and down motion, which means the Translate Y channel. Select translate_ctrl and translate it "up" along the Y axis to a "drop" height of your choice (don't make it too high or you'll be bouncing forever!). Now select the Translate Y channel of translate_ctrl in the Channel Box and right click on it. From the popup menu choose Key Selected.
You'll notice that a new dot appeared in the graph editor on the first frame where you created this keyframe, and a channel called Translate Y appeared under the name of your controller in the Graph Editor. Now click and drag the Time Slider at the bottom of your screen to advance to a new frame. Go a good 6 or 8 frames forward. At this new frame, translate translate_ctrl back down the Y axis until it comes in contact with the floor plane. Select the Translate Y channel, right click, and Key Selected. Another dot appears in your Graph Editor, now with a green line connecting it to your first keyframe on frame 1. Congratulations, you're animating! Repeat this process for several more up and down poses, making each bounce progressively shorter and quicker. When you're done you should see something like this:
If you need more frames to work with, go ahead and adjust the Range Slider by typing in higher numbers in the boxes to the right of the gray slider. This will add available frames to your project and let you look at a larger expanse of time in the Time Slider. If you're having trouble seeing all your keys in the Graph Editor remember that you can use the Right and Middle Mouse Buttons + the Alt/Cmd key to pan or zoom around the window. If you hold down Shift + Alt/Cmd + RMB you can lock the zoom command to one axis or another, depending on the direction your mouse is moving when you first click. This takes some practice but is very helpful. Alternatively, you can press the f key while you have the graph editor highlighted and have Maya intelligently frame all your keys to the size of the window.
Now, your next goal will be to adjust the tangent types for some of your keyframes. When you play back your animation you'll notice that the ball doesn't bounce so much as it does wave up and down. To fix that we'll be selecting the keyframes at the bottom of our ball's bouncing motion and altering their tangent types from Plateau to Linear. Select a keyframe on the Translate Y channel in the Graph Editor at the bottom (or "impact") pose of your ball bounce and notice the tangents are flat and even. By default they are set to the Plateau type, which will give an even in and out to the keyframe; deceleration and acceleration, in other words. Click the upsidedown "V" shaped icon from among the tangent types at the top of the Graph Editor to change this keyframe's tangents to a Linear type. Do this to the other down/impact keys in your ball bounce. Now the graph itself should actually look a lot like the trajectory of a bouncing ball.
The next layer of your animation will be to create the squash & stretch the ball experiences on impact and acceleration. Go to frame 1, where your animation begins at the apex of the first drop. Select scale_ctrl and then select the three Scale channels from the channel box. Right click and Key Selected. In your Graph Editor you should have three new dots representing those scale channels. Move to one frame before your first impact pose and stretch scale_ctrl out until the ball is elongated, then squash scale_ctrl to an inverse degree. You don't want your ball to change volume, so every time you stretch it out to be longer, you need to squash it in to make it skinnier; if you just stretch it out the ball will feel as though it is gaining volume and if you just flatten it out without stretching it thin like a pancake it will feel as though it is losing volume. Remember to maintain volume in any shape being squashed & stretched! Anyway, when you have a nicely elongated ball on the frame before your impact, key the scale channels.
Now move to the frame of the first impact and flatten the ball out somewhat, stretching it out on the other two axes to maintain volume. Again, key the scale channels. Repeat the stretching pose on the frame following the impact. Finally, go to the apex of the next bounce and reset your scale channels to 1 so that your ball is again completely spherical. Do this to each impact and apex frame in your animation, with the amount of squash and stretch decreasing with every bounce.
You may find it necessary to adjust the height of your bounces and impacts when you see them with a component of scale animation. To do so, select translate_ctrl again and just move your keyframes up and down in the graph editor using the Middle Mouse Button. To lock your movement to either up/down or left/right hold down the Shift key while clicking and dragging with the MMB.
With the scale layer of your animation complete you can now add horizontal movement to your bounce. Select translate_ctrl and set a key at the first frame on the Translate Z channel. Now go to several frames after the end of your bounce and translate translate_ctrl to somewhere new on the Z axis. Key it there. In your graph editor you should see a new blue line formed between two keyframes representing your ball's new side to side movement. Play back the animation and you'll notice a problem: the ball accelerates into this movement, then decelerates back to a stop. We only want it accelerating, so we're going to use that same Linear Tangents tool from the first up/down layer of our animation to change the tangents on our first keyframe from Plateau, with the soft out tangent, to Linear. Your ball will now move properly from side to side!
The next thing we can see wrong with our animation is that the squash & stretch we added earlier now looks kind of funky. We want to fix this by angling our ball during the stretched poses to match the direction they are moving in. Select your translate_ctrl at frame 1 and key the Rotate X channel with a value of 0. Now, advance to the frame right before your first impact, when your ball is most elongated. Rotate translate_ctrl so that the ball is tilted in the direction of its motion. On the frame of impact, rotate translate_ctrl back to 0, and then in the opposite direction as it leaves the impact on the frame following that. At the apex of the next bounce, again key Rotate X with a value of 0. Repeat this process for each bounce, using progressively smaller rotation values. When you play back the animation you should see the ball angling in the proper direction of its elongation. We're almost there!
The final thing to do for your animation is to give the ball an overall rotation. If you haven't guessed it yet, select rotate_ctrl and give the Rotate X channel a key at the first frame and the final frame. The amount of rotation you'll need depends on how far the ball travels, but give it a solid few hundred degrees to start out with. Just like with your side-to-side movement on the Translate Z channel of translate_ctrl you'll have to select the first key of your rotation and set it to Linear Tangents. To check your ball's rotation, slap a checkerboard material onto it and use the Shading menu --> Hardware Shading mode (6 key) to preview the texture. If it's not rolling enough, move that final keyframe to a higher / lower number with your MMB and the Shift key. Rolling too much? Move it in the opposite direction up / down.
When you want to see your glorious new animation play back in real time, press the Play button at the lower right side of the screen. If it's playing back frantically that means the playback mode may be set incorrectly. To fix this, just right click on the Time Slider and choose Playback Speed --> Real Time.
That should just about do it. Send me your finished animation as a Maya scene file with the name "yourName_HW07.ma" before class on Monday, and email me with any questions about the assignment. Also remember to check out the file I sent to everyone if you get lost in this process -- it includes the finished version of the ball bounce we did in class for you to inspect / reverse engineer. Just don't try to resubmit that file to me -- I'll be hiding a node in there to mark it.
Wednesday, November 4, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment