You can pre-compile a surface shader or material into a new SHOP type to speed up shader compilation at render time.
Shaders and materials defined by a VOP network must be compiled on the fly by the renderer, and multiple materials with the same VOP network inside must be compiled separately, leading to redundancy.
To help speed up the compilation of shaders at render time, you can convert a shader into a new SHOP type, and/or you can convert a material into a new SHOP type or a digital asset.
Once you have converted a shader or material to a SHOP type or digital asset, you can create instances of the SHOP type or digital asset and edit each instance’s parameters to create variations. The underlying code will not be duplicated between instances, as it is with copies of shader networks.
VOP SHOP type vs. digital asset
The following outlines the difference between the two approaches for materials:
VOP SHOP type pre-compiles the VOP network into textual VEX code and stores the textual code in the new type. Because the new type does not contain the original network, you need to keep a copy of the original network somewhere so you can edit it and recompile the VOP SHOP type if necessary.
Advantages Compiles the VOP network only once. This is especially useful when distributing renders, rather than each render node having to recompile the network redundantly.
Disadvantages Does not store the VOP network, so you need to keep a copy to edit and recompile if necessary.
Digital asset stores the VOP network inside and compiles it on-the-fly as necessary.
Advantages Keeps only one copy of the VOP network, rather than multiple copies for each variation. Allows editing of the underlying VOP network.
Disadvantages Eliminates recompilation of multiple copies, but still requires that the VOP network be recompiled at render time.
In a future version of Houdini we plan to augment digital assets to combine the advantages of both approaches so the VOP SHOP type approach will no longer be necessary.
|Convert a Surface Shader Builder network into a new SHOP type|
Right-click the shader builder node and choose Convert to VOP SHOP type.
|Convert a Material Shader Builder into a new SHOP type|
Right-click the material builder node and choose Convert to VOP SHOP type.
|Convert a Material Shader Builder into a digital asset|
Right-click the material builder node and choose Create digital asset.
Once you have converted a network to a SHOP type or digital asset, you can create nodes of the new type in a shader network (such as