Share

wedge_cache

A node that supports writing and reading file caches produced with the wedging service.

This node is intended to be in a graph downstream (to the right of) nodes that output geometric objects. When used locally, the node can let objects pass through it or read the cache of objects from disk. The Read or Passthrough if no File mode can dynamically switch from Read to Passthrough based on whether the files exist on disk. When executed on the cloud-based wedging service though, the node always writes files to disk (see mode input port).

The wedge_cache node can write .bob (Bifrost object), .abc (Alembic), or .vdb (OpenVDB) files (see wedge_filename job port input).

Usage

  1. The wedge_filename job port indicates the location and type of file caches to be produced. The wedge_filename node used by the wedge_cache performs token replacements on the wedge_filename job port value (see the documentation for the wedge_filename node). A path without tokens is also valid for a single cache, but keep in mind that <wedge_index> token should be used when outputting wedges to ensure files do not overwrite between different wedges. After token replacements, the wedge_cache node also expands the environment variables of the form $name or ${name} that may be present in the input path (see the documentation for the expand_env_vars node).
  2. To use wedging, set the wedge_index and the wedge_index_count job port values.
  3. Add either a wedge_index or a wedge_parameter node to your graph to set a parameter that will be varied throughout the range of wedges.
Note:

Local wedging could be scripted to loop through all wedges and frames, enabling the hidden write_state job port, and modifying the wedge_index job port during the loops. Users can also use the building blocks contained in wedge_cache, wedge_filename and write_state nodes to build their own caching solution if needed.

Job Port Inputs

Note:

By deselecting all nodes in the Bifrost Graph Editor, the list of job ports used by the current graph will be displayed in the Bifrost Parameter Editor.

wedge_filename

The wedge_filename job port determines where the files are written and read from. The type of files that are written or read is controlled by the file extension present on the path returned by the wedge_filename node. The file extensions supported by the wedge_cache node are .bob (Bifrost object files), .abc (Alembic files) and .vdb (OpenVDB files). Any other file extensions are written and read as Bifrost object files.

wedge_index

The wedge_index job port specifies the current wedge (0-based).

wedge_index_count

The wedge_index_count job port specifies the total number of wedges.

write_state

The write_state job port determines when files are written by the wedge_cache node. Setting the value of this job port to true will enable file writing, including when the node is executed locally. Just ensure it is turned off after, otherwise there could be unintentional file overwrites locally.

Note:

The cloud-based wedging service automatically sets this job port to true before executing the graph.

Note:

When the write_state job port is true, then the wedge_cache node always passes through the geometric objects from its objects input to its out_objects output.

Inputs

objects

The input geometric objects to be written to file caches and/or to be passed through this node, depending on the mode input, and whether the node is executed locally or not (see also the write_state job port input).

Settings

mode

The mode determines the behavior of the node when it is used locally:

  • Read or Passthrough if no File reads a file cache from disk if it exists. If not, the node will automatically pass though the objects input, so the node still outputs data. This is the most automatic mode, but it can be harder to tell if one is reading from disk or passing through the data.
  • Read File reads a file cache from disk if it exists. If not, the outputs will be empty.
  • Passthrough bypasses the read of a file cache from disk and passes through the objects input to its outputs.

When the node is executed on the cloud-based wedging service, the mode will be ignored and the node will always write files to disk.

properties

A space-delimited list of properties to write when the wedge_cache node writes files. Use * (asterisk) to specify all properties. For more details on this input, see the documentation for the write_Bifrost_object, write_Alembic and write_OpenVDB nodes. The wedge_cache node uses these nodes internally, and shares the same features and limitations as these nodes for its properties input.

create_directories

If true, the wedge_cache node creates the directory tree structure (specified through the wedge_filename node), if this tree structure does not exist when the node writes the files. For more details on this input, see the documentation for the write_Bifrost_object, write_Alembic and write_OpenVDB nodes that the wedge_cache node uses internally.

Alembic

alembic_interpolation

The interpolation method for interpolating data at sub-frame positions when reading Alembic files (see the documentation for the read_Alembic node).

VDB

volume_subdivision_structure

The volume subdivision structure of the output Bifrost volume when reading OpenVDB files (see the documentation for the read_OpenVDB node).

Outputs

out_objects

An array of objects that have been passed through this node or read from files, based on the mode input and write_state job port input.

first_object

The first object in the array of out_objects output.

Was this information helpful?