The Complete Houdini: Viewport Interaction and Animation Basics (3/x) (Patreon)
Content
Welcome to Part 3 of The Complete Houdini. In this article we’ll cover some more advanced interface concepts and get an overview of keyframe animation and playback. Let’s roll!
In Part 2 we explored the general Houdini interface. Now, let’s look at the toolbars around the viewport and how they are used to interact with 3D scenes. To start, we’ll create a simple model to interact with. Press Tab, but instead of putting down a box like last time, let’s create a top-level /obj container. Do that by typing geo and pressing Enter.
This creates an empty geometry container that we can place all sorts of things inside of. Press Enter or double click on the new node to dive in.
Inside, let’s create an instance of one of Houdini’s built-in test geometries. Press Tab, type toy and press Enter. This will add an iconic Houdini Rubber Toy.
Untick Add Shader to remove the color texture map. This will let us see the mesh more clearly.
Now that we’ve got some geometry, let’s look at the toolbars and buttons surrounding the viewport. On the right edge there are a number of options that control what is displayed in the scene and how.
Let’s quickly cover what some of the more useful buttons do.
Toggle the top button, Display reference grid/ortho plane, to turn the viewport grid on and off.
Display materials on objects will have the same effect as unchecking Add Shader on our toy geo.
Display points, Display normals, Display primitive normals, Display point numbers and Display primitive numbers are all very powerful and will come up a lot as we continue to learn.
Tint backfacing polygons is useful to keep checked. It darkens the reverse side of polygonal surfaces.
Show UV texture when UVs present is on by default and is helpful when editing UVs or working with procedural textures.
Display group and attribute list and Visualization will be frequently used later on, but can be ignored for now as they only apply to more advanced workflows.
Finally, at the very bottom, the last button opens the Display Options window (shortcut key: D). This window contains parameters for controlling how Houdini presents everything the Scene View.
There’s nothing here that is necessary to change right now, but feel free to browse the tabs and see what’s available. One potentially appealing change would be Color Scheme under the Background tab. The default is Light, but I also like Dark Grey.
Moving on, let’s look at how to control camera and mesh display options. Click the button that says persp in the viewport.
The menu title here always shows the name of the currently selected camera viewpoint. It defaults to persp, which is a standard perspective camera. We can also choose typical orthographic views under the Set View menu, including Top, Front, Right, and more.
In addition, there is an option to view the UV viewport, which shows UV tiles from the currently active node tree. In our case it shows us the single UV tile associated with the toy geometry.
Below, in the Shading menu, we can select how meshes are displayed. Common choices are Flat or Smooth shaded, with or without wireframes.
There are a million other menu entries here, but, and this will be a common theme with Houdini, it’s safe to pretend most of them don’t exist. The number of times anybody will want to Home > C-Plane Normal is, well… probably zero. But it’s there if you want!
Let’s check out the left toolbar now.
This is full of tools for interacting with geometry and meshes. The first three icons are for choosing what is selectable. The top button is Object Select Mode, which only works at top level /obj. If we had several geometry containers in /obj we could use this tool to select among them. The next button is Geometry Select Mode. This lets us select points, edges and primitives when inside a geometry container. Lastly, there is Dynamics Select Mode which I can’t say I have ever seen used.
The Select tool lets us select geometry elements within the viewport. Click on it and a new toolbar appears at the top, giving us options for what type of elements can be selected and in what manner. Double-clicking selects loops.
Below are the standard 3D transform gizmos: Move, Rotate and Scale.
The Pose tool is used only in rigging workflows, which we’ll get to later on.
The last button in this group is Show Handle. This will display a complete translate/rotate/scale gizmo, plus give us access to lots of options when working with interactive nodes such as groom tools or deformers.
Next up are snapping options which we’ll use soon when we dive into basic modeling.
Finally, at the very bottom are buttons for rendering Open GL flipbooks, a very useful feature which we’ll cover later on.
Whew! That’s most of the knowledge we’ll need to confidently interact with the Scene View in Houdini. There’s lots more, of course, but we’ll cover those details when they come up during the course of various workflows.
Now that we’re ready to interact with our rubber toy, let’s have a little fun and learn how to do basic keyframe animation. This will introduce some more important workflow and interface concepts.
To start, let’s look down at the bottom of the window at the Playbar.
It’s a fairly standard DCC animation playbar with options to play, skip to the start and end or to keyframes, set current frame, set animation length, and more. The far bottom left button, Global Animation Options, allows us to change general animation settings, such as frame rate. We can leave everything at default for now.
Let’s set our animation length to 120 frames. To do so, replace the 240 Global Animation End Frame with 120.
Add a Transform node to the rubber toy. Don't forget to enable its display flag as we learned earlier.
This will control the toy's position and orientation during the animation. We can set the position of our geo by typing in values to the transform node's parameters. Note that holding middle mouse and dragging over any parameter value brings up a menu to choose which increment is used when scrolling through values.
We can also use the viewport transform tools to interactively position the geo. Select among the Move, Rotate and Scale tools with the transform node selected and move the geo around. The parameter values will update as we work.
Let’s choose a start Z position and set a keyframe. You can set a keyframe on an individual parameter by Alt-clicking the value. This will turn the background green, meaning the keyframe is saved.
Jump to frame 120 and reposition the toy. The background will change yellow to show that the keyframe has not been saved. Simply Alt-click the value again to confirm. To avoid having to do this every time, click the arrow next to the Add Keyframe button and select Auto-key changes. This will commit a key any time a previously-keyed valued is changed.
Let’s play this back!
Wow, that’s fast. Houdini defaults to “as fast as possible” when playing animations. To view the scene at our intended 24 fps, click the Real Time Toggle button on the bottom left.
In the last article we talked about variables in Houdini, including the built-in ones $HIP and $JOB. Let’s use another built-in variable, $F, to automate some of our animation. $F refers to the current frame number. We can type expression values into any parameter. Let’s move our toy up and down in a sine wave pattern. We could just type sin($F) into the Y parameter, but the oscillation is fairly slow. Add a speed multiplier, such as sin($F*5), to pick up the pace.
Here's our final animation:
Conclusion
There you have it! We’re now well-prepared to use the interface to interact with all different types of scenes and also have basic knowledge of keyframe animation and parameter expressions in Houdini. Coming up in Part 4: modeling!