Houdini 21.0 Nodes Geometry nodes

USD File Export geometry node

Since 18.0

This node will export geometry from a SOP network directly into a USD file.

Parameters

Configure

Import Group

Turn this on and specify a group name (or a space-separated list of group syntax) to import. If you turn this on but leave the field blank, it imports all geometry.

Import Group Type

Specifies whether the Import Group is a point or primitive group.

Import Path Prefix

If a prim being imported has an automatically generated name (like mesh_0) because it had no path primitive, or if it has a path primitive but the path is relative (does not start with /), the node automatically prefixes the name/path fragment with this path. This is a way of keeping “un-pathed” prims organized under a single branch. (See how to create geometry hierarchy.)

(The default is /$OS which puts “un-pathed” prims under a root prim with the name of this node.)

Transform

Specifies whether the geometry should be transformed into world space before being written out. This applies the object-level transform to the Relative Path Prefix prim and any other root prims in the generated USD stage.

Export

Save to Disk

Click to write out the layers generated by a LOP network to USD files.

Save to Disk in Background

Starts another copy of Houdini in the background and instructs that copy to cook and save the USD files generated by the LOP network. This allows one to continue working in the current Houdini session.

Controls

Click to open a dialog that lets you launch a “one-off” render with different frame range and dependency settings.

Valid Frame Range

See saving animation above for more information.

Render Current Frame

Render the current frame number (in the playbar).

Render Frame Range

Render each frame in the range set by the Start/End/Inc parameters below. The Flush Data After Each Frame parameter controls whether to write out data to disk after each frame, or to generate animated data in memory before writing out all the data at once.

Render Frame Range (Strict)

The Render Frame Range option may generate frames outside the given range if they're requested by a render dependency. If you choose this option, this node will never render frames outside the given range.

Render Frame Range From Stage

Examines the USD stage of the source LOP node for a start and end timecode value. These are used as the start and end of the frame range to save to disk. If the stage does not have this metadata set, executing a save operation will result in an error.

Start/End/Inc

When Valid Frame Range is Render Frame Range or Render Frame Range (strict), the start and end frames (inclusive) and interval.

Render with Take

Render with the parameter values stored in this take.

Output File

The “top-level” USD file to write the root layer to. Other layers that have file path metadata set will be written to their own USD files. A default output processor (see below) translates external file references in nodes to be relative to this file’s directory, as is recommended.

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.

Track Primitive Existence to Set Visibility

LOP networks may generate vastly different scene graphs from one frame to the next. When combining these scene graphs over a frame range into a single animated scene graph, the set of primitives in the combined scene graph will be the union of the primitives in each frame’s hierarchy. But if a mesh appears at frame 50, this generally means that it is desired for this mesh to not be visible prior to frame 50. Enable this option to cause this node to track a list of all primitives at each frame, and automatically author animated visibility attributes for any primitives that are added to or removed from the scene graph over time. This gives the appearance of primitives being added and removed over time.

Only subclasses of UsdGeomImageable primitives will be tracked this way, since these are the only USD primitive types which respect the visibility attribute.

Use Network Drive Safe Save (Windows Only)

When running on Windows, the USD library often has issues saving layers to network mounted drives when those layers are currently loaded into a USD stage. This can make it impossible to overwrite a USD layer that is in use, even by the current Houdini session. This option works around this issue by having the USD ROP mute each layer right before ti is saved to disk (but only when running under Windows - on Linux and MacOS this parameter has no effect). Once the layer is saved, it is un-muted. This approach incurs a performance penalty as any stages using this layer will be recomposed twice instead of once. But in some settings this can make the save process much more robust.

Use Relative Paths

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.

Layer metadata

Default Primitive

Set this to the name of a root primitive on the current stage to set it as the default primitive for the top-level file.

Error Saving Layer with No Default Primitive

When this is on, the render node will error and stop cooking if you haven’t specified a default primitive for all layers being written out.

This is a way to force yourself to make sure layers have default prims, so you know you can reference in files without having to manually specify a top-level prim.

Save ROP’s Time Information to Output

Write the start and end frames, as well as the current frames per second setting, to the top-level output file.

Clear Houdini-Specific Custom Data

LOP networks often attach Houdini-specific custom data to layers, prims, and properties. Houdini does not need this data to be stored on disk (usually it is related to how to write files), so by default Houdini strips out this data before saving. Normally there’s no reason to turn this parameter off (it’s possible it might help SideFX diagnosing a problem).

Ensure Basic Metrics are Set on All Layers

This options ensures that the upAxis and metersPerUnit metadata is set in every USD file written to disk. If a value has not been explicitly authored on a layer by the LOP Network, the default up axis and meters per unit values from the Lighting Preferences are used.

Context options

Set ROP Cook Context Options

Controls whether this node sets the @ropcook, @ropstart, @ropend, and @ropinc context options when rendering. If enabled, these context options are automatically set to 1 for @ropcook, and the values of the Start/End/Inc parameters from this node for @ropstart, @ropend, and @ropinc. Using these standard context options it is easier to set up predictable behavior for Cache LOPs, LOPs that create ranges of time sampled values, and LOP nodes that are only used for generating viewport previews or final rendered output.

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).

Scripts

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-Write Script

Run this script after each frame’s data finishes writing to disk.

Post-Render Script

Run this script after all rendering.

Initialize Simulation OPs

Initialize DOP simulations before rendering.

Alfred Style Progress

Print percentage complete value as files are written. This is in the style expected by Pixar’s Alfred render queue.

Report Network Use

Print the number of bytes sent or received by the distributed simulation nodes during cooks triggered by this node.

This does not track network usage from, for example, saving a file to an NFS mount. It only tracks the network communication of distributed Houdini nodes.

See also

Geometry nodes