Search form

'The Magic of Houdini': Discovering the Channel Editor

In VFXWorld's latest excerpt from The Magic of Houdini, Will Cunningham lays out the plethora of details that can be found in the Channel Editor.

All images from The Magic of Houdini by Will Cunningham. Reprinted with permission.

This is the next in a series of excerpts from the Thomson Course Technology book The Magic of Houdini by Will Cunningham. In the next few months VFXWorld readers will learn the basics of the dominant tool that has been used in the creation of some of the most awe-inspiring animation and cinematic effects ever made.

You have set quite a few keyframes by now and you have seen how the computer automatically interpolates the in-betweens. What method is it using to do this interpolation? This information and a plethora of other details can be found in the Channel Editor. This editor is the main tool for visually setting and modifying animation channels. The Channel Editor features three methods for viewing data: Graph, Table, and Dopesheet. You examine the Graph view in the following exercise, as it is by far the most commonly used of the trio. For information about the Table or Dopesheet views, check out the Help documents.

  • 1. Delete any active channels you may have on the object containing the sphere. RMB on the tz field and choose Unlock Parameter, if necessary.

2. Go to frame 1 and set a keyframe in tx. Drag the sphere over to the left side of the viewport.

3. Go to the last frame and set another keyframe. Drag the sphere over to the right side of the viewport. Play the timeline and you again have a sphere that goes from left to right.

4. RMB on the tx field and choose Scope Channels. The Channel Editor pops up with the tx channel scoped, as shown in Figure 1. The term scope or scoping channels simply means that Houdini is placing the chosen channels in the channel editor and the channel list so that you can work on them. Note that the Channel Editor is just another pane type. It can be accessed in the Pane menu as well.

The various zones in the Channel Editor.

The Zones of Utility

There are a few different zones of utility in the Channel Editor. The menus are along the top. The view area (highlighted in red) shows the animation data as curves and keyframes. It contains information about these keyframes and curves at the bottom. In the stowbar to the left, you will find various toggle to control what is displayed in the view area. The channel list area is highlighted in green. The channel group area is left at the default gray color.

The View Area

This area shows keyframes and the curves that connect them. Keyframes are represented as white boxes as shown in Figure 2. Values are displayed running vertically along the left edge of the view area. The timeline is displayed in the purple band running horizontally along the bottom edge of the view area. Display options are in the stowbar to the left of the view area.

  • 1. In the example, you can see that there is a keyframe at frame 1 with a value of around -10 and another keyframe at 240 with a value of around 11. It is very easy to adjust keyframes in the Channel Editor. The vertical line is the time handle. Slide this left and right to adjust when the keyframe will happen. The white box is the value handle. Slide this up and down to change the value at this keyframe. These two handles are exclusive of each other. So, you would not be able to adjust the keyframe in time by grabbing the white box or vice-versa. The white horizontal line is the slope handle. This affects how the curves come into and out of the keyframe. Go ahead and play with these handles to get a feel for how they work.
If you demand to be able to move the keyframe in both time and value at once, you can do so. Hold down Ctrl and LMB the white box. You can now adjust both the time and value of the keyframe at the same time.
  • 2. Navigation in the view area is very similar to other viewports in Houdini. RMB to pan and MMB to dolly. A really nifty feature of the MMB is that you can independently dolly in the vertical (value) axis or the horizontal (time) axis. Hold down MMB and drag left and right and you will dolly in and out on the timeline while maintaining the visual scale of the values. Hold down MMD and drag up and down and you will dolly in and out on values while maintaining the visual scale of the timeline. And, of course, you can scale both of the axes at the same time, meaning you dont have to release the MMB and then depress it again to affect the other axis. Using MMB in this way is a very efficient way of getting the animation information into a format you can use. If you ever lose the channel offscreen or something similar, just press h to home the view on the selected curve or curves. LMB does not adjust the view because there is no tumble capability in a 2D view.

A keyframe is indicated with a white box.

  • 3. Notice that the fields below the view area are grayed out. Use the LMB to box select one of the keyframes. The fields are now populated with information about the keyframe and also about the curve that connects the two keyframes. F stands for the frame at which the keyframe sits. V stands for the value that the keyframe contains. S stands for the slope of the handles coming into and out of the keyframe. A stands for acceleration. The acceleration field is only valid for functions that use acceleration values, such as the bezier() function. Move the selected keyframe in time and value and you will see those changes reflected in the appropriate fields. Move the slope handle up or down and you will see that change reflected in the S field.

