Guide a Bifröst liquid with a solid mesh

You can use a solid, deforming polygon mesh to guide a liquid simulation. In some cases, this may be preferable to using a planar mesh, particularly if you require interaction with the bottom of a containing collider object such as a sloping shoreline.

As when using a planar mesh, only the liquid at the top layer of the surface is simulated, allowing for higher resolution settings with less memory and computation time. This makes the technique useful for something like the surface of an ocean when you want full control over the basic shape of the waves. The deforming mesh lets you direct the waves artistically, while the simulation provides splashes and other fine details. In most cases, you'd use the same deforming mesh as both an emitter and a guide, but this is not a requirement.

  1. Prepare the animated, deformed polygon mesh or meshes that you will use as guides and emitters.
    • Make sure that the emitters/guides are deep enough to fully contain the depth of the liquid layer that you need to simulate. Otherwise, holes can appear in the result.
    • Although the emitters/guides should have animated deformations, the topology should not change. In particular, this means that you should not use a cached mesh of another Bifröst simulation.
    • For best results, the "waves" in the guiding mesh should move in a manner that's similar to how real waves would behave. If the mesh does not deform realistically, for example if the waves are too fast or too slow, then the simulation may have artifacts or produce other unexpected results.
    • For realistic ocean waves, the vertices should ideally move horizontally as well as vertically.
    • The animation of the deformation should last as long as the number of frames that you want to simulate. This is a particular consideration when using cached geometry as a guide.
  2. Set up a liquid simulation in the usual way, using the deforming polygon meshes as emitters. Make sure that the colliders are fairly thick (at least 4 voxels), including the object used to hold the pool of liquid in place.
  3. Make sure that Continuous Emission is off in the emitter properties if you will be using them as guides.
  4. Select the polygon mesh objects to use as a guides, as well as the bifrost shape or container object, and then select Bifrost > (Add) Guide.

    The selected meshes are added to the simulation as guides sharing a single guide mesh property (e.g., guideMeshProps). Additionally, Enable is activated in the Guided Simulation attribute group and Mesh is activated in the Input subgroup of the global guide properties (e.g., bifrostGuideProperties).

    Note that you can add additional guide meshes later:
    • To share an existing guide mesh property, select it and the meshes to add, and then select Bifrost > (Add) Guide.
    • To use a new property, select the meshes to add as well as either the main container or shape, and then select the command.
  5. Optionally, adjust Min Simulation Depth. This controls the depth of the high-resolution liquid in world space, and may need to be adjusted depending on the scale to which the scene was modeled.

    You should see a band of liquid at the top surface of the emitters, rather than to the full depth of the emitter.

  6. Play back, and adjust the settings as necessary (see Adjust a Bifröst guided simulation). Use a low resolution at first (high Master Voxel Size), and then increase the resolution once it's working satisfactorily.