Nodes, Networks and Digital Assets: Houdini Fundamentals
Nodes, Networks and Digital Assets: Houdini Fundamentals
Nodes, Networks and Digital Assets: Houdini Fundamentals
LESSON GOAL
To create a custom tool that turns any given 3D shape into toy bricks.
LESSON
COMPATIBILITY
Written for the features in Houdini 17.5.293+
Houdini Core ✔
Houdini FX ✔
Houdini Indie ✔
Houdini Apprentice ✔
Houdini Education ✔
04
HOUDINI FUNDAMENTALS
Next, press the T key to call up the Move tool. This adds
an edit SOP node into the network. In the viewport
RMB-click in empty space to bring up a menu and select Make
Circle to round out the selected polygons.
This menu is associated with the edit node. Every node has its own
interface that you can access as long as a relevant tool is active. In
this case, the Move tool gives you access to the handle. In other
cases the Handle tool would be used to access the interactive
handles for a node.
2
05 Press c to bring up a radial menu and choose Model >
Polygons > PolyExtrude. In the Scene View pane, use the
handle to drag up the polygons and set Distance to 0.05.
Tumble around and press s to go into select mode then select the
bottom four polygons of the box. Press q to repeat the PolyExtrude
tool. In the Parameter pane, use the slider to set Inset to 0.025.
Press q to repeat that tool and set a Distance of -0.175. When you
finish, tumble back to see the top of the brick.
SUBDIVISION DISPLAY
You can use Shift + and Shift - to turn subdivision display on and
off on selected polygonal objects. This creates a viewport subdi-
vide that lets you see what the shape would look like subdivided.
These hotkeys set the Display As parameter which can be found
at the object level on the object’s Render tab.
Your object will not render with subdivisions unless you turn on
Render Polygons As Subdivision Surfaces on the same tab.
3
PART TWO:
Copy Bricks to a Point Cloud
You are now going to create a cloud of points that match the shape of a particular piece of
geometry. You are then going to instance the bricks to the 3D grid to create a brickified version. The
instancing is generated by packing the brick geometry then instancing them to the points.
04
HOUDINI FUNDAMENTALS
4
05 RMB-click on the output of the polybevel nod, start
typing copy to points... and select Copy to Points node.
Click to place the node below the two chains and set its Display
Flag.
Turn on the Pack and Instance option. This is important because it
will display the copied bricks much faster than if this option is off.
At this point there is an error on the node because we haven’t
connected the second input.
PACKED INSTANCES
If you leave Pack and Instance setting OFF on the copy to points
node then you will end up with a large model with over a million
points and primitives. This would make it very slow to manipulate PACK AND INSTANCE | OFF
in the Viewport because instancing is not being used.
If you turn it ON then the 338 points on the brick model are
packed up and instanced which leaves a much more efficient
point count for the copy to points node. PACK AND INSTANCE | ON
5
PART THREE:
Add Color
You are now going to add color to the points which will then be picked up by the instanced bricks.
At first this transfer of color only applies in the viewport but by setting up a proper material which
has a Use Packed Color option, you can set up the point colors for rendering the bricks.
04
HOUDINI FUNDAMENTALS
6
PART FOUR:
Switch over to a Teapot
You are now going to add a switch node that switches between the Rubber Toy and a Teapot. This
will show you how the network of nodes can handle different shapes and still give us the desired
result. This shows that this network’s procedural “recipe” is doing its job.
7
PART FIVE:
Color the Points using a Texture
Earlier you added a color attribute to the points which affects the coloring of the bricks instances.
Instead of using a single color, you are now going to use a texture map to create a more interesting
look for the bricks. This will involve some special nodes to turn the texture into point colors.
04
HOUDINI FUNDAMENTALS
8
05 Select the Texture node. Click on the Gear icon on
the far right of the Texture Map parameter and from the
menu, select Promote Parameter. This will add this parameter to
the upper level of this node.
Click on the little knob that appears next to map. In the parameter
pane, change the Label to Texture Map.
ATTRIBUTE TRANSFER
ld
When you want to get attributes from one piece of geometry to another, es
ho
hr
you can use Attribute Transfer which uses a Distance Threshold along with nc
eT
sta
other parameters to get the attributes copied over. Di
In the case of the rubber toy, you are transferring the Cd attribute from the
points on the geometry to the point cloud that is used to copy the bricks.
You could also copy attributes such as UVs or Capture Weights.
9
PART SIX:
Create a Brickify Digital Asset
Now that the brickify recipe is working and the nodes are wired together properly, you are going to wrap up some of the nodes
to create a single Houdini Digital Asset [HDA] node. Now you can share the network with parameters from inside the asset
promoted to the top level to create an interface that can generate unique results each time the asset is used.
10
04 RMB-click on brickify_asset in the Network View’s path
bar and choose Parameter and Channels > Parameters.
Now you have a floating Parameter window with the two brickify
asset parameters. These are the parameters that will be available to
anyone who uses this asset. Let’s add some more.
The brickify node has a new parameter. Change its value from 0
to 1 and back to see how it affects your scene. The problem is the
name isn’t very appropriate and a menu would work much better
RMB-Click than a slider in this case, so you are going to refine the UI using the
Type Properties.
06 Select the second switch node that sits just under the
color and attributetransfer nodes and promote the Select
Input parameter to the parameter list. Change its Name to look and
its Label to Look.
Now click on the Menu tab and turn on Use Menu. Now under
menu items, type 0 under Token and Color under Label then press
enter. Next type 1 under Token and Texture Map under Label. Press
Apply.
11
09 To make it clear which parameters are associated with
which shape, you can disable and enable them based on
the menu choice. Click on the Color parameter and in the Disable
When field, enter { look != 0 }.
This tells this parameter to disable whenever Color has not been
chosen in the Look menu. Next, click on Texture Map and in the
Disable When field enter { look != 1 }.
Press Apply and test the results using the Shape menu. You can see
the parameters disabling when they are not needed. You could also
hide them with the Hide When option but disabling is fine for now.
12 Now Save your scene file to preserve the work you have
done so far. You now have the scene file and the .hda file
which is being referenced into your scene to create the asset. You
can use this library to create other instances of the asset in this
scene or to add the asset to another scene.
In the next section of this lesson, you will test out your asset and
find out if it is working properly. It is always good to have one
working asset and one for testing to make sure it is doing what you
want it to do.
HOUDINI FUNDAMENTALS
12
PART SEVEN:
Test the Digital Asset
A Digital Asset can be instantiated more than once in a single scene file. You are going to use this asset on a different piece of
geometry to test how it works. It is always good to have a test version available so that changes set to the first asset can be
quickly verified. The asset can also be used in other scene files once you have it working properly.
13
PART EIGHT:
Animating the Bricks
It is possible to continue adding features to the asset and you will create an automating build-up animation for the bricks. This
will involve adding more nodes to our network to make sure the asset has this new functionality. Once the results are saved
into the .hda file, the features will be available for use by anyone using this asset in their work.
03 Right now the bricks are coming in from one side instead
of from the ground. This is because the points are
appearing based on their point numbers. To control this, you need
to reorder the points to create the look you want.
RMB-click on the output of the texture_switch node and type Sort...
then select the Sort tool. Place this node down and change Point
Sort to Along Vector. With this set to 0, 1, 0, the points start at the
bottom and go up.
Playback to see this result. Test out different vectors to see how it
affects the animation.
04
HOUDINI FUNDAMENTALS
14
05 RMB-click on brickify_asset in the path bar and choose
Type Properties... Click on the Parameters tab then from
the Create Parameters by Type tab, add a separator just after Color.
Next, drag the switch node’s Select Input from the Parameter pane
to just under the new separator. Set its Name to animate_bricks
and its Label to Animate Bricks. Next, change its Type to Toggle
which limits to you an on[0]/off[1] setting.
In the Parameter Description section, click on the Channels tab
and set the default value to 0 [off].
Click Apply to save changes.
CONCLUSION
You have now created a shareable tool which was built without writing scripts using
a node-based workflow which is easily accessible to artists. By saving the HDA to
disk, it becomes an asset on disk that can be referencing into multiple shots.
Houdini Digital Assets offer a powerful way for artists to share these kinds of tools
in support of a studio-level production. These procedural assets make it easy to
automate repetitive tasks and to stay focused on the creative needs of your project.
15
HOUDINI ENGINE
Loading HDAs into other Apps
Once you have a Houdini Digital Asset [HDA] saved on disk, it is possible to load that asset into a host application using the
Houdini Engine plug-ins. These let you share assets with colleagues who can load them directly into 3D apps such as Autodesk
Maya or 3DS Max or into game editors such as Unity or Unreal Engine.
16