Create a Bifröst user cache

Prepare your Bifröst simulation for user caching

To reduce unnecessary computations and memory requirements while you generate a user cache, do the following:

  1. If you have multiple Bifröst simulations in the scene, you can temporarily turn off the simulations you are not user caching. To do this, uncheck Enable in the Container Attributes group of the main container nodes.
  2. Make sure that Bifröst does not use or create a scratch cache at the same time. To do this:
    • Select Bifrost > Bifrost Options and turn off Enable Background Processing. The scratch cache is always used when background processing is enabled.
    • Turn off the scratch cache. You can toggle Scratch Cache off in the Simulation Attributes group of the main container node, or alternatively toggle Enable Scratch Caching off in the Bifrost Options dialog box to affect all Bifröst simulations in the scene.
      Note: Even if Enable Scratch Caching is already off in the Bifrost Options dialog box, Scratch Cache may still be enabled in individual main container nodes. Toggle Enable Scratch Caching on and back off again to make sure that Scratch Cache is off for all nodes.

Create a user cache for all the cacheable objects in the scene

This method simultaneously creates individual user caches for all the cacheable objects in the scene, including caches for liquid, aero, foam, and collider objects. Use this method if you plan to extend the frame range of your simulation by appending newly cached frames to the existing user cache. See Append to an existing Bifröst user cache.

  1. Select the container for the simulation that you want to cache.
  2. Select Bifrost > Compute and Cache to Disk > .
  3. Make sure that the settings are as desired. For example:
    • The Compression format is set to the appropriate quality.
    • The Cache time range is set to begin at the Start Frame of the simulation set in the Simulation Attributes group of the main container node.
    • Write Mode is set to Write All.

    See Compute and Cache Options.

  4. Click Create or Apply.

    When Enable Background Processing is off, the requested frames are sent to the Bifröst Computation Server one at a time and you must wait for them all to be processed before you can interact in Maya.

    The user cache gets written to disk. In addition, the following things happen:
    • Frames that have been computed and cached are displayed in blue on the timeline.
    • For each cacheable object, the Cache Directory and Cache Name attributes are set in the Caching attribute group of the object's main properties node.
    • Enable is activated and Cache Control is set to 1 (read mode).
  5. If desired, you can turn Scratch Cache back on for faster scrubbing and playback.
Note: When using the cache, turn off Run up to current time in your Dynamics preferences.

Create a user for individual Bifröst objects

You can create a user cache for an individual Bifrost object by setting its Caching attributes. Caching a single object reduces unnecessary computations when user caches of other objects in the simulation are not needed. This means that you need to recache the entire simulation if you extend its frame range. You cannot append to this user cache.

Important: In your Settings > Time Slider preferences, make sure that Looping is set to Once. Otherwise, Bifröst re-caches the simulation when it loops back to the start frame.
  1. Select the main container for the simulation that you want to cache.
  2. In the Attribute Editor, click the tab for the main properties node of the object you want to cache.
  3. In the object's Caching group, set Cache Control to 2 (write mode).

    Make sure that all other Caching attributes are set as desired. See Bifröst Caching attributes.

  4. Play the simulation from the start frame to create the user cache.

    Bifröst computes and caches frames for the object and saves them to the specified location.

  5. Set the Cache Control to 1 (read mode).
  6. Preview the simulation.

Stop reading from a user cache

  1. Rewind the simulation to the start frame.
  2. Turn off Enable in the Bifröst object's Caching attribute group of its main properties node.

    Cache Control remains set to 1 (read mode). However, Maya will compute the simulation rather than read the user cache.