Import, export, and cache geometry to/from disk
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.)
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 |
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.
|
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 |
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.
-
In the network editor, add a File node and connect the geometry network to its input.
-
In the node’s parameters, set File mode to Automatic.
-
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.
-
You can add nodes to the File node’s output to further process the cached geometry.