Caffeine Abuse - The Blog

Getting Started in Animation Part 4

With the summer vacation just within your grasp, our 3d kindergarten are about to come to an end with this very issue. Throughout this four part tutorial series we’ve been focusing on the concept of animation, rather than fancy features offered by any given 3d software. With topics ranging from boxes of crayons to green peas we’ve surely had an odd mix of metaphors for the fundamental ideas, but this hopefully helped you getting the bigger picture.

During the course our hopper has evolved from just being a lifeless object to a joyful character with a will (and rig) of his own. Until now, we’ve put together the animation by directly moving and scaling the geometry of the hopper at different frames. While this approach is very straightforward and time efficient you don’t have any real control of the hoppers posture or any specific expression, even less the ability to change them over time. Using the rig from last issue enables us to continue working in the same manner as before, but with the power to add additional details to the poses and the animation as a whole.

With personality comes unavoidable temper or mood. The difference between the ways any given action will be carried out could surely be greater between a person’s different states of mind, than different individuals. While you are delighted when you bound of to the kitchen for your modest twelfth cup of coffee, there’ll be a key change to your attitude when you find that someone just poured the last cup. This will naturally trigger a shocking mental reaction, at which point you (filled with anguish) slowly would drag your feet back to your desk. While there logically will be a difference in a persons pace depending on whether he’s happy or gloomy, there’ll be a just as significant change to his entire motion.

As usual, all the files needed to complete this part can be found on the CD. If you don’t yet own a license of Softimage XSI, the free educational version XSI Mod Tool, can be downloaded from http://www.softimage.com/ and if you’ve missed any of the previous parts in the series, they can be downloaded from our website, http://www.3dworldmag.com/

All the project files and the original tutorial as it appeared in 3D World can be found at http://www.computerarts.co.uk/tutorials/3d__and__animation/get_started_in_animation_part_4

Stage one Hopper in distress

Step 1
Being his last appearance in 3d world (as we know of at least), we can easily appreciate the hopper being a bit cheerless. Since he’s not only got a personality of his own but a mood as well, we’ll need to pay even more attention the different poses than we’ve done in the previous part in the series. So, open the scene hopper_rigged.scn and let’s get started.

Step 2
We’ll merely use the Null object to set the general action (positions) for the hopper and leave the creation of the actual poses to the curves, which in turn are controlling the cage deformer. Select the Null, press [V] to activate the Translate Tool and set a keyframe at frame 1 and another at frame 6 (without actually moving the hopper) to set the first contact position.

Step 3
While each bounce used to take just under a second in the previous parts, the hopper’s current state of mind will slow the very same action down to about three seconds. Go to frame 15 and in the front viewport, move the hopper about 9 units upwards and 4 units to the right. Set a new keyframe to set his high-point.

Step 4
Even though the pace of the bounce is significantly lowered, the influence of gravity is unsurprisingly unchanged. The time spent in the air should therefore be about the same as before. At frame 22, move the hopper another 4 units the right and lower him so he touches the ground again. Set a keyframe and another at frame 70 to set the duration for the hopper’s second contact position.

Step 5
With the Null still selected, press [0] (zero) to open the Animation Editor. Select the keyframe for the y position (displayed as posy in the animation tree) at frame 6. Turn off Unified Slope Orientation to enable the slope handles to be modified independently and set the left slope handle’s length and angle to 0. Set the right slope handle’s length to 3 and change the slope angle to about 25.

Step 6
Select the posy key at frame 15 and set the length of both handles to 3.5. Next, select the posy key at frame 22 and set the angle to 0 and the length to 1. Now select the posx at frame 6, set the angle to 0 and the length to 3. Select the posx keyframe at frame 15 and delete it. And finally, select the key on frame 22 and set the left handle’s angle to 14 and length 2.5 and the right angle and length to 0.

Stage two Expressing the emotions

Step 7
The first thing we should do is to create a neutral state for our rig. Select all the curves and click Transform>Set Neutral Pose. It might be a good idea to reset the curves every now and then to avoid them drifting off in an unpredictable manner. This is done by selecting the curves and clicking Transform>Reset All Transforms.

Step 8
Next, set the selection filter (located in the Select Panel) to Curve to make the following steps a whole lot easier. Return to frame 1 and select all the curves (six in total). Press [X] to activate the Scale Tool and make sure the center of geometry (COG) and Volume (Vol) buttons are enabled. Scale the curves down to about 0.7 for the Y-axis to squash the hopper.

Step 9
Translate all the curves downwards till the bottom of the hopper is just below the ground. Move the two bottom curves slightly upwards, so he stands flat on the ground. Next select the three top curves and rotate them slightly (negatively) along the Z-axis to give him a hanging or sagging posture. If needed, you can reposition the curves slightly to maintain a smooth shape on the overall body.

Step 10
Select all the curves again and Click the button labeled Animation and from the menu, choose Set Key at Multiple Frames… In the dialog box, enter 1, 70 and click OK to set a keyframe at both frames. Repeat with the Scale and Translate Tools activated as well, so both frame 1 and frame 70 has a key for each transform. This will ensure that our animation will loop seamlessly later on.

Step 11
Go to frame 7 and scale the curves to about 1.2 for the Y-axis. Move the bottom two curves down again, to reset a rounded shape on the bottom of the hopper. Rotate the top three curves a little further along the Z-axis and move them slightly to the right to get the hopper into a position of leaning forward. Set a keyframe for the scaling, rotation and transformation (SRT).

Step 12
At the hopper’s high-point, he’ll continue to lean the upper body forward and slightly lift his lower part as he’s preparing to land on the ground again. At frame 15, select all the curves and set the scaling back to 1. Rotate and position each curve to give the hopper sort of a bean shaped appearance. Set a keyframe for the SRT.

Step 13
Just as the hopper makes contact with the ground, he should remain in a stretched out pose and not squash until a few frames later. At frame 21, select all curves again and scale them to about 1.2 for the Y-axis. Next rotate them and pull the top three slightly to the left to make the hopper lean backward. Position the curves so the bottom of the hopper just touches the ground. Set a keyframe for the SRT.

Step 14
At frame 26, scale the curves down to about 0.7 for the Y-axis to squash the hopper. Translate the curves downwards so the bottom of the hopper is just below the ground. Then move the two bottom curves slightly upwards, so he stands flat on the ground. He should still be leaning slightly backward, though not as much as at frame 21. Set a keyframe for the SRT.

Step 15
As both gravity and the hopper’s momentum are played out at frame 37, he should regain his natural pose. Seeing that he’s sad, he won’t hold his usual cheerful posture but rather have sort of a wilted pose. Set the scaling of the curves back to 1 and position them so he stands on the ground. Rotate the curves to give a sagging appearance and set a keyframe for the SRT.

Stage three Secondary action

Step 16
While the ears naturally are controlled by the hopper in the end, they do have a bit of a life on their own. Unlike the previous parts, we’ll now need to animate them separately. Since we disabled the influence of scaling when we set the constraint for the chains, we’ve been free to scale the curves whiteout having to worry about distorting the ears.

Step 17
Start by setting the selection filter to Bone. To create a smoother blend between the area where the cage deformer (which is controlled by the curves) and the ears (which are enveloped to the bones) meets, we’ll leave the first bone in each chain unanimated. While we could set keyframes to ensure that they’ll stay in place, their transformation values shouldn’t change.

Step 18
Go to frame 1 and select all the bones except the first in each chain, active the Rotate Tool and enable the Add button Transform panel (this will automatically add rotation for each child in our hierarchy). Click the Animation button and from the menu, choose Set Key at Multiple Frames… In the dialog box, enter 1, 70 and click OK to set a keyframe at both frames.

Step 19
While the hopper will stretch as he is about to bounce off the ground, the ears will be toward his body due to the energy. At frame 5, rotate the bones about 12 degrees along the Z-axis, making the ears kind of wilted and set a keyframe. The more you rotate the bones the more elastic/rubbery they’ll appear and is really matter of your own taste.

Step 20
As he’s reaching his high-point, the ears should be about to get back to their normal posture. At frame 15, rotate the bones about 5 degrees along the Z-axis and set a keyframe. As he’s falling to the ground the ears will tail the body, pointing in the air. Go to frame 21, rotate the bones so the ears nearly get straightened and set a keyframe.

Step 21
At frame 26, straighten the bones even a little further and set a new keyframe. The energy from the squash and stretch will make the ears a bit more bent than normal at frame 37. Rotate the bones about the same amount as at frame 5 and set a keyframe. Scrub between the keyframes, preferable in the front view to get a better view of the ears’ motion.

Stage four Keep on bouncing

Step 22
Select the Null object, the bones and all the curves and press [0] (zero) to open the Animation Editor. Now we would like to cycle the animation, but we want the animation on the X-axis to add to the current value so he’ll continue bouncing forwards instead of going back to his original position over and over again.

Step 23
Expand the animation tree to see the objects’ parameters and select the fcurve for the Null’s animation along the X-axis (posx). From the Curves menu, select Relative Cycle. The animation of the other objects should not add to their values however, but only repeat themselves. So, select all the other fcurves for all objects and from the Curves menu choose Cycle.

Step 24
Because it might be a bit difficult to imagine how the different poses will play together, you shouldn’t expect everything to be perfect the first time you see your piece. As you play back your animation you might find areas that should be refi ned or altered. If this is the case, simply return to the different poses, adjust the slope handles or modify their values, and set a new keyframe.

Throughout this series you should have gained a greater appreciation of the basic principles of animation and a basic understanding of how to put the theory of animating an object into practice. While you’ve now completed our 3D kindergarten, you really shouldn’t leave your new faithful friend bouncing around in such a cheerless manner, so why not animate him jumping for joy?