The Function field shows what kind of function the curve is using. The curve is actually called an interpolation segment because it tells the software how to interpolate between two keyframes. By default, a cubic function is used to define the interpolation segment.

4. Deselect the keyframe in the view area and select the interpolation segment. Only the Function field contains information. Click the arrow button to the left of the field and you can change what kind of function defines the segment. This menu contains a number of the most commonly used functions. Choose linear(). This is great for things that have a constant acceleration, such as the second hand on an old electric clock. It goes in a straight line from one keyframe to the next. Change the function to constant(). This maintains the keyframe value until the next keyframe. This can come in handy if you are controlling a switch, such as a camera switcher or a Switch SOPs input channel, which both use integers instead of floating point numbers. For motion that needs to smoothly start and end from a stationary position, the cubic() function works great, as long as you make sure the slope of each of the end keyframes is set to 0. Or you can use the ease() function, which always starts and ends smoothly.

Many character animators use the constant() function to rough out the blocking of an animation. Using this method makes the posturing and timing of the sequence easier to see because the computer does not add any motion through interpolation. You can change the default segment function in the Settings>Main Preferences>Animation folder.
  • 5. You are not just limited to the defined functions though. Oh no! You can also go in and create your own functions to define interpolation segments. Delete the constant() and enter sin($F*4)*4 and your view area should look something like Figure 3. Try changing the interior 4 to another number to affect the frequency of the sin wave and the exterior 4 to change the amplitude of the sin wave. Play the timeline and youll see the ball go back and forth in the X axis. You can grab and scrub through the timeline using the time bar, which is the big vertical white line in the view area. As you drag it, the current frame number will temporarily pop up next to it. Take it one step further in hilarity and good times by multiplying this expression by the easeout() function so that you have easeout() * sin($F*4)*4. Now, the sin wave values are easing out of the first key frame. Good times. Good times.

You can define your own functions for an interpolation segment.

  • 6. Change the segments function back to linear(). Move your pointer over the segment around the middle and set a keyframe by using Alt+LMB. You now have three keyframes and two interpolation segments. Every segment can be defined by a unique function. Select the second segment and choose the cubic() function. Drag the slope handle leaving the middle keyframe down to affect the second segment. You can see that the first segment stays in a straight line.

7. Alt+LMB on the one of the segments and drag left and right while still holding the hotkey combo depressed. A keyframe box slides back and forth along the segments and becomes a keyframe when you release.

8. Select the keyframe and press the Delete key to remove it. Move the time bar in the channel editor to some random frame by simply selecting and dragging it. Press the C button that is located above the view area to copy the value of the curve at the frame. Move the time bar to some other location and press the P button. It will paste that value to this time and create a keyframe.

9. You can use the arrow buttons to the right of the C and P buttons to jump forward and backward through keyframes.

10. Look over in the stowbar to the left of the view area. It contains various buttons to control what information is displayed. Toggle on and off a few to see what they control. Make sure all the default ones are back on before you continue.

11. Finally, at the bottom is a display much like the playbar as it shows the frame range. It too can be used to control the horizontal extents of the view area. You MMB and drag left and right just as you do in the view area. The range that is displayed in the graph is the same as the range that is shown here.

Find out more about how to apply each of Houdini's features to your projects as you take on modeling, character animation, particle effects animation, dynamic simulation animation, shading, digital asset creation and rendering. The Magic of Houdini by Will Cunninham. Boston, MA: Thomson Course Technology, 2006. 355 pages with illustrations. ISBN: 1-59863-082-2 ($49.95). Check back to VFXWorld frequently to read new excerpts.

Will Cunningham began his trek by studying both traditional art subjects and 3D computer software at the Academy of Entertainment and Technology. After his studies, he was hired as a Houdini technical intern by Side Effects, the developers of the Houdini software package. Eager to create effects for the big screen, he then jumped into production with BlackBox Digital on the feature, The Prince and Me. Shortly thereafter, he also began teaching Introduction to Houdini at the Academy and has since taught both the introductory and intermediate Houdini courses. In the fall of 2004, he was awarded a fellowship grant by Santa Monica College to support his efforts in creating this book. Over the years, he has worked for a number of production studios on a variety of projects, including The Chronicles of Narnia: The Lion, the Witch and the Wardrobe, Open Season and Ghost Rider. Currently, he is enjoying effects challenges and learning opportunities at Sony Pictures Imageworks.

randomness