Houdini 20.5 Nodes Geometry nodes

File geometry node

Reads, writes, or caches geometry on disk.

On this page

Overview

This node has two modes of operation. If its input is connected, you can choose a File mode to control how the node reads, writes, or caches geometry on disk. If no input is connected, you can specify a geometry file to read in from disk and send through the node’s output.

It also supports reading, but not writing, of .sim and .simdata files created from File and File Data DOPs.

Tips

  • You can also write out the geometry from any surface node as a one-shot action by right-clicking the node and choosing Save Geometry.

    To set up a procedural workflow where the geometry output of a surface node network is always written to disk as part of a render dependency network, set up a Geometry render driver.

  • You can “import” the loaded geometry into the .hip file so it works without the external file by locking the File node.

Parameters

File Mode

How this node reads/writes the geometry to/from the disk file.

This parameter is only available when the node’s input is connected.

Automatic

Writes the file if it doesn’t exist, reads it if it does exist.

This is useful for caching, where the node will write the cache to disk the first time it cooks, and use the cache file from then on.

To force a refresh of the cache, manually delete the file on disk.

Read Files

Reads the geometry from the file. If the node’s input is connected, it’s ignored.

Write Files

Writes the input geometry to disk.

No Operation

No file access will occur. Pass through the input geometry to the output, like a Null surface node.

Geometry File

The name of the file to read or write.

Reload Geometry

Force a reload of the file. This will also clear any cached data for packed disk primitives (see also the geocache command).

Object Mask

When loading .sim files this determines which objects should be loaded from disk. Any objects matching this pattern will be loaded.

Geometry Data Path

For each object loaded from a .sim file, any data attached to the object that matches this path will be loaded. Patterns like * can be used to match multiple data. If blank, only the Geometry data will be loaded.

Missing Frame

What should be done if the specified file does not exist on disk. This is only used if in Read Files mode. By default, if no file of the given name exists, the SOP will error. This can be troublesome in a network that can’t recover from the error. In these cases the behavior can be set to No Geometry so only a warning is posted.

Note

In No Geometry mode, if an input exists to the File SOP, it will be passed through. This allows the File SOP to become a read-only cache.

Load

Some file formats, in particular .bgeo, .bgeo.sc, and .geo, contain meta-data in the header than can be loaded without loading the entire file. This is useful for dealing with large data sets.

All Geometry

Loads the whole file. Potentially with some parts delayed (see below)

Info

Creates one point if the file loads successfully and attach attributes for each named component of the meta-data.

Metadata is created by whatever writes the file, so may vary. Common metadata are:

artist

The username that generated the file. You can override this with the HOUDINI_AUTHOR environment variable.

hostname

The name of the machine that generated the file. This is very useful when tracking strange behavior on a farm. It can also be overridden with the HOUDINI_AUTHOR environment variable.

date

The time the file was created, which may not match the date stamp of the file.

software

The version of Houdini used to create the file.

time

The time, in seconds, on the playbar when the file was saved.

timetocook

How long it took to compute the file. Created by ROP Geometry, this is the wall-clock time in seconds to generate the file. If multiple output drivers are present, caching may cause undercounting of what it would take to cook the file on its own.

Info Bounding Box

Tries to build a bounding box using the information stored in the header of the file.

Point Cloud

Tries to load just the points from a disk file. This will be faster and use less memory than loading primitives.

Packed Disk Primitive

Instead of loading the geometry into memory, create a packed disk primitive. Copies of the delayed load primitive will share geometry meaning that multiple copies will use less memory.

Packed Disk Sequence

Instead of loading the geometry into memory, this will create a packed disk sequence primitive. Unlike a packed disk primitive, the packed disk sequence stores a list of filenames along with an index of which file to unpack during rendering. Since the packed disk sequence primitive is aware of all the files in the disk sequence, it is able to compute blended sub-frame geometry at render time (provided topology matches between frames). This means that motion blur can be computed correctly. When creating the packed disk sequence primitive, the Geometry File parameter is evaluated for each frame in the frame range. The index of the packed disk sequence primitive is set to the value of the Sequence Index parameter.

