|On this page|
In Houdini 20, the Material Library LOP’s way of creating materials changed fundamentally. In previous versions you could access all shader nodes from the libraries root level. This often lead to confusion, because it was possible to mix incompatible shader nodes. Now, shaders are created inside subnets:
Karma Material Builder
USD MaterialX Builder
VEX Material Builder
USD Preview Material Builder
The new approach also filters the nodes in the Tab menu and it’s, for example, not possible to add MaterialX nodes to a VEX subnet.
This node translates shader VOP nodes into USD material primitives.
A newly created Material Library node uses a pattern asterisk in the Material VOP parameter to match children VOP nodes inside the LOP and translate them into USD materials. See USD materials below.
Alternatively, this LOP can also import Houdini VOP materials from other VOP networks (such as
Auto-fill Materials button.
You can use patterns in
You can define a common USD path for all materials, using
Material Path Prefixparameter. Any material whose
Material Pathmulti-parm instance is not an absolute path will use it as a prefix.
Material Path Prefixparameter can be used to specify either the ancestor primitive (if the path ends with a slash), or the ancestor path and the shader primitive name prefix (if the path does not end with a slash).
If you want to re-do importing all materials (for example, to grab new materials), click Clear in the multi-parm, then click Auto-fill materials again.
Even though this node allows you to assign the material at the same time you import it, we recommend you use a separate node (Material Linker or Assign Material) to assign materials. Keeping the two operations separate makes your network easier to understand for others.
Inside the Material Library LOP, the VOP nodes, their parameters, and inputs represent USD shaders, their attributes and input connectors. For example, a Principled Shader VOP represents a Karma material, and the Pxr Surface VOP represents a USD RenderMan shader.
The Collect VOP can gather several shaders for different renderers to create a USD material that contains all of them.
You can connect the shader VOPs can be connected to one another, and the node will translate these as USD shader connections. (For example, if you connect the output of a USD UV Texture VOP to the input of USD Preview Surface VOP.)
To import materials from inside this node, set the Material network to
. (a single period).
You can use Visualize VOP ('x' hotkey) to debug the shader node network. If the shader translator for a given shader node supports output value visualization via the Visualize VOP node, then the USD Material will be authored in such a way that geometry will be shaded using the value of the shader node feeding into the Visualize VOP.
Node path to the VOP network containing material nodes to import. The node looks for materials here when you click Auto-fill materials. Set this to
. (a single period) to use the VOP subnet inside this node.
This is a hidden parameter, which is set and used by Auto-fill button.
The default parent scene graph path of newly created materials. This is prefixed to the material names to get the material prim path when you click Auto-fill materials.
This is a hidden parameter, which is set and used by Auto-fill button.
Click this to automatically create instances of the multi-parm for each material node in the Material network.
This button will bring up a pop-up dialog prompting for the material network inside which to look for nodes with material flag turned on. Each such node will be filled into own multi-parm instance. The dialog also asks for the USD path at which to author the USD material translated from that node.
Auto-generate Preview Surface Shaders
When possible, the LOP will generate a USD Preview Surface shader primitive. This shader type is part of the USD standard and should be implemented by all USD renderers, so this shader (which may be an approximation of the original shader) should show up in any renderer, even if the renderer doesn’t understand the original shader type.
Note, if textures are involved, the auto-generated preview network will wire the alpha output of a USD Texture Reader primitive to the opacity input of a USD Preview Surface shader primitive. Some renderers, like Storm, are known to mishandle the opacity, leading to artifacts in the viewport. To workaround such cases, you can turn this toggle off and then you can manually create a USD Preview network inside, feeding it to the Collect VOP along with the original surface shader.
Allow Shader Parameter Animation
When it is turned off, all USD values are assumed non-animatable and will be authored at a default time code. And, with this option turned on, shader node parameters that are time-dependent will get translated to USD values at non-default time codes, while time-independent parameters will still author a value at a default time code.
Note, checking parameter time dependency can be costly and may add up to a large portion of the shader translation time. Since the vast majority of shader nodes don’t have animated parameters, this toggle is off by default to save the work involved in checking it.
Reference Material Render Vars into Render Products
Whent this checkbox is turned on, the LOP will reference the render vars parent scope primitive (if it exists) into the global render products namespace (i.e., /Render/Products/Vars).
Some shader translators author render vars primitives inside the material, and referencing them into the global location makes it easy for renderers to include them in the render product, without traversing the whole stage to look for materials and information about their potential render vars. But if this behaviour is not desirable, you can toggle this checkbox off.
Parent Primitive Type
If the intermediate prims in a material path don’t exist, the node will create them. This controls the type of the intermediate prims this node creates.
Material Path Prefix
This is automatically prefixed to any material paths that are not absolute (do not start with a slash). This lets you specify relative paths in the multi-parm, and set their common USD parent hierarchy in this one parameter.
Number of Materials
The number of materials to import. Set the number or click the plus and minus buttons to add or remove material imports.
Include Only VOPs with Material Flag Set
If Material VOP is a pattern, this excludes nodes that don’t have the Material flag on. Default is off.
The Houdini node path to a VOP node representing a shader or material. This can be a node pattern, in which case this node will import all matched nodes as USD materials.
The scene graph path at which to create the USD prim. If this is an absolute path (starts with a slash), it is used as-is. If this path is relative, it is relative to the path in the Path Prefix parameter.
Assign to Geometry
When this is on, you can assign the newly imported material to USD geometry prims using the Geometry Path parameter below.
When Assign to Geometry is on, assigns the newly imported material to the primitives listed in this parameter.