Optimize a Bifröst simulation for accuracy versus memory and computation speed

The main goal of any fluid simulation is to produce a good-looking result as quickly as possible. This means that it is important to understand the various options for controlling the balance of accuracy and detail versus memory size and computation time.

Resolution, accuracy, and particle speed

The Master Voxel Size in the main properties is the principal setting for controlling detail, and it also has a major effect on accuracy. You typically use a high value for quick but less detailed previews while you adjust the simulation, and then use a smaller value for a more detailed but slower result when you are satisfied with the general effect. For more details, see Bifrost Resolution attributes.

At a given Master Voxel Size, the Transport and Time Stepping attributes can increase the accuracy of a simulation by performing extra computations when required. For details, see Bifröst Adaptivity attributes.

A good combination of Master Voxel Size and Adaptivity settings depends on the speed of particles relative to the scale to which the scene was modeled. For example, if particles' speeds are so high that they move from one side of a collider to the other in a single time step, then it appears as if no collision has taken place. Similarly, if they penetrate a collider too deeply, then they may get moved to the wrong side. To help diagnose issues, you can get an idea of particles' speeds by displaying the velocity channel as a color ramp, vector, or numeric values as described in Preview a Bifröst simulation.

For extremely small scales, such as a simulation of a single drop, you might also need to increase the frame rate of the scene because of the very high velocities relative to the small distances and short time scales.

Leaks through colliders

If you experience leaks through colliders, the first thing to check is that the colliders are thick enough. In particular, if a collider has no thickness of its own, as in the case of a deformed plane used as a ground surface, make sure that Conversion Mode is set to Shell in the corresponding collider property, and that Thickness is 1.0 or higher.

If you still experience leaks, then try increasing the Transport Step Adaptivity. If that doesn't work, you may need to adjust a combination of the Time Stepping attributes and the Master Voxel Size.

Other optimizations

There are some other settings and features that can have an effect on accuracy and computation cost, depending on the type of simulation.

For any simulation, you can scale the size used to voxelize meshes, such as emitters, colliders, and accelerators, in the corresponding mesh property. See Control the voxel resolution of a Bifröst simulation.

For liquid simulations:
  • You can control the global resolution of colliders, accelerators, and other objects relative to the Master Voxel Size by setting the corresponding Voxel Scale in the main container's attributes. See Control the voxel resolution of a Bifröst simulation.
  • By default, fewer particles are used in the interior of a liquid where detail is not needed, and more particles are used at the surface, which is what gets rendered or meshed. If desired, you can further control the density of particles and the depth of the surface layer. See Bifrost Emission attributes (liquid only).
  • You can use droplets in situations involving splashes. See Work with Bifröst droplets.
  • If you are simulating a liquid's surface, for example, for a shot of an ocean, consider using a guided simulation. By using a polygon mesh or a low-resolution simulation as a guide, you can reduce both the volume of space and the number of particles that require computation. See Guide a Bifröst simulation of a liquid surface.
For aero simulations: