|On this page|
This node lets you change the value of a material parameter (for example, base color) individually for each prim or point instance that has that material assigned.
This node makes it easier to author material override primvars, and lets you compute the override values using expressions and/or VEX.
In USD, when the name of a primvar on a prim matches the name of a material parameter on an assigned material, the value of the primvar can potentially override the material parameter when shading that prim.
(This also works with point instancing, where you would have an array primvar on the instancer with a value for each instance.)
Houdini’s Karma renderer allows primvars to override any parameter.
In many other renderers and shaders (such as RenderMan and
UsdPreviewSurface), you can only override parameters that the shader has explicitly made override-able.
Tips and notes
Depending on the render delegate, certain types of shaders will need to be attached to the material for the primvars to be read successfully.
For example, USD Preview Surface will only recognize primvars read through a USD Primvar Reader shader. With Renderman, a
pxrprimvarshader is required.
While Karma can technically read any primvar to override a parameter by the same name, the name dropdown will only show primvars specified through a bind shader.
In VEX snippets, you can use
@variable names containing colons (
:). This makes it easier to automatically bind certain USD attribute names (for example
i@primvars:foo). (These names are not normally legal in names in VEX source code. The node automatically encodes these kinds of names when used in a snippet.)
Whether you want to create overrides for prims (including instanceable prims) or point instances.
The primitive(s) the node should operate on. You can drag primitives from the scene graph tree pane into this textbox to add their paths, or click the Reselect button beside the text box to select the primitives in the viewer, or ⌃ Ctrl-click the Reselect button to choose prims from a pop-up tree window. You can also use primitive patterns for advanced matching, including matching all prims in a collection (using
You can override multiple material parameters in one node. Set this to the number of overrides you want to create/edit, or click the plus and minus buttons to add or remove overrides.
For each override, whether to actually author the primvar.
The name of the primvar to create or edit. Do not include the
primvars: prefix. You can choose the name of a material parameter from the drop-down menu next to this field.
The USD data type for the primvar, This should match the type of the material parameter. (If you choose the Name from the drop-down menu, it sets this automatically.)
Set the value using a VEX snippet. The snippet should write the override value to the
@ptnum is the index of the current prim/instance. You can use
npoints(0) to get the total number of prims/instances to compute values for. You can use
@Time to make the value time-dependent.
The value to use for this material parameter. (This can be driven by expressions.)