Convert Bifröst scenes from previous versions

Scenes with Bifröst simulations created in earlier versions of Maya should be updated to be compatible with the current version.

Converting scenes from Maya 2016 Extension 2 and later versions

Scenes with Bifröst simulations that were created since Maya 2016 Extension 2 have the same node structure as the current version, and may work in the current version as before. However, if you want to use new features such as motion fields, the nodes need to be updated to modify the graphs and add new ports.

  1. Open the scene.

    When a Bifröst simulation from a previous version since Maya 2016 Extension 2 is detected, a warning is logged. For example:

    // Warning: Bifrost: to use the new Bifrost features, graph |bifrostLiquid1|bifrostLiquidContainer1 needs to be updated to the latest version, call mel script: replaceBifrostFXGraphsWithFactoryGraphs |bifrostLiquid1|bifrostLiquidContainer1 ;  // 
    

    Note that the exact message depends on the types of simulation and names of objects in the scene.

  2. Open the Script Editor.

    For more information about working in the Script Editor in general, see Script Editor.

  3. Copy the latter portion of the line, from after the colon up to and including the semicolon, from the history pane at the top to the MEL pane at the bottom. For example:
    replaceBifrostFXGraphsWithFactoryGraphs |bifrostLiquid1|bifrostLiquidContainer1 ;
  4. Run the line of script.

    You can now use the new features in Bifröst.

Converting scenes from versions prior to Maya 2016 Extension 2

Scenes with Bifröst simulations that were created in versions prior toMaya Extension 2 have a different node structure that is not compatible with the current version. However, there are scripts that you can run to convert them to the current version and copy some of the important attributes. If the old scene used cached files, you also need to reorganize the file folders.

Convert scenes

  1. Open the scene.

    When a Bifröst simulation from a previous version is detected, it is disabled and a warning is logged. For example:

    // Warning: Bifrost: graph |bifrostLiquid1|bifrostLiquidContainer1 needs to be updated to the latest version, call mel script: migrateBifrostGraphToVersion2016R2 |bifrostLiquid1|bifrostLiquidContainer1 ;  //

    Note that the exact message depends on the types of simulation and names of objects in the scene.

  2. Open the Script Editor.

    For more information about working in the Script Editor in general, see Script Editor.

  3. Copy the latter portion of the line, from after the colon up to and including the semicolon, from the history pane at the top to the MEL pane at the bottom. For example:
    migrateBifrostGraphToVersion2016R2 |bifrostLiquid1|bifrostLiquidContainer1 ;
  4. Run the line of script.

    A new graph is built and the old one is deleted.

  5. Update any settings as may be required. The settings listed below are transferred automatically. All other settings revert to their current defaults, some of which have changed from previous versions.
    • Main container: Scratch Cache, Start Frame.
    • Main properties: Master Voxel Size, Gravity Magnitude, Gravity Direction.
    • Guide properties: Enable, Simulation mode, Mesh mode.
    • Foam properties: Enable.
    • Emitter properties: Enable, Continuous Emission.
    • Collider properties: Enable, Conversion Mode.

Organize cache files

Previous versions mixed different cache files together in the same folder, but the current version requires that they be organized into separate folders named after their object. The fluid voxel and point cache files share the same object and must be in the same folder, but other caches like solids (colliders) belong to a different object and must be in other folders.

  1. At a command prompt, run bifinfo.exe (located in the bin/ folder of the Bifröst plug-in installation directory) and specify one of the cached frames. For example:
    bifinfo <path_to_cache_files>/<prefix>_liquid_point.<nnnn>.bif
  2. In the output, locate the line that begins with object. For example:
       object                          voxel_liquid
  3. Create a folder with the same name, for example, voxel_liquid.
  4. Move the corresponding cache files to the new directory.
  5. Repeat for the other cache file types, for example, <prefix>_solids_voxel.
  6. After converting the scene, enable caching in the Attribute Editor for the appropriate properties, such as liquid, guide, foam, or aero.
  7. Set Cache Control to 1 (read mode).
  8. Click the folder icon next to the cache name fields, then browse and select one of the appropriate cache files in its new location.