Houdini 20.5 Import and export

Import, export, and cache geometry to/from disk

On this page

Overview

Houdini lets you store geometry on disk in .geo or .bgeo format files. The file extension controls which format Houdini saves. .geo is a simple ASCII format, .bgeo is a much more compact binary format. Unless you want to use external scripts to process the geometry files for some reason, use .bgeo as the extension for geometry files.

(The .geo file format is documented here.)

Tip

The File surface node can also load geometry data directly from saved simulation state (.sim) files. See the help for the File node for more information.

Export

To...Do this

Save the geometry in a node as a one-shot action

In the network editor, right-click a surface node and choose Save geometry.

Set up a File node to write geometry each time it cooks

  1. In the network editor, add a File node and connect the geometry network to its input.

  2. In the node’s parameters, set File mode to Write.

  3. Set the Geometry file to the file on disk to write to.

    If your geometry is animated, you can include $F in the filename to write out separate files for each frame.

Also see the section on caching below.

Set up writing geometry as part of a render dependency network

The Geometry render node “renders” the scene as a geometry file.

  1. Choose Render ▸ Create render node ▸ Other output nodes ▸ Geometry.

  2. In the Geometry node’s parameters, set the SOP Path to the object or geometry node whose geometry you want to save.

  3. Set the Output name to the name of the file to save the geometry into (should end in .geo or .bgeo).

    If your geometry is animated, you can include $F in the filename to write out separate files for each frame.

  4. Click the Render button at the top of the parameter editor to create the geometry files.

Import

To...Do this

Import geometry into a new object

Choose File ▸ Import ▸ Geometry.

This creates a new object containing a File node to load the geometry.

Import geometry into a geometry network

  1. In the network editor, add a File node.

  2. In the node’s parameters, set the Geometry file to the file on disk to read.

    If you saved out animated geometry is animated, you can include $F in the filename to read in separate files for each frame.

Tip

Press ` (backquote, above the ⇥ Tab key on US keyboards) in the network editor to open a file chooser which lets you choose a geometry file and automatically creates a File node in the network.

Caching geometry

The File surface node lets you write out geometry the first time the node cooks, and then use the saved geometry from then on, giving a simple form of on-disk caching. To refresh the cache, delete the files on disk.

  1. In the network editor, add a File node and connect the geometry network to its input.

  2. In the node’s parameters, set File mode to Automatic.

  3. Set the Geometry file to the file on disk to write to.

    If your geometry is animated, you can include $F in the filename to write out separate files for each frame.

  4. You can add nodes to the File node’s output to further process the cached geometry.

Working with .sim and .simdata

  • SDFs as volume primitives can live in .bgeo files. They show up in the viewport as sort of inverted because the default fog makes the outside areas opaque. However, you can use the Primitive SOP to set their visualization to Iso Surface.

  • .sim stores a bunch of simulation objects and their attached data. .simdata only stores the data attached to some simulation object.

  • You can create SDFs in .sim format and save them as .simdata. It is a mostly DOP specific format, but the File SOP will read .sim and .simdata.

  • The Isooffset SOP only saves .simdata files. The File DOP saves .sim files. The File Data DOP saves .simdata files. The checkpoint option on the DOP Network saves .sim files. The Dynamics output driver saves .sim files.

  • Isooffset reads .simdata, not .sim. The File SOP will read .sim and .simdata.

  • There is the Dynamics ROP to create .sim.

  • The File SOP can be used directly to read an SDF from within a .sim being referenced by a DOP Import SOP. If you specify a .sim, it unlocks the object mask and data path to read from.

  • To turn an SDF into a .sim, Volume Sample it in an Isooffset SOP and use the write mode. This will create a .simdata, suitable for use by the RBD Collision cache.

See also

Import and export