Part
One: Setting Keyframes on the Rocket
Setting keyframes
allows you to map a parameter against time. Keyframes represent
key points in time where you know how your object should be positioned.
The keys are linked using animation curves that can be edited in
the Channel editor. These curves let you define the motion in-between
the keyframes and can be used to significantly alter the quality
of an animation.
1.
Set Keyframes
You want to
animate our rocket to move from an initial location at frame 1
to a new location at the last frame.
In the Network
Editor, click on the rocket object. In the Parameter
pane, RMB-click
on the Translate parameter. From the resulting menu, select Set
Keyframe. You’ll see the edit fields turn green to indicate
that they are now under keyframe control, and will change over time.
Drag the Playbar
all the way to Frame 300.
Click in the Translate-Y
parameter for the rocket, and type in: 55.
The rocket should go off screen and a new keyframe is set.
Play back the
animation using the animation controls. You can move between frames
and scroll on the time slider using these controls. You will notice
that the rocket starts off slow and speeds up as it climbs. This
may not be the behaviour you want. You can use the animation curves
to alter the speed of the animation between the keyframes.
2.
Scope the Channels
RMB-click
on the Translate parameter, and select Scope
Channels. A window appears with a graph of the
rocket’s movement over time. In this case the curve represents
the translation along Y (/ty).
3.
Change the Interpolation
Move the window
out of the way of the Viewport if necessary (alternately, you could
have switched one of the panes to be a Channel Editor pane). Select
the /ty channel segment. You will notice that its
Interpolation Function is set to: cubic(), change
this to: easeout() by clicking on the arrow next
to the function field.
You should now
notice that the rocket starts off fast, and slows down as it reaches
its peak.
4.
Edit the Start Frame
Click drag a
bounding box over the first key at frame 1. Its values are displayed
in the fields at the bottom of the editor. Change the T value to
30. This delays the takeoff for 30 frames. This time will be used
to animate squash and stretch on the rocket in the next few steps.
Close the Channel
Editor window and playback the animation to preview the results.
The motion now reflects the new shape of the animation curve.
Part
Two: Adding Squash and Stretch to the Rocket
To add a cartoon
effect to the rocket, you will animate the parameters of a Twist
operator at the Geometry level of the rocket. In Houdini you can
animate at the object level or at the Geometry level.
1.
Add a Twist SOP
Click on the
rocket and press i to enter into this object. Click on the merge1
SOP to highlight it. With the mouse in the Viewer pane, press
tab> Twist. Click-drag around the whole rocket
and then RMB-click to accept. The twist handles are shown at the
centre of the rocket. In the parameter pane, set the following:
Operation
to Squash & Stretch;
Primary Axis
to Y axis;
Strength to
0.
Click on the
vertical pivot handle to and drag the pivot to the base of the rocket.
Now all the squashing will take place around this point.
RMB-click on
the Strength
parameter and select Bind to Viewport
Handle Ladder. This will make it possible to
use a value grid to set the strength interactively in the viewport.
2.
Keyframing the Squash
Make sure that
your current time is set to 1 and the twist operator’s strength
parameter is set to 0.
Click with your \ on the Strength parameter and select Set Keyframe.
Move the time
slider to frame 25. Click drag with your ] in the viewport to squash
the rocket. A negative value for strength will create a squash effect.
Click with your \ on the Strength parameter and select Commit Change.
This sets a second keyframe.
Move the time
slider to frame 30. Click drag with your ] in the viewport to unsquash
the rocket. A value of about 0.1 for strength will create a slight
stretch effect which will suit the rocket as it lifts off. When
you are ready, click with your \ on the Strength parameter and select
Commit Change.
Playback the
results. Edit the animation curves if you want to adjust the inbetween
motion. When you are finished press the u key to go back to the
object level and test the playback here. You may want to adjust
the animation curves of the rocket’s translate Y to make the
lift-off more snappy. The quality of the motion is under your control.
3.
Animating the Camera
To animate the
camera to always look at the rocket, you simply have to point the
camera at the rocket. Click on the object operator for cam1
in the Network editor, and set the Look
At parameter to: rocket.
Playback the
results. The camera now follows the Rocket as it takes off. |