On this page | |
Since | 19.5 |
Overview ¶
This node combines the functionality of the USD ROP and the
Sublayer LOP to let you write out USD a file and then read that file on disk instead of cooking its input.
Tips ¶
-
Use a
Cache LOP as an input to this node, to get more control over subframe sampling.
Parameters ¶
Load from Disk
When this is on, the node reads its output from the cached disk files, rather than cooking its input. When you click Save to Disk or Save to Disk in Background (on the Caching tab) to write out the cache files, the node automatically turns this checkbox on.
Reload Geometry
Force a reload of the file. This will also clear any cached data for packed disk primitives (see also the geocache command).
File Path
When this is Constructed (the default), the node builds up the cache file path(s) from the values of various parameters, allowing features such as versioning and animation options. If you set this to Explicit, you need to manually write a single expression in the Geometry File parameter with all the variables you want in the path (including the frame number when Time Dependent Cache is on).
Base Name
When File Path is Constructed, this is the first part of the cache file name. The default is $HIPNAME.$OS
(the name of the current scene file without the .hip
extension, then a dot, then the name of this node). This is usually sufficient to prevent filename collisions between files/nodes if you give this node an meaningful, unique name (if you have two networks containing nodes both named filecache1
, you will get a collision). The drop down menu to the right of the text field has some more possible expressions.
File Type
The default is .bgeo.sc
, which can handle any type of Houdini geometry and uses compression, so it’s always safe to use. If all the primitives in the input are always VDB volumes, you can switch the file type to save the files directly as .vdb
. When you set the File Type to .vdb
, the node converts Houdini’s primitive attributes to VDB grid metadata, and detail attributes to file metadata.
Base Folder
When File Path is Constructed, this is the folder to save the cache files into. The default is $HIP/geo
(a folder named geo
in the same directory as the current scene file). (When Version is on it adds another directory level inside the base folder.)
Open Directory
Click to show the contents of the Base Folder in the file manager. This can be useful when you want to clean up old cache files.
Version
When File Path is Constructed and the checkbox to the left is on, the node adds a directory level (and filename part) to the cache file path(s) indicating the version. This lets you cache multiple variations of the input network.
Caching ¶
Save to Disk
Saves the geometry to disk with the last control settings.
Save to Disk in Background
Use a TOP network to cook and save the cache files to disk in a separate background process. This allows you to keep working on other parts of Houdini. The cached frames will show up as they are completed by the other process.
Cancel Cook
Stops all background caching processes, if any exist.
Tip
You can collapse the box around these buttons as a “safety latch”, to prevent yourself from clicking them and rebuilding the cache accidentally.
Evaluate As
When this is Frame Range the node writes a cache file for every frame (see Start/End/Inc below). If you don’t want pre-generate all frames at once, or if you know you only need to regenerate a single changed frame, you can set this to Single Frame. This makes the node write out a cache file only for the current frame (or the frame you set in Override Frame).
Override Frame
When Evaluate As is Single Frame and the checkbox to the left is on, cache this explicit frame number instead of the current frame from the timeline.
Start/End/Inc
Specifies the range of frames to render (start frame, end frame, and increment). All values may be floating point values. The range is inclusive.
These parameters determine the values of the local variables for the output driver.
$NRENDER
The number of frames to be rendered by the output driver.
$N
The current frame being rendered (starting at 1 and going to $NRENDER
).
Substeps
When Evaluate As is Frame Range, this is the number of fractional sub-frames to divide each frame into. Caching sub-frames increases the quality of motion blur rendering for cached animated geometry. If you set Substeps greater than 1
and you've set File Path to Explicit, make sure your explicit path expression can handle fractional frames, by using $T
(floating point time in seconds) or $FF
(fractional frame number) instead of $F
(whole frame number).
Scheduling ¶
Custom TOP Scheduler
This parameter overrides the TOP scheduler for this node.
USD ¶
Save Style
This node can apply some transformations to the layer stack before writing out files. These transformations do not affect the final composed stage, only the number of layer files generated.
Flatten Implicit Layers (Collapse Implicit Sublayers, Preserve References)
The default. Composes anonymous in-memory layers down onto the nearest layer with a file path (so the node will write out any layers that have file path metadata to separate USD files). This preserves references, variants, and other composition arcs.
Flatten All Layers (Combine All Sublayers, Preserve References)
This composes all layers (both anonymous layers and layers with file paths) into a single layer. This preserves references, variants, and other composition arcs, so the node may still write out more than one file if external files were referenced in.
Separate Layers (Preserve All Sublayers and References)
Don’t compose any layers in any way. Even anonymous in-memory layers will be saved out to their own files (you should turn off Error Saving Layers with Implicit Paths so the node doesn’t error trying to save anonymous layers).
This may be useful for debugging, especially in combination with debug flags on nodes, to see what each LOP node is doing.
When the node has to write out a layer without file path metadata, it will automatically generate a relative file path based on information such as the node path of the node that generated the layer.
Flatten Stage (Collapse All Sublayers and References)
This flattens all layers into a single stage, and “bakes in” all composition arcs, even variant selections. This discards information such as which opinions came from which layer, and unused variants. This writes out a single USD file.
This may be useful if you want to “delete history” and make it seem like it a file wasn’t composed from layers, references, variants, and so on.
Tip
If you want to “preserve history” but want the convenience and portability of a single file, use the USD Zip render node to generate a
.usdz
file.
Flush Data After Each Frame
When this is on, the node writes out each frame’s data to disk before cooking the LOP Network to generate the next frame of data. When this is off (the default), the node cooks the data for all frames into memory and writes out the animated files all at once. Turning on this option ensures that only a single frame worth of data is in RAM at any one time, allowing arbitrarily large USD files to be created. But saving each frame can be slightly slower, and the generated files may be larger because of the way USD files append new data to an existing file. See saving animation above.
When this option is on, this ROP can also generate separate USD files for each frame. To do this, embed the local variable for the current frame number in the Output File path (and other layer save paths) so each frame will write out files with unique names. For example:
$HIP/usd/scene_$F4.usd
See expression in filenames for more information.
Error Saving Layers with Implicit Paths
When this is on (the default), the node errors if it would otherwise write an anonymous in-memory layer (that is, a layer with no file path metadata) to disk.
You will usually only turn this off if you are using Save Style ▸ Separate Layers (Preserve All Sublayers and References) to write out every layer separate for debugging purposes.
Strip Layers Above Layer Breaks
Enable this option to prevent layers authored above Layer Break nodes from being written to disk by this ROP. This allows a Layer Break node to dictate which portions of the LOP Network are to be saved. Disabling this option allows this behavior to be overridden, forcing the full stage authored by the LOP network to be written to disk. This may be used for debugging purposes, or to write a complete scene to disk for rendering.
Use Relative Paths
This is automatically added by default. This processor changes absolute file paths to relative paths in layer files. This allows you to use paths such as $HIP/usd/foo.usd
for loading, but have them written out as paths relative to the source file. This is recommended practice so you probably do not want to remove this processor.
Save All File to Specific Directory
The folder where all of the output files are stored.
Save Paths Relative to Output Path
Causes any Save Path parameter that are relative paths to be treated as if they are relative to the output file. This makes it easy to ensure all files generated by a LOP network are saved into a common root directory. Changing the save location of the output file will implicitly change the save location of all other files.
Use Search Paths
This processor includes a Search Path parameter. Each asset path is compared against the directories listed in this path. If the asset is inside one of the search paths, the asset will be referenced with a search path rather than a full path or relative path.
Match Output Layer Extension
Normally, if you change the extension of the output file, it only affects that “top-level” output file. All other external files are written to their embedded save paths, with their embedded extension. This processor changes the extension on all paths to match the extension of the output file. This means if you change the output file to use .usda
(the textual format), when this processor is active, all external USD files will also switch to .usda
.
Number of Options
Lets you specify context options that only apply while writing out files from this node. Set the number of context options to define/override, or use the plus and minus buttons to add or remove options.
You could have two separate USD render nodes with different context options, so they would write out different USD from the same LOP network depending on uses of @contextoption
references in expressions. This could be useful for wedging, or to cause the LOP network to configure the stage in ways that are not good for interactively, but should be written to disk.
Option Name
For each option, the name of the option. You can reference this option in an expression using @‹name›
.
Option Type
For each option, the type of data stored in the option, either a floating point number of a string.
Option Value
For each option, the value of the option (while this node writes out USD).
Advanced ¶
Enable Load from Disk on Save
Whether the node will automatically turn on Load from Disk when you click Save to Disk or Save to Disk in Background.
Harden Base Name on Save
When File Path is Constructed and this is on, when you click Save to Disk or Save to Disk in Background the node automatically converts the expression in Base Name to a literal string. This prevents the cache from breaking if you duplicate or rename the scene file or node.
Create Intermediate Directories
When writing out cache files, automatically create any intermediate directories in the file path that don’t exist.
Alfred Style Progress
A percentage complete value is printed out as files are written. This is in the style expected by Pixar’s Alfred render queue.
Save in Background
When saving more than one frame, save in a background thread. This can make saving faster for large file sizes, but may use more memory since it will retain the output geometry until the save completes.
Save Retries
If saving the geometry to disk fails due to a disk writing error, Houdini will usually error the output node immediately. This is desirable for most cases where a failure to save means an illegal path, which is not recoverable. However, sometimes files fail to save due to network issues. If the number of save retries is non-zero, Houdini will re-attempt to save this number of times. Each time will be accompanied with an output to the console of the failure to save and a five second wait in the hopes that the network will clear up.
Render with Take
Uses the settings in a particular take while rendering. Choose Current to use the current take when rendering.
Missing Frame
This is what the node should do (in Load from Disk mode) when the node can’t find (or cleanly load) a cache file. Report Error sets an error on the node, preventing the rest of the network from cooking. This makes it obvious when a problem happens. No Geometry (the default) sets a warning on the node rather than an error, and outputs empty geometry. This can be useful if your network has a way of dealing with missing cache frames, or if they're not important.
Load Retries
If loading the geometry from disk fails due to a disk writing error, Houdini will usually error the output node immediately. This is desirable for most cases where a failure to load means an illegal path, which is not recoverable. However, sometimes files fail to load due to network issues. If the number of Load Retries is non-zero, Houdini will re-attempt to load this number of times. Each time will be accompanied with an output to the console of the failure to load and a five second wait in the hopes that the network will clear up.
Pre-fetch Geometry
Attempt to predict the next frame that will be needed and load it in the background. This lets computation be overlapped with file IO.
If you are blending multiple frames, the Cache Frames needs to be large enough for only the net-new frame to be loaded each cook. Otherwise the simple predictive model of the prefetcher will be confused and stop working.
A script command can be specified for execution at various execution points. The expression language selected for the script parameter determines whether the command is in hscript or python.
Prior to execution, this node is automatically set as the global current node.
To run statements from a file, specify the path to the file with either a .cmd
extension (when the language is set to Hscript) or a .py
extension (when the language is set to Python). Additional arguments to the script can also be supplied. They will be parsed in a shell-like manner.
Pre-Render Script
Run this script before any rendering.
Pre-Frame Script
Run this script before each frame.
Post-Frame Script
Run this script after each frame.
Post-Render Script
Run this script after all rendering.
The expressions in these parameters allow an expert user to customize exactly how the node generates a cache file path. However, editing the expressions can easily break the operation of the node. The basic parameters include a lot of room for customization, so we recommend that you do not try to customize these expressions. However, they are available if, for example, they are necessary to conform with studio-wide conventions.
Version String
Contains an expression that generates the “version” part of the path, including a v
prefix. Do not edit this expression.
Cache Folder
Contains an expression that generates the parent directory path for cache files. Do not edit this expression.
Cache Name
Contains an expression that generates the filename for cache files. Do not edit this expression.
Descriptive Label
Contains an expression that generates the descriptive text displayed next to this node (below the name and badges) in the network editor. This is set to output the cache filename pattern. Do not edit this expression.
Output File
Contains an expression that generates the resolved, full path of the cache file for the current frame. Do not edit this expression.