Input and output data from files

As an alternative to inputting and outputting geometries to the host scene, you can input and output files. This is useful, for example, for caching or rendering on a farm. In addition to Bifrost's object format, there are read_* and write_* nodes for several standard formats.

The format to use depends on the type of geometry:

You can also use the file_cache node. This node can read and write .bob, .abc, or .vdb files based on the extension. It also supports tokens in the file path: <project_directory>, <scene_directory>, <scene>, <wedge_index>, <graph>, <node>, and <node_path>. By default, <node_path> returns the full path of the file_cache node, but it can be sliced using the syntax <node_path[from:to]> where from and to are indices of elements, for example:

Note that:

Writing files using batch execution

Batch execution lets you write out cache and other files without the risk of accidentally overwriting them. This process uses the write_state global variable, which is managed by Bifrost and set to true during batch execution.

It requires some preparation in your graph:

save files to disk when write_state is true

To write files using batch execution:

  1. Choose Edit > Batch Execute.
  2. Specify the time range.
  3. Click Execute. The write_state global variable is temporarily set to true while the files are being written.

specify the time range for batch execution

You can cancel batch execution in progress by choosing Edit > Cancel Batch Execute.

Warning:

Note that wedge_cache nodes always write during batch execution so be careful if there are any wedge_cache nodes in your graph.