Houdini 20.5 Mantra materials

Material parameters

How to build a parameter/input interface for your custom material.

On this page

Overview

You can build a custom user interface for your Material Builder node or material asset. Nodes in the shader network represent the parameters and inputs on the parent material, and you can use their outputs to drive the behavior of the material network.

There are several ways to create parameters/inputs:

  • Manually create a Parameter node in the network. Any parameter nodes in the network create a corresponding parameter and input on the parent material.

    You can prevent a Parameter node from creating an input by turning off Has corresponding connector on the Parameter node.

  • Promote parameters on nodes inside the network up onto the parent material node. This automatically creates a Parameter node on the corresponding input.

    Creating a parameter this way copies over useful information from the promoted parameter, such as its label. This is easier than creating your own Parameter nodes.

Promoting parameters

You can “promote” a parameter on a node in the network up onto the parent node’s interface.

To...Do this

Create a parameter on the parent from a parameter on a node in the network

Click the gear menu icon next to the parameter and choose Promote parameter.

Parameter nodes created this way are automatically created in a collapsed state so it shows as a compact stub on the promoted input. You can select the stub to edit the Parameter node in the parameter editor. You can double-click the stub to expand it into a full node.

Rearranging the parameter interface

You can change the order of the parameters created by Parameter nodes on the parent node, as well as add organization such as tabs, grouping boxes, and dividers.

How you edit the interface depends on whether you are working with a Material Builder subnet or a digital asset.

To edit the interface on a Material Builder subnet

In the parameter editor, click the main gear menu at the top of the editor and choose Edit parameter interface.

To edit the interface of a material asset

In the network editor, right-click the node and choose Type properties, then click the Parameters tab.

(The difference is because with a Material Builder, you are editing the parameters of that particular instance of the Material Builder type, but with an asset, you are editing the shared definition of the asset type.)

For more information, see Edit Parameter Interface window and editing asset UI.

Parameter overrides

A feature of Houdini shading is that parameters on the material will be overridden by the value of an attribute with the same name on the shaded geometry.

For example, if you name a parameter Cd (for “diffuse color”), the value of the parameter will be overriden by the value of the Cd parameter on the shaded geometry, meaning your material would pick up any point colors from the geometry.

This can be very useful. You can build a shader with a default/configurable value for some parameter (for example, roughness), but then allow the artist to paint different values across various parts of the geometry. This works without you needing to build any custom support for that workflow into the shader.

Overrides work with point, vertex, primitive, and detail attributes. If there are multiple attributes with the same name at different levels, point attributes have the highest priority.

Tip

To pick up the value of an attribute from the geometry without creating a corresponding parameter, use a Bind VOP instead of a Parameter VOP.

Tips and notes

  • In other Houdini networks, you could create spare parameters on the “parent” node and channel reference them from inside the network, however that won’t work with Materials because they are compiled into VEX code and run by the mantra renderer, which has no concept of the original network of nodes.

    In a material network, you should only use Parameter nodes (manually or through promotion) to develop the material’s control interface.

Mantra materials

Using materials

Textures and UVs

Creating materials

Guru level

Other renderers