Packed Geometry

This will load the geometry into memory, and create a standalone packed geometry primitive containing it.

Pack Using Expanded/Absolute File Path

When loading the geometry as Packed Disk Primitive, this toggle controls whether the file name stored with the primitive will have variables expanded. By default, variables will be preserved. For example, a file such as $HIP/geo/tree.bgeo will be portable if the value of the $HIP variable changes. This is only important if you are saving the packed primitive to disk and may move the geometry file.

When storing variables in the packed primitive (i.e. the toggle is turned off), the primitive itself performs variable expansion. Since the primitive can be accessed in applications other than Houdini (mantra, gplay, gconvert, etc.), the expansion of variables is limited in function. For example, using variables local to the .hip file or using expressions which reference other nodes may not work as expected.

Display As

When loading the geometry as Packed Disk Primitive or when delayed loading, you can set the viewport display to a lighter representation of the packed geometry. This setting only applies to rendering in the viewport, at render time, the full geometry will be rendered.

Use File Setting

Packed primitives have viewport display settings that are saved to file. This option reads these and uses them. All others override the saved setting.

Full Geometry

The full geometry will be displayed in the viewport.

Point Cloud

Only the points of the geometry will be displayed. This will take less memory and be faster to render.

Bounding Box

Only display the bounding box of the geometry in the viewport.

Centroid

Display a single point at the center of the bounding box.

Hidden

Don’t display the geometry in the viewport.

Delay Load Geometry

If this parameter is set, packed primitives and other shared data will not be loaded immediately but will be loaded only as needed. This can be useful when opening a large scene to reduce load times.

Create Intermediate Directories

Create intermediate parent directories for output files as needed.

Cache Frames

The total number of frames to cache in memory. These sorted by filename, not by time, so if multiple frames evaluate to the same file name they will share the same cached geometry.

Note

A value of 1 is almost the same as the default behavior of the File SOP. However, the new geometry will be loaded before the old geometry is freed. When loading agent primitives, this avoids possible flushing shared agent shape caches.

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.

Frame Range

When creating Packed Disk Sequence primitives, this parameter specifies the number of filenames in the disk sequence. When evaluating the Geometry File, the $F, and $FF variables will be set to the values in the frame range.

Sequence Index

When creating Packed Disk Sequence primitives, this parameter specifies which geometry from the sequence will be used at render time. The index is linear, with values between 0 and the number of geometry files in the disk sequence (not based on the frame number). Index values out of range will automatically wrap to generate animation cycles.

The index values can have non-integer values. If the topology matches between disk files, the geometry will be blended at render time. See also the vm_pack_sequencesubsteps rendering property.

Tip

To offset a sequence of images or geo files when you have padding in your frames, you should enter something like this:

<path_to_image>/frame`padzero(3, $F+1)`.tga

Where 3 is the number of digits in your sequence, for example 001 is pad 3, 0002 pad 4, etc. The back ticks are necessary so the expression gets evaluated inside the string parameter.

Wrap Mode

When creating Packed Disk Sequence primitives, this parameter specifies behavior when Sequence Index is outside of the frame range.

Cycle

File sequence repeats.

Clamp

First file is used used when Sequence Index is before the range. Last file is used when Sequence Index is after the range.

Strict

No geometry outside of the range.

Mirror

File sequence repeats with each repetition reversing order.

Examples

PackedPoints Example for File geometry node

This example shows how you can use the file sop to do a delayed load of packed disk primitives to have multiple geometry samples per frame for rendering motion blur. If you save out the packed disk geometry, you're really only saving out the point geometry with references to the disk files (which is very light weight).

PackedSamples Example for File geometry node

This example shows how you can use the file sop to do a delayed load of packed primitives to have multiple geometry samples per frame for rendering motion blur.

PackedSequence Example for File geometry node

This example shows how you can use the file sop to load a packed disk sequence.

See also

Geometry nodes