|On this page|
Houdini can cache the VEX code generated from the node network inside a material.
For a Material Builder node, this happens automatically if you cook the material (by assigning it and rendering).
The benefits are especially important when distributing renders, since each renderer in the farm doesn’t have to redundantly compile the material itself. Compilation time for very complex materials can take up to several minutes.
In the network editor, nodes that can cache VEX code but do not have cached code have an "empty" Cachable badge.
If the node has cached VEX code, the badge changes to the "full" Cached badge.
If you are using a Material Builder node that hasn’t been turned into an asset, you don’t need to enable caching, the node handles it automatically.
Have a material asset pre-compile its VEX code automatically
Turn on the Save cached code option on the Save tab of the operator type properties for the digital asset.
You should usually leave this option on unless you need to edit a very complex material asset and want to turn off automatic recompilation while you work on it.
Tips and notes
Unlocking the asset causes Houdini to load its network (normally Houdini avoids loading the asset’s network and just uses the compiled VEX code).
While the asset is unlocked, Houdini uses the network to generate the material’s code dynamically.
When you re-save the asset (for example, right click the node and choose Save Operator Type, or click Accept or Apply in the type properties window), the cached VEX code is re-compiled.
When you sync the unlocked node (right click the node and choose Match Current Definition), Houdini unloads the nodes of the asset’s network to save memory and just uses the cached code.