Houdini 12 Shading

This is a new feature in Houdini 11. To learn about more new features, see what’s new in Houdini 11.

A VOP network defines a shader. There is a vast array of VOP nodes available for building the network. Nodes are available for material shading specific tasks like calculating light scattering, as well as lower-level general data manipulation, math, and logic.

Tip

To learn how to create nodes, wire them together, edit node parameters, and work with the network editor, see the help for networks and parameters.

Create a VOP shader network

To...Do this
Edit a gallery material’s VOP network

In the material palette pane, double-click one of the instantiated materials in the right sub-pane. Houdini will switch to a network editor tab and dive into the material’s VOP network.

Start a new material network

In a SHOP network, such as the pre-made /shop or inside a SHOP Network node you create, create a Material Shader Builder node and double-click it to go inside.

Building a material VOP network

  • VOP inputs and outputs have types. Most connections have simple types, such as float, vector, or string. Nodes that support PBR have yellow BRDF connections.

  • You can connect inputs and outputs of different types, and Houdini will attempt to automatically convert between the types if possible. See autoconversion below.

  • A material network contains an “output” node for each shading context (for example, surface_output, displacement_output, light_output, fog_output). Whatever goes into these nodes defines the output of the shader.

    For example, you can connect a Parameter VOP directly to the Surface color of the surface_output node to create a constant color shader.

    The output nodes feed into a final “collect” node. You can create multiple output nodes and Switch between them prior to the collect node if necessary.

  • If you're starting a new material or surface shader from scratch, a good starting place is to create a Surface model VOP and connect its Surface Color output to the surface_output node’s Surface color input. The Surface Model VOP provides most of the machinery you need for surface shading. From there, you can add VOPs to elaborate on the surface model’s basic functionality.

Designing the shader's user interface

To...Do this
Promote a VOP parameter up to the shader’s user interface

Click the gear menu next to the parameter in the parameter editor and choose Promote parameter.

Houdini will create a collapsed parameter VOP (see below) on the corresponding input, and the gear menu icon will change to a knob icon to indicate the parameter is promoted.

The parameter will now appear in the material’s parameter interface. If you the parent node in the path at the top of the network or parameter editor panes (or press U in the network editor to go up), you will see the parameter in the material’s parameter editor.

Edit and organize a material’s user interface

Promoted parameters appear on the parent material in the order you added them.

To rename the promoted parameters, organize them into tabs, or otherwise edit them, right click the Material node and choose Edit parameter interface.

See the help for the edit parameter interface window for information on editing the parameters.

You can also use this interface to add “spare parameters” to the material’s interface that can be channel referenced by VOPs inside or used by scripts.

Note

The Material SHOP node has two parameters (the Compiler text field and the Force compile pushbutton) related to converting the contained VOP network into executable VEX code for mantra. You can’t edit these parameters, but you can hide them from users by selecting them in the edit parameter window and turning on the Invisible checkbox.

Organizing a VOP network

Tip

When Houdini creates parameter VOPs for promoted parameters it automatically collapses them so only a small peg appears next to the VOP’s input. You can edit the Parameter VOP without having to expand the collapsed node by clicking the peg. Selecting the peg is the same as selecting the collapsed Parameter VOP.

To...Do this
Collapse or expand VOP node inputs

To expand a collapsed input node(s), double-click the peg next to the VOP’s input, or MMB middle click the input and choose Expose input nodes.

To collapse the node or nodes connected to an input, MMB middle click the input and choose Hide input nodes.

Show or hide VOP inputs

Nodes sometimes have a large number of inputs (for example the Surface model VOP has an input for almost every parameter). There are several techniques for hiding unused inputs.

The node state button in the top-right corner of each VOP node lets you switch the node between three display modes: Show all visible inputs, Hide all inputs, and Show only connected inputs. Note that inputs with collapsed input nodes (e.g. promoted parameters) do not appear in “show only connected inputs” mode.

Independent of the node state button, you can mark certain inputs as always hidden. The Surface model VOP uses this to show only the most commonly used. To show or hide an input, click the menu button next to the parameter in the parameter editor, or MMB middle-click the input in the network editor, and choose either Collapse input connector or Show input connector.

The menu button for the parameter corresponding to a hidden input displays a hidden icon.

Connect to hidden VOP inputs and outputs

If an input or output is hidden, either because the input is marked as hidden or because you've used the node state button to change the node’s display mode, you can still connect a wire to the input.

Click the more input at the bottom of the input list, then choosing the input you want to connect to from the pop-up menu. You can either start wiring by clicking more first, or click the input/output of another node first and then click more.

Shader Effects

To...Do this
Connect a texture to a VOP parameter

Click the menu button next to the parameter and choose Texture map. Houdini will create the nodes necessary to load and process a texture and connect them to the parameter’s input for you.

Choose Checker to set the parameter to a simple checkerboard texture.

Add shader effects to a parameter

Click the menu button next to the parameter and choose one of the options in the menu.

Constant adds a Constant VOP. Texture map adds UVs and the nodes necessary to load and process a texture file. Surface color adds UVs and a Surface Color VOP. Ramp adds UVs and a Ramp. Anti-aliased noise, Cell noise, and Perlin noise add UVs and Anti-aliased noise, Cellular noise or Turbulent noise. Checker adds UVs and a checkerboard texture.

Color mix with and Multiply with insert nodes to mix or multiply the current input color with one of the options above.

Jump to the node feeding into a VOP parameter

Click the menu button next to the parameter and choose Jump to input node.

The menu button for the parameter corresponding to a connected input displays a connected icon.

Debug and bypass modes

VOP nodes have two special states that let you temporarily alter their behavior while you are building, editing, or debugging the network. You can turn these modes on or off using the first and second buttons from the left in the top-right corner of the VOP node. Alternatively, you can move the mouse pointer over a node and press Ctrl + D (debug mode) or ⇧ Shift + B (bypass).

Debug mode

Switches the node to debug mode.

You can set each output to have one of three behaviors when the node is in debug mode by Alt + RMB clicking an output. Execute behaves as normal. Pipethrough passes through the value of an input. Constant outputs a constant value.

In debug mode, the node is overdrawn with blue-green stripes.

Bypass mode

Attempts to pass the node’s inputs directly through to its outputs, as if the node wasn’t in the network at all.

This is similar to bypass mode in other network types, however because not all VOP nodes have an obvious mapping of inputs to outputs, you can explicitly map inputs to outputs, or set individual outputs to output a constant value, by Alt + RMB clicking an output.

In bypass mode, the node is overdrawn with dark stripes, and arrows show which inputs are being passed though to which outputs.

To...Do this
Set up the behavior of an individual VOP output in bypass or debug mode

Alt + RMB on the output and choose an option from the menu. Some menu items will open a dialog box allowing you to choose, for example, the input to pass through or the constant value to output.

Automatic type conversion

VOP inputs and outputs are typed. If you connect VOP inputs and outputs of different data types, Houdini will automatically convert the datatype if possible. For example, if you connect a float output to a vector3 input, Houdini will convert the float to a vector of three identical values. Houdini draws these kinds of wires as dashed lines in the network editor.

Instead of automatically converting datatypes, you can add VOP nodes designed to explicitly convert datatypes, such as the Vector to float VOP. This can sometimes be useful. For example an implicit conversion from a vector3 to a float always uses the first component of the vector. By explicitly using a Vector to float VOP node, you can choose which component to use.

Houdini lets you easily create the explicit conversion VOP node from an implicit (dashed) converted wire.

To...Do this
Create an explicit conversion node from an automatically converted (dashed) network wire

MMB middle click the input at the end of the connection and choose Create X-to-Y node (where X and Y are the start and end datatype involved in the conversion).

Loading Z-brush normal maps

Here are the nodes you need to convert the default normal map saved by Z-brush into the format Houdini expects.