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:
<node_path[-3:]>: the last 3 indices.<node_path[:3]>: the first 3 indices.<node_path[0:3]>: the specific indices 0—3.Note that:
output of the top level of the graph.time node to connect to the frame input. In some cases, you may need to convert the frame value from float to int using to_int, or convert frame_step to a frame rate using one_over.#. Use multiple characters for frame padding, for example, #### for 0001, 0002, etc. You can also use @ instead of #.* for all properties or point_* for all properties beginning with "point_".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:
file_cache nodes, set their mode to the new Write State Mode.write_* nodes, use if nodes to execute them only when the output of write_state is true.
To write files using batch execution:
write_state global variable is temporarily set to true while the files are being written.
You can cancel batch execution in progress by choosing Edit > Cancel Batch Execute.
Note that wedge_cache nodes always write during batch execution so be careful if there are any wedge_cache nodes in your graph.