Hfoundations 02 Model Render Animate
Hfoundations 02 Model Render Animate
LESSON GOAL
Model, Render, Animate and Simulate a soccer ball using Houdini’s procedural node-based workflow
LESSON
COMPATIBILITY
Written for the features in Houdini 19.0+
Houdini Core ✔
Houdini FX ✔
Houdini Indie ✔
Houdini Apprentice ✔
Houdini Education ✔
02 You can now explore the View tool in Houdini. Press the
following hotkeys:
Tumble Spacebar or Alt[Opt] - LMB click-drag
Pan Spacebar or Alt[Opt] - MMB click-drag
Dolly Spacebar or Alt[Opt] - RMB click-drag
In some cases, you will want to home in to get your bearings.
There are some hotkeys for that as well:
Home Grid Spacebar -H
Home All Spacebar - A
Home Selected Spacebar - G
RADIAL MENUS
One way to access tools in Houdini is radial menus which you can
access using the X, C and V hotkeys. Each of these brings up a radial
menu with lots of options for you to choose from. The main focus
of each menu is as follows:
Snapping X
Main (or Custom) C
View V
2
SELECTION HOTKEYS
RMB-click to access menu
If you are using the Select, Move, Rotate, Scale or Handles tools,
the following hotkeys will determine your selection mode as well as
which level you will be working at.
Objects Object Level 1
Points Geometry Level 2
Edges Geometry Level 3
Primitives/Faces Geometry Level 4
Vertices Geometry Level 5
05 Press n to select all of the new faces and press Tab and
begin typing sub… then select Subdivide from the list.
The Tab key is another way to access tools in Houdini. Typing the
tool name lets you focus the list making it easier to find what you
want without navigating the submenus.
In the Parameter pane, set Depth to 2. This subdivides the
geometry to create more polygons. Houdini also has a subdivision
display option at the Object level which you can use to see
subdivisions without actually adding any geometry, but in this case
you do want to create more polygons.
3
PART TWO:
Adding the Soccerball Geometry
You are now going to replace the box with a soccerball shaped platonic shape. Using Houdini’s procedural approach, you
can replace the box node with a platonic solid node. From there you will adjust the other nodes to make it look like a simple
soccerball. This ability to swap out input nodes lets you prototype networks with simple geometry for added flexibility.
SHADING OPTIONS
Disable Lighting
There are a number of Shading Options available from either the
Headlight Only
View radial menu or the Shading menu in the top right of the Viewport.
Normal Lighting
For the shading of your objects, the lighting is determined by the
Display Options on the right edge of the Viewport. You can choose High Quality Lighting
from a headlight, normal lighting or high quality lighting with shadows. High Quality with Shadows
To quickly toggle from your shaded view to wireframe press the W key.
4
PART THREE:
Create a Realistic Soccerball
There are many ways to create geometry using Houdini’s nodes and networks. In some cases, you may want to swap the order
of two nodes or rewire a network to try something different. You are now going to add more detail to your soccerball by creat-
ing a different network that subdivides before extruding.
03 Use the tab key in the network editor to add a Ray node
and wire it in after the subdivide. Now add a sphere node
to the network and set its Radius to 1, 1, 1 and the Primitive Type
to Primitive. Now wire the sphere into the second input on the ray
5
WORKING WITH ATTRIBUTES
Attributes can be assigned to Points, Primitives or Vertices. Some
typical types of attributes include color (Cd) or UVs. You can see
the attributes at any point in your chain by mousing over a node and
choosing the i from the radial menu. You can also review the attribute
values in the Geometry Spreadsheet panel.
In this lesson, you will be creating a custom attribute called patches
which will help you later on in the network.
6
PART FOUR:
The For-Each Node
Now you get to see the magic, as the attributes you just created in the last part are fed into a for-each loop where the original
patches are extruded even though each contains many polygons. This will provide a more leathery look for the soccerball once
you subdivide it once more time after the poly extrudes.
7
PART FIVE:
Setting up UVs
In order to set up materials and textures, it is important to make sure that there are proper UVs set up on your object.
Geometry in Houdini does not come with UVs, therefore you must create them yourself. This means adding extra nodes
to the network, which in this case means adding UV Quickshade and UV Flatten nodes.
8
05 Add another UV Flatten node after the first uvflatten
node and before the Fuse node. In the Group field, enter
the expression @patches<20. This will flatten the light patches.
RMB-click on the Handle tool and turn on the Min: handle. Use the
arrow handle at the top and pull it down until all the patches are
inside the light area at the bottom of the texture map.
When you finish you can RMB-click on the Handle tool and turn off
the Min: handle.
Shift-Click
09
PART FIVE: Setting up UVs
9
PART SIX:
Layout: Cameras and Lights
To create a scene for rendering, you are going to bring the geometry into the Solaris or LOPS context of Houdini. This is an
environment dedicated to lookdev, layout and lighting and is built on the foundation of USD (Universal Scene Description).
This will allow you to render to the Karma renderer which works right in the Scene View as part of the Solaris workflow.
03 In the Network view, press tab and type out Grid. Click
to place down the node and rename it backdrop. Double-
click on the backdrop node to dive down to the geometry level.
Select the grid node and set the size to 80, 80 and the Center to
0, 0, -20. RMB-click on the grid node’s output and type Bend. Click
to place the node then set its Display Flag and set: Bend to 75.
In the Capture section, set Capture Origin to 0, 0, -30, Capture
Direction to 0, 0, -1, and Capture Length to 5.
RMB-click on the grid node’s output and type Subdivide. Set its
Display Flag then set Depth to 2.
10
05 In the top right of the Scene View, click on the No cam
menu and choose camera1. Now you are looking through
the camera and can adjust how it looks.
This is probably not the view you are looking for therefore some
view changes are needed. On the right side of the Scene View,
click on the Lock camera to view button. Now use the View
tools [Spacebar-LMB/MMB/RMB] to reposition the camera.
IMPORTANT: When you finish, toggle off the Lock Camera button.
11
PART SEVEN:
Lookdev: Materials
Materials and shaders can also be created within the LOPS/Solaris context. This involves adding the materials to the Scene
Graph then assigning them to the geometry. The Materials are created inside a Material Library node then assigned at the
LOPS/Solaris level. To add textures to the backdrop, UVs will have to be created to position the maps properly.
12
MATERIALS IN HOUDINI
Materials in Houdini live in the VEX Builder context which in this case
is nested inside the Material Library node. A material is made up of
VOP nodes that define all of its material qualities.
The Principled Shader is an uber material that can be used on its own
to assign texture maps and achieve a large variety of looks. You can
also build your own shaders and materials for more advanced looks.
13
PART EIGHT:
Rig the Soccerball
In order to create an animation of the ball bouncing, you will start by building a simple rig that will make it easier to keyframe.
This will involve setting up null objects so that you can work interactively in the viewport and adding nodes to the soccerball
geometry network to accommodate the ball rotation along with squash and stretch.
14
05 In the Viewport, create another Null object at the origin.
Call it squash_ctrl. Go to the Misc tab and set Control
Type to Box and the Display Uniform Scale to 0.2.
Move the null up just above the ball. Translate Y should be about
2.5. In the Parameter pane, choose the Modify Pre-Transforms
menu and select Clean Translates. This sets the Translate Y value
of the null to 0 even though it is above the ground. In order for this
null to drive the squash and stretch, it needs a default value of 0.
15
PART NINE:
Animate a Bouncing Ball
You can now take the soccer ball rig and use it to animate the ball bouncing. You will learn how to set keyframes, adjust anima-
tion curves and work with time-space handles in the viewport. The bouncing ball is a classic animation exercise that offers a
great opportunity to learning the basics of animating in Houdini.
Select
HOUDINI FOUNDATIONS
16
04 Go back to the Scene view and preview the results.
You now have a sharper hit each time the ball hits the
ground. Make sure you have the Pose tool active and the
soccerball_ctrl node selected. In the top bar, turn On the Motion
Path handle. This shows a path outlined where the ball is bouncing.
Click on each keyframe marker to tweak the bounce. RMB-click on
the handle to Show tangents for more control over the curve.
Go to the soccerball_anim object’s Misc tab, set Onion Skinning to
Full Deformation. Press spacebar-d and from the Scene tab adjust
Frame increment and the Frames Before and After color.
05 To adjust the timing, you can also use the timeline. Press
Shift and drag a bounding box from frame 1 to the last
key in the timeline to select all the keys. Next, MMB drag on the
end of the box underneath the handle to scale the timing of the
bounces to speed them up. You can also select each key using MMB
and then drag with MMB to time each keyframe the way you want.
This is where you will determine the timing of the bounces. Keep
exploring until you get the look that you want. Note that there may
be some awkwardness in the bouncing because of the translate X
MMB Drag Here
values. You will fix that in the next step.
06 Click on the Animation Editor pane tab and you will see
two curves. From the Scoped Parameters list, click on
Translate X for soccerball_ctrl. Now select all the keys except for
the first and the last. Press Delete. Now use the curve handles to
go from a high slope to a low slope. This will have the ball moving
faster at the beginning and slower at the end.
Note that if you go back to tweak the points in X on the motion
path handle, you will get strange results because there are no
longer intermediate keys in that direction - only use it to tweak in Y
from this point on.
17
PART TEN:
Add Motion FX
In addition to keyframing everything by hand, you can also use the Motion FX menu to create procedural animation nodes that
make it easier to add detail to the motion. These nodes are Channel Operators or CHOPs and they offer a whole new way for
animators to create procedural motion. You can add effects that act on all of the motion at the same time or focus on one channel.
18
PART ELEVEN:
Lights, Camera, Action!
To render out the animated soccer ball, you will need to go back to the Solaris environment and set up a second shot. You will
begin by branching off new LOP nodes from backdrop geometry then adjust the lights and cameras to suit the bouncing soccer-
ball animation. You will also set up motion blur for the deforming geometry.
19
05 In the Network view, Select the assignmaterial node
from the SHOT 1 network then Alt-drag to create a
copy of this node. Wire the transform node into the assignmaterial
node then set its Display Flag. This will assign the material to the
backdrop but since the soccerball primitive has changed it needs to
be reassigned.
In the field next to Primitives for the soccerball_mat , change the
primitive name to /soccerball_anim to reassign the material to the
new geometry.
KARMA RENDERER
Karma is a physically-based HYDRA renderer built to work with USD files
in the Solaris/LOPS context. This allows it to be used in the Viewport for
interactive updates or to be rendered to disk using a Karma node.
Note: Houdini 19 includes a preview for an upcoming Karma XPU render
engine. This hybrid GPU/CPU renderer is Alpha with many features still
under development and is for testing purposes only. You can choose
XPU in the Scene view’s Display Options or in the Karma node.
Viewport Menu Display Options
20
PART TWELVE:
Set up a Rigid Body Simulation
While traditional animation is great for animating a single soccer ball, dynamics would be a better option if you want to animate
a bunch of soccer balls. Dynamics requires a simulation so that the solver can go frame by frame determining how each of the
participating objects interact with each other. You will use packed geometry to get an efficient result for this simulation.
02 In the Network view, press tab > Box then place it to the
right of the matchsize node.
Set the following on the box node:
Center to 0, 8, 0
Rotate to 45, 45, 45
Primitive Type to Polygon Mesh
Uniform Scale to 6
Axis Divisions to 3, 3, 3
This puts it in the right position for the simulation.
21
DOPS hidden inside SOPS
In Houdini, simulations are processed using the Dynamic Operators or DOPs.
With the RBD Bullet Solver node in the Geometry/SOP context, you are
working with a node that has a Dynamics network buried inside it.
This makes it easy to set up at the geometry level with all the DOP nodes are
wired up and ready to go but hidden from view. For simpler setups, working at
the geometry level will give you a proper simulation. If you need more control
over the different solvers then you would need to work directly in DOPs.
05 At the end of the chain, add a USD Export node, set its
Display flag and rename it to soccerball_sim.
Set Valid Frame Range to Render Frame Range and set the Output
File to $HIP/geo/soccerball_sim.usd.
Click on the Save to Disk button and this will save the USD file into
your geo directory. You will reference this cached asset into the
Solaris setup as a third shot.
22
09 Add a Light Mixer node after the camera. On the
lightmixer node you will need to move over the lights. This
will let you use the same light handles you learned about earlier to
make lighting decisions for this shot and use the Karma display in
the viewport to verify your setup. You can also use the lightmixer
node to play with intensity and exposure for this shot.
These edits are being held in the lightmixer node and changes are
not being made to the original lights. The lightmixer lets you tweak
existing lights when working in a multi-shot setup.
CONCLUSION
23