Maya 2017 Bifröst Liquid
Wanho Choi
(wanochoi.com)
Bifröst
• It is available in Autodesk Maya 2015 and later.
• Exotic Matter’s Naiad is the predecessor of Bifröst. • Autodesk acquired the Naiad software in 2012.
• A procedural framework
to create simulated liquid and aerodynamic effects using a FLIP (fluid implicit particle) solver.
• Spatially adaptive and auto-resizing FLIP simulation
- SPGrid [Setaluri et al. 2014]
- Generalized octree with five times finer resolution (53 rather than 23)
What is a fluid simulator?
Forces
Black Box
Emitters
Colliders
Div.-free
Velocity Field
Fluid Simulator
Incompressible
Divergence-Free Velocity Field
• Incompressible fluid flow • Conservation of mass
Governing Equations for Inviscid Fluids
• Mass conservation • Momentum conservation
∇ ⋅u = 0
∂u
∂t
= − u⋅∇
(
)
u
−
1
Governing Equations for Inviscid Fluids
• Mass conservation • Momentum conservation
∇ ⋅u = 0
∂u
∂t
= − u⋅∇
(
)
u
−
1
ρ
∇p + f
Governing Equations for Inviscid Fluids
• Mass conservation • Momentum conservation
∇ ⋅u = 0
∂u
∂t
= − u⋅∇
(
)
u
−
1
ρ
∇p + f
pressure projection
∇
2p
=
ρ
∇ ⋅ !u ⇒
u
= !u −
1
• FLIP (Fluid-Implicit Particle)
• Hybrid grid-particle method for numerical fluid simulations
Eulerian approach Lagrangian approach
Good for the pressure projection step of N-S eqns. (structured grid, so seven-point Laplacian matrix)
Good for the advection step of N-S eqns. (no numerical dissipations)
To produce a divergence-free velocity field To advect physical properties in the given velocity field
figures from “A Hybrid Fluid Simulation on the Graphics Processing Unit (by REBECCA LYNN FLANNERY)”
Per Frame Simulation Process
external force step (grid)
pressure projection step (grid)
advection step (particles)
A Quick Looking Around
Turn on “Display Bifrost HUD”.
Anatomy
Node Network
• A Bifröst simulation consists of several object, property, and container nodes that
are connected together. As you edit and refine a simulation, you will need to adjust
attributes in several places. Although you can do most of the work using the Bifröst menu and the Attribute Editor, the Node Editor can be useful for understanding the
Colliders
• Two collider meshes are connected to the main container through separate property
nodes. This allows them to use different settings. You can connect meshes in this way by adding them one at a time using the commands on the Bifröst menu.
Emitters
• Two emitter meshes are connected to the main container through a collider property.
The emitter meshes share the same emitter property. This means that they always use the same settings, and you do not need to adjust the settings on multiple properties.
You can connect meshes in this way by adding them at the same time, or by selecting an existing property first.
Global Guide Properties
• The global guide properties node contains the settings used for guided simulations.
It is automatically created for liquid graphs, but it does not get used unless you set up a guided simulation.
Main Properties
• The main properties node contains most of the settings that control the overall
simulation. This includes the gravity, voxel size, and adaptivity, as well as other
attributes that are specific to either liquid or aero simulations. The main properties node also has controls for reading and writing user cache files.
Main Container
• The main container is the node that gets the property values from its inputs and
performs the simulation. It has some attributes to control how and when the simulation is performed, such as for the start frame and scratch caching.
Shape
• The shape object is the representation of the result of the simulation in a scene. It has
attributes for displaying the results as particles or voxels, as well as many diagnostic options. It also has attributes for activating and controlling how the result is meshed.
Mesh
• The mesh is another representation of the result. In addition to being rendered, it can
be exported as an Alembic or other cache for use in another scene or software. Note that it has no polygons unless you activate meshing on the shape.
Material
Three Different Methods
to Add Two Emitters
Bifröst Simulation Preview
• You can display the values of attribute channels as color ramps, numeric values, or
vectors in the viewport. This lets you analyze or diagnose your simulation.
• Bifröst supports Viewport 2.0 only.
Clipping by Mesh
• Use a polygon object to set the clipping boundaries for the display.
How to disable mesh’s shading
• You can turn off the mesh's shading so it does not block your view of the simulation. • To do this, in the polygon object's shape node, expand the Display attribute group,
If no particles appear in the viewport
There are a few things to check:
• Make sure that the shape is not hidden by the emitters. For example, you can switch
to Wireframe display, or make the emitter into a template (unselectable), or simply hide the emitter.
• Make sure that Renderer is set to Viewport 2.0 in the viewport's menu bar.
• Make sure that the current frame is the start of the simulation that is set on the main
container (by default, frame 1).
• Reduce Master Voxel Size on the main properties, in the case that the emitter objects
Voxel Visualization
• You can display the range of voxel resolutions in your simulation using Tile View. When
enabled, Tile View is superimposed over the simulation in the viewport. Use Tile View to analyze or diagnose your simulation, such as for determining appropriate Master Voxel Size, Adaptivity settings, and other diagnostic purposes.
• In the Tile View group of the Bifröst shape object's attributes, expand Display, and
then turn on Enable.
• Use the slider controls to set the level of detail range for the display. Typically, voxels
display in levels 3 through 7. Level 7 displays the highest resolution voxels in your simulation.
• (Optional) Use a polygon object to set the clipping boundaries for the display. • Use the color ramp to define a gradient for the level range.
master voxel size master voxel size
Scratch Cache
• The scratch cache is a temporary cache to speed up playback and scrubbing. It is
intended for quick previews at low-to-medium resolutions, unlike user caches which are intended for the final, high-resolution result.
• The scratch cache stores the simulated frames in memory, and offloads them to
temporary files on disk. It is automatically flushed and regenerated when you
change the simulation and return to the first frame. It also gets deleted automatically when you close the scene.
• Make sure that Playback speed is set to Play every frame in your Settings > Time
Scratch Cache
• Select Bifrost > Bifrost Options, and make sure that the options are set as you want
them. In particular, make sure that Maximum RAM Usage (GB) is less than your system memory minus some overhead.
• 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.
Colored Bar in Timeline
• Frames that have been computed and cached are displayed in bright green on the timeline when
the main container or shape object is selected. You can quickly replay or scrub through these frames.
• If you change the simulation settings or modify the input objects, the cached frames get marked as
"dirty" and displayed in dark green on the timeline when the main container or shape object is selected.
• You can still play or scrub through any frame except the first frame of the simulation to view the
cached results, but they will not reflect the changes you made.
• When you return to the first frame of the simulation, the cache is flushed automatically. The
Background Processing
• The option for multiple simulations in the same scene
• However, do not create multiple simulations in the same scene to avoid memory and
computational overhead.
• Moreover, they cannot interact each other.
Background Processing
• All frames in the specified range are sent to the Bifröst Computation Server.
• Frames that are in the queue for processing are displayed in yellow on the timeline when the
main container or shape object is selected.
• Frames that have been computed and cached are displayed in bright green on the timeline
when the main container or shape object is selected. You can quickly replay or scrub through these frames.
• When objects from multiple simulations are selected, multiple lines are displayed in the
timeline.
• If Enable Background Processing is off, then you must wait for all frames to be processed
Work with Bifröst User Caches
• The user cache stores the computed Bifröst simulation as files on disk per frame.
• The Bifröst simulation reads the cache files each frame, instead of recomputing the
simulation.
• Cache files are created for each cacheable Bifröst object, which includes liquid,
aero, foam, and solids (for collision objects).
• The user cache is intended for the final, approved simulation, unlike the temporary
Click “Create” or “Apply”.
Preview the simulation.
read mode
How to stop reading from a user cache
• Rewind the simulation to the start frame.
• 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
How to load a Bifröst user cache
• Create an empty simulation. (If you are loading a foam cache, choose Bifrost > (Add)
> Foam to add it to the empty liquid simulation.)
• In the Attribute Editor, click tab for the Bifröst object's main properties node. • In the Caching attribute group, turn on Enable.
• Click the folder icon next to Cache name.
• Navigate to the directory where the cache files are stored, and select any cache file
and click open.
How to append to an existing user cache
• You can extend the frame range of a simulation, then append newly cached frames to
its existing user-cache without having to recache the entire simulation. To append to an existing user cache, Bifröst needs to read at least one previously cached frame before it can accurately simulate the extended frame range.
- Select the container for the simulation that you want to cache. - Select Bifrost > Compute and Cache to Disk > ◻.
- Set Write Mode to Read/Write.
- Make sure that other settings are as desired. - Click Create.
• Bifröst reads the existing cached frames, then computes and saves the extended
Caching attributes
• Enable allows Bifröst to use the user cache files. Normally, this gets set automatically when you generate a user
cache, but you can activate it manually if you want to load a cache into an empty simulation. See Load a Bifröst user cache.
• Cache Control sets the caching action that will be performed on the Bifröst object when Enable is on.
- 0: Recomputes the simulation.
- 1: Reads cached frames. This is the default setting when cache files exist. - 2: Creates user files for each frame. Existing cache files get overwritten.
- 3: Reads existing cached frames, while creating files for uncached frames based on the previously cached frames.
• Compression Quality set to 0 for the least amount of compression, 1 for more compression, or 2 for lossy
compression.
• Cache Directory is the location of the user cache files.
• Cache Name is the directory containing the object's cache files. The default cache name is the name of the main
bifrostLiquidContainer or bifrostAeroContainer node. Cache file names consist of the <Bifröst object> appended by -volume for voxelized objects and -particle or -flipParticles for particles.
Note
• 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.
• It is best to disable the scratch cache to avoid excessive memory use and disk access. If both the user
cache and scratch cache are enabled at the same time, the user cache gets written or read from disk, and in addition the scratch cache keeps those frames in memory until the memory limit is exceeded, at which point the scratch cache also gets offloaded to temporary files. To disable the scratch cache if it is in use:
• 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.
• When reading a Liquid Cache or Aero Cache, do not turn off Enable in the Solid Cache group. This causes
Bifröst to re-simulate frames even though a cache exists.
• Note that, to read or write cache files for the mesh, meshing must be enabled in the Bifröst shape's
Export a Bifröst mesh as an Alembic file
• You can export a bifrostMesh object as an Alembic file in the same way as any other mesh.
• To export channels like velocity as color sets, make sure that Write Color Sets is selected in the Advanced Options section of the Alembic Export window. The exported channels are:
- bifrostVelocity
- bifrostVorticity (liquid only)
- bifrostCurvature (liquid only, if enabled in the main property's Optional Channels attribute group)
- bifrostChurn (liquid only, if enabled in the main property's Optional Channels attribute group) • Note that the velocity color set values are in units per second — if you use a custom shading
Import a Bifröst mesh from an Alembic file
• You can import a Bifröst mesh in the same way as any other Alembic file. • For motion blur, make sure that:
• Motion Vector Color Set is set to bifrostVelocity in the Mesh Controls attribute group
of the shape node.
• Depending on your renderer, make sure that it is set up to use vertex color sets. • Make sure that motion blur is enabled for your renderer.
Scene Scale
• The attributes of Bifröst are related to your scene’s scale, but Bifröst does not consider
the value of Linear in the Working Units group of your Settings preferences.
• Bifröst assumes 1 grid unit is equal to 1m when Linear Working Units is set to the
default value of centimeter. (The length of 1 grid unit depends on the Linear Working Units.)
Scene Scale Dependent Parameters
• Some of these values should be adjusted if your scene is modeled to a scale other
than 1cm = 1m when Linear Working Units is set to the default value of centimeter.
1 unit (1 cm) = 1 m
(default) 1 unit (1 cm) = 1 cm
Gravity Magnitude 9.8 m/s2 980.0 cm/s2
Voxel Size
• The voxel size is the main control for the resolution of a Bifröst simulation.
- Larger voxel size: lower detail / accuracy
- Smaller voxel size: higher detail / accuracy
• The main setting for voxel size is Master Voxel Size in the Resolution attribute group
of the main properties. The Master Voxel Size in the main properties is the principal setting for controlling detail, and it also has a major effect on accuracy.
• This determines the voxel size used for the fluid simulation itself. It is also the base
size used to voxelize the meshes that are used in a simulation, including emitters,
Extra Controls for Voxel Size
• In addition, there are extra controls for the size at which the meshes used in a
simulation are voxelized. You can further adjust the voxel size for emission, collision, acceleration, and guides relative to the Master Voxel Size.
• Every mesh property, such as an emitter or collider property, has a Voxel Scale
attribute in its Conversion group which affects how the associated meshes are initially voxelized.
• Liquid simulations also have additional global controls for the size at which the
voxelized meshes are combined: the global Voxel Scale attributes for colliders and other meshes are on the main liquid container. Emitters have no global scale attribute.
Voxel Size Controls
Master Voxel Size
Voxel Scale
Voxel Scale
Voxel Scale
Two Steps of Voxelization
• Meshes are initially converted to voxels at a size equal to (mesh Voxel Scale)×(global
Voxel Scale)×(Master Voxel Size). Thickness is also applied using this size. Emitters
simply use (mesh Voxel Scale)×(Master Voxel Size).
• After the initial voxelization, objects of the same type are combined at a voxel size
equal to (global Voxel Scale)×(Master Voxel Size). Emitters simply use the Master Voxel Size.
For example,
• If you do not need detail on any collider, you can set the global Collision Voxel Scale
to a value greater than 1.0 to save both time and memory. On the other hand if you do not need detail on specific colliders, you can set Voxel Scale to a value greater than 1.0 in the corresponding collider properties — this will not save memory in the end
because the colliders will be combined at a smaller voxel size, but it might save time voxelizing large meshes with little detail.
• In particular, if you set Voxel Scale in a collider property to a value less than 1.0 for
more detail on a specific mesh, some of that detail may be lost when the colliders are combined at a larger voxel size. If you require high detail on specific meshes, you
should use a global Voxel Scale less than 1.0, and a Voxel Scale greater than 1.0 in the mesh properties of the other meshes.
Note on Voxel Size
• The voxel size should be smaller than the smallest feature of the simulation. For
example, if you want liquid to drain through a 0.2 unit hole in a collider, then Master Voxel Size should be 0.1 or smaller.
• Note that when you change Master Voxel Size, you may also need to adjust the time
adaptivity settings. 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. 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.
Summary on Master Voxel Size
• MVS = the cell size of the lowest sub-grid when 1 unit = 1cm
• MVS is the principal parameter for controlling detail and accuracy.
• But, every mesh property has a voxel scale factor. (collider, emitter, etc.) • Mater Voxel Size ↑ ⇒ accuracy↓ & computing time↓
• Mater Voxel Size ↓ ⇒ accuracy↑ & computing time↑ • At first, begin with as large a value as possible.
• But, MVS should be smaller than the smallest feature of the simulation. • And, use a gradually larger value.
Spatially Adaptive Bifröst Liquid Simulation
• High resolution is used near the surface and in other regions where detail is
needed, and lower resolution is used elsewhere. This can save both memory and
computation time compared to using high resolution everywhere.
• The Enable option in the Adaptivity > Spatial attribute group of the main simulation
properties is a global switch that turns spatial adaptivity on and off.
• The Refine Nearby Fluids option in the Collision > Adaptivity attribute group of each
collider property controls whether the liquid around the associated meshes is simulated at high resolution.
No Adaptivity
• In this case, spatial adaptivity has been turned off so that high resolution is used
everywhere. The extra particles at the surface are the result of the Surface Particle
Density setting in the Emission > Particle Distribution attribute group of the main
Interior Adaptivity
• Spatial adaptivity has been enabled, and Refine Nearby Fluids is on for both
colliders. High resolution is used near the colliders and at the surface, but interior regions that are farther from a collider use low resolution.
Deep Adaptivity
• Refine Nearby Fluids is off for the basin, and on for the sphere. High resolution is
used only near the surface and around the sphere. The deep regions use low resolution, even near the walls of the basin.
Common Time Step Size Problems
choppy acceleration leakage
Per Frame Simulation Process
voxelization pressure projection particle advection level-set re-initializationTwo Types of Controls
• Transport: Sub-time steps for the particle advection per frame
• Time Stepping: Sub-time steps for the whole simulation per frame
voxelization pressure projection particle advection level-set re-initialization voxelization pressure projection particle advection level-set re-initialization
Combination
• Each frame might contain multiple time steps depending on the Time Stepping
settings.
• Each time step might contain multiple transport steps depending on the Transport
settings. voxelization pressure projection particle advection level-set re-initialization
Transport vs Time Stepping
• Transport is often a good choice to try adjusting these settings first if you are
experiencing problems such as particles passing through static colliders, because they might solve the problem without much extra computation time. However, the
pressure is not recalculated and the colliders and other solids are not revoxelized
each iteration — this means that the Transport settings probably won't help with fast-moving colliders and other, more complicated, situations.
• Time Stepping settings control the number of iterations of the whole simulation per
frame, including the voxelization, pressure, and transport phases. These settings can greatly increase the accuracy, especially with high velocities, but can also result in
Time Step Size Effect on Advection
low accuracy
light computation
high accuracy
Adaptivity Value
• It controls whether additional sub-steps are triggered.
• A different number of iterations may be performed per frame, depending on how far
and how fast the particles are moving in that frame.
• The values are on a non-linear scale.
- 0.00: Particles can move an unlimited distance without triggering further substeps. - 0.10: Particles can move up to 10 voxel lengths before triggering further substeps. - 0.32: Particles can move about 5 voxel lengths before triggering further substeps. - 0.50: Particles can move up to 1.0 voxel length before triggering further substeps.
- 0.75: Particles can move about 0.5 voxel lengths before triggering further substeps. - 1.00: Particles can move up to 0.001 voxel lengths before triggering further
Transport Time Scale (Transport only)
• Changes the speed of the particle flow.
• Values greater than 1.0 speed up the flow without introducing any new velocities or
accelerations, while values between 0.0 and 1.0 slow it down.
• The result is not physically correct, but it can be useful if you just want to quickly
retime a simulation.
• Be careful because it may introduce unwanted side-effects, especially at extreme
Note
• More iterations can result in greater accuracy, at the cost of longer computations.
• You can try adjusting these settings if you experience problems such as volume loss, particle
bunching, spontaneous bursts, and leaks through colliders.
• When you are adjusting settings, be careful not to increase Adaptivity too much at once,
particularly for values close to 1.0. Doing so may cause unnecessarily long computations.
• Also note that distances are measured in voxel lengths. This means that a lower Master Voxel
Size might trigger extra iterations for particles at a given velocity.
• No more than Max Steps iterations are ever performed per frame. This provides a limit on the total
amount of computation performed. However, particles will always move the entire distance that is required by their velocity and the frame length. This means that particles might not always obey the limit set by Adaptivity. For example, if Adaptivity is set to 0.5 but Max Steps is very low, then
fast particles may not be able to cover the entire distance in steps of 1 voxel length — in this case, each step will be longer than 1 voxel length in order to move the whole distance.
Controls
Enable: Enables evaluation of the entire container node.
Enable: Enables liquid emission from the associated emitters.
Continuous Emission: Refills voxels that become empty with more particles. Keep this
on for liquid sources like spouts and jets, or turn it off for a pool or single drop of liquid.
Mode: Controls how the object is voxelized.
Offset Surface Distance: The distance in voxel widths for Solid (Robust) mode. Thickness Units: Whether Thickness is in Voxels or World Space units.
Thickness: The amount to thicken the mesh.
Voxel Scale: Scaling factor for the Master Voxel Size used to initially voxelize meshes. Enable Boundary: Activates the boundary controls.
Boundary Shape: Selects the shape of the boundary volume. (Box/Sphere) Invert: Restricts the effect of the mesh to the exterior instead of the interior. Density: The physical density of the fluid, by default in kg/m3. (water: 1000)
Expansion Rate: Expands or contracts the liquid within the emitter.
Strength: The amount that the fluid from this emitter adheres to nearby colliders. Bandwidth: How close the fluid from this emitter needs to be to a collider for the
stickiness to affect it, in world-space units.
Projection: Defines UV coordinates that get advected with the particles. Select a
Conversion Mode
• Solid creates a solid volume including the mesh interior. The mesh should be both
manifold and watertight.
• Shell create a thin shell around the mesh surface. In this mode, Thickness should
typically be 1.0 or more.
• Solid (Robust) is an alternative to Solid that usually gives better results for volumes
with fine detail, openings leading to cavities, or non-watertight surfaces. However, it does not handle fluids inside completely enclosed regions.
- Offset Surface Distance: The distance in voxel widths used to close (dilate and
then erode) the solid voxels when Mode is Solid (Robust). The internal minimum is 1.0 so only values greater than that have an effect. High values can create artifacts.
Boundary Controls
• Boundary controls are available for the various meshes involved in a Bifröst simulation,
including emitters, colliders, and others.
• These let you limit the effect of the mesh to the intersection of the mesh and an
implicit volume. For example, you can make a mesh emit only when it is inside the volume of a box or sphere.
Paint Bifröst Attributes
• You can paint certain Bifröst attributes using color sets on emitter objects. This lets
you vary attributes like density or influence across the mesh surface.
• The vertex color map's values range from 0.0 (black) to 1.0 (white) and act as a
multiplier for the corresponding value set in the Attribute Editor. If you have not
painted any map, the default map value is 1.0 so the full value set in the Attribute Editor is used.
• To paint parameters, 1) select an emitter mesh, 2) right-click in the viewport and select
a map from the Bifrost menu, and 3) use the Paint Vertex Color Tool to paint values.
• Tip: Paint map values on a different frame than the first frame of the simulation. On the
Controls
Enable: Same as Emitter. Enable: Same as Emitter. Mode: Same as Emitter.
Coarsen Interior: Saves memory by performing additional coarsening of the voxels
inside the volume when Mode is Solid (Robust), especially with self-intersecting meshes.
Offset Surface Distance: The distance in voxel widths used to close (dilate and then
erode) the solid voxels when Mode is Solid (Robust). The internal minimum is 1.0 so only values greater than that have an effect. High values can create artifacts.
Thickness Units: Same as Emitter. Thickness: Same as Emitter.
Voxel Scale: Same as Emitter.
Enable Boundary: Same as Emitter. Boundary Shape: Same as Emitter. Invert: Same as Emitter.
Refine Nearby Fluids: Prevents the fluid resolution from being coarsened in regions
that are close to the collider when spatial adaptivity is enabled on the liquid properties node. Turn this option off for colliders where less detail is needed, for example, on the bottom and sides of pools, and turn it on for colliders where you want full detail. This does not affect the free surface (air boundary), which always uses full resolution.
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.
Accelerator
• Accelerators can be used to move fluid around in a Bifröst simulation, for example, to
create a jet of water for a fountain or a fan blowing smoke.
• The particles' velocity is affected as long as they are within the influence of an
accelerator object.
• The Bifröst acceleratorProps attributes control the acceleration properties of the mesh
objects that share this property.
• They may be found in scenes created with older versions, but for more control over
Control Velocity with Bifröst Motion Fields
• Use motion fields to influence the velocities of liquid, foam, and aero particles. The
Quick Tips
• General damping: To generally slow down an overactive simulation, use a bit of Drag and nothing else.
• Simple wind: Use a combination of Direction and Drag. Optionally add a bit of Turbulence, and maybe even some Noise.
• Chaotic churning: Apply a small amount of Noise to start with some random motion. Use Clamp Speed to keep the fluid churning: set Max Speed fairly high, and then animate Min Speed to increase from 0.0 to the desired value.
• Whirlpool: Activate Enable Boundary and set Boundary Shape to Cylinder with a non-zero Boundary Falloff. Make sure that Direction Magnitude is 0.0, and adjust Around Axis. Add a bit of Drag if the velocities become too extreme.
• Sculpt a wave: To create a wave that forms spontaneously and then breaks, set up a cylindrical field in a similar way as for a whirlpool. Rotate it onto its side so that it intersects a portion of the liquid surface, and animate it moving forward. It might be helpful to add a bit of Direction to help the fluid move forward and against gravity, as well as a bit of negative Away From Axis to keep the liquid from flying away.
• Break up falling water: To help break up a waterfall or similar flow into droplets, use Drag and Normal Drag with a low Max Depth. For spray, add foam to the simulation, and apply a separate field with Drag and Turbulence directly to the foam.
• Follow a mesh: To make fluid follow a mesh, connect the mesh and use a negative Along Normal value to pull liquid toward the surface. It can help to use Drag, Friction, or a combination. When trying to make liquid flow upward, it can also be useful to decrease Gravity Magnitude, or even set it to 0.0. To track the mesh volume, you can turn off Enable Falloff if you want to attract fluid from far away. On the other hand, to make fluid flow along and cover the mesh surface, leave Enable Falloff on, adjust Max Distance to a value a bit larger than the desired thickness of fluid, and optionally make the mesh a collider as well. In either case, Inherit Velocity is useful if the mesh is animated. You can also use
additional motion fields to help guide and shape the flow. For example, you can use a motion field with an implicit shape and a negative Away From Axis or Concentric value to pull liquid toward the mesh.
Liquid Surface Guide Simulation
• You can guide a Bifröst liquid simulation using either a polygon mesh or a cached,
lower-resolution simulation.
• This allows you to perform a detailed, high-resolution simulation that is restricted to the
top surface layer to reduce memory and computation time. These techniques are appropriate for oceans and similar situations.
• Using a planar mesh with an animated deformation provides artistic control over the
basic motion, while the simulation adds high-resolution details like splashes and breaking waves.
• Using a cached, low-resolution simulation provides correct hydrodynamic motion
throughout the body of liquid, while high-resolution details are computed only for the top layer.
Liquid Surface Guide Simulation
• You can use a deforming plane or other flat mesh to guide the surface of a Bifröst
liquid simulation, while restricting the simulation to one or more specific regions.
• This lets you define a large ocean area with a mesh and emit particles in a smaller
region, for example, if you want to simulate waves around a static rock or a moving
ship.
• The deforming mesh lets you direct the waves artistically, while the simulation provides
splashes and other fine details. Only the top layer of the liquid surface inside and around the defined emission regions is simulated, allowing for higher resolution settings with less memory and computation time.
Liquid Surface Guide Simulation
Bifrost > (Create) Liquid (empty sim)
Liquid Surface Guide Simulation
Import a mesh
Bifrost > (Create) Liquid (empty sim)
Liquid Surface Guide Simulation
Bifrost > (Add) Guide Import a mesh
Bifrost > (Create) Liquid (empty sim)
Liquid Surface Guide Simulation
Bifrost > (Add) Guide
Bifrost > (Add) Collider
Import a mesh
Bifrost > (Create) Liquid (empty sim)
Liquid Surface Guide Simulation
Bifrost > (Add) Guide
Bifrost > (Add) Collider
Bifrost > (Add) Emission Region Import a mesh
Bifrost > (Create) Liquid (empty sim)
Controls: guidePropertiesContainer
Mode
Simulation Enables a liquid simulation to be guided by a cached, low-resolution
simulation. Use Sim Cache Directory and Sim Cache Name to specify the cache files.
Mesh Enables a liquid simulation to be guided by animated and deformed polygon
meshes in the scene.
Sim Cache Directory The directory containing the cache files to use as a guide. Sim Cache Name The base file name of the liquid voxel cache files.
Controls: guidePropertiesContainer
Compute Guide from High Res Liquid
Computes a final guiding shape that takes the high-resolution liquid into account. This allows colliders to fall into the liquid and penetrate quite deeply without the need to
increase Min Simulation Depth (which would affect the number of particles and voxels required across the whole simulation).
You can try turning this off if you experience problems, for example, if the simulation does not hold its shape in certain situations. You can also turn this off to speed up
computations, but this can result in holes at the main liquid surface if the simulation is very splashy.
Guide Voxel Scale A scaling factor for the Master Voxel Size that is used to voxelize
the guide shapes. It also affects the size used to voxelize colliders — use Collision Scale for additional control over the voxel resolution of colliders.
Min Simulation Depth The depth to simulate, below the top liquid surface in scene
units. You may need to change this depending on the scale to which the scene was modeled.
Surface Layer The height of the simulated layer on top of the guide surface, in scene
units. This can be useful for surface splashes. There is a falloff from the full height at the center of the emission region to 0 at its boundary.
Controls: guidePropertiesContainer
Particle Reseed
Adds particles to prevent air pockets developing between the guided liquid and the guiding shapes.
Particle Density Controls the number of particles to add per voxel in air pockets. The
particle count per voxel is the cube of this value. For example, specifying 2 results in 8 particles per voxel (23 = 8). Do not use a value less than 1.0.
Guide Overlap, Liquid Overlap Multiples of the Master Voxel Size that determine how
deeply into the guiding shape and liquid shape to reseed. You can try increasing this value if you experience volume loss, or explosive bursts (which can be caused by
liquid rushing in to fill air pockets). However, values that are too high can also cause
artifacts in the motion, because the reseeded particles inherit velocity from the guiding shape.
Interface Distance A minimum distance in scene units from the air-liquid boundary,
Controls: guideMeshProps
Voxel Scale Scaling factor for the Master Voxel Size used to initially voxelize meshes
that share this property.
Boundary Controls Limits the effect of the associated mesh objects to their
intersection with an implicit shape. Boundary controls are available for the various
meshes involved in a Bifröst simulation, including emitters, colliders, and others. These let you limit the effect of the mesh to the intersection of the mesh and an implicit
volume. For example, you can make a mesh emit only when it is inside the volume of a box or sphere.
Enable Boundary Activates the boundary controls.
Boundary Shape Selects the shape of the boundary volume.
Invert Restricts the effect of the mesh to the exterior instead of the interior of the
Controls: emissionregionProps
Conversion Controls how the object's volume is voxelized.
Mode Controls how the object is voxelized:
Solid creates a solid volume including the mesh interior. The mesh should be both
manifold and watertight.
Shell create a thin shell around the mesh surface. In this mode, Thickness should
typically be 1.0 or more.
Solid (Robust) is an alternative to Solid that usually gives better results for volumes
with fine detail, openings leading to cavities, or non-watertight surfaces. However, it does not handle fluids inside completely enclosed regions.
Thickness Units Whether Thickness is in Voxels or World Space units. When set to
Voxels, the effective thickness depends on the Master Voxel Size of the simulation.
Thickness The amount to thicken the mesh. For solid shapes that are already quite
thick, you can use 0.0 for a precise boundary or even negative values to shrink along the surface normals. For thinner volumes and shells, you should use larger values to prevent holes. Note that thickness will round off sharp corners.
Voxel Scale Scaling factor for the Master Voxel Size used to initially voxelize meshes
Controls: emissionregionProps
Boundary Controls Limits the effect of the associated mesh objects to their
intersection with an implicit shape. See Limit the volume of a mesh's effect using boundary controls.
Enable Boundary Activates the boundary controls.
Boundary Shape Selects the shape of the boundary volume.
Invert Restricts the effect of the mesh to the exterior instead of the interior of the
Controls: emissionregionProps
Continuous Emission Refills voxels that become empty with more particles. Keep this
on for liquid sources like spouts and jets, or turn it off for a pool or single drop of liquid.
Death Age Length of time in seconds that a particle can be outside its emission region
before it is deleted.
Blend With Guide The blend weight of the input velocities from the guide. This helps to
provide a smooth transition from the simulation to the guide.
At 1.0, the particle positions at the boundary of the emission region depend only on the guiding velocities, with a linear blend to the velocities from the simulation in the interior of the region. At 0.0, the velocities from the simulation are used throughout the entire region.
Controls: emissionregionProps
Density The physical density of the fluid, by default in kg/m3. A value of 1000
corresponds to the density of water, assuming that 1 grid unit = 1 meter when Maya's Linear working unit is left at the default value of 1 cm. Changing this value will not have an effect on the simulation unless other options such as Viscosity or Surface Tension are enabled, or unless different emitters use different densities.
Note: Density does not affect the rate at which particles are emitted.
Expansion Rate Expands or contracts the liquid within the emitter. Positive values push
particles out of the emitter in all directions, while negative values pull particles in, and a value of 0.0 neither pushes nor pulls.
For example, to fill a container from the bottom, you can use a positive Expansion Rate to push particles out of the emitter, in combination with Continuous Emission to refill the emitter as it empties.
Mathematically, this value defines the divergence that Bifröst tries to maintain in each voxel of the emitter's velocity field. A value of 0.0 corresponds to an incompressible fluid.
Strength The amount that the fluid from this emitter adheres to nearby colliders. Bandwidth How close the fluid from this emitter needs to be to a collider for the
Guide with Low-Resolution Simulation
• You can use the top surface layer of a low-resolution liquid simulation to guide a
high-resolution simulation. This gives a detailed simulation of the surface, with
breaking waves and so on, without the need to perform a high-resolution simulation to the full depth of the liquid. You can preview the bulk movement of liquid at low
resolution, and when you are satisfied, use it to guide a high-resolution simulation for finer details.
Guide with Low-Resolution Simulation
• It is best to start a new scene, using the same or similar emitters and colliders to set up a basic low-resolution simulation. This
approach avoids the memory and computational overhead of having two simulations in the same scene, and also allows you to regenerate the low-resolution cache from the original scene if needed. However, it is possible to reuse the same scene or even the same simulation if you prefer. In this case, be careful not to overwrite the cache files.
• In the global guide properties, activate Enable in the Guided Simulation attribute group. • In the Input subgroup, activate Simulation mode.
• Click the folder icon next to Sim Cache Name, then browse to the directory where the low-resolution cache is stored and select
any one of the voxel_liquid_particle cache files.
• Optionally, adjust Min Simulation Depth. This controls the depth of the liquid that gets simulated 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.
• Optionally, you can restrict the simulation to the region defined by a mesh's volume. To do this, select the mesh and either the
main liquid container or shape, and then select Bifrost > (Add) Emission Region.
• Play back, and adjust the settings as necessary. Use a low resolution at first (high Master Voxel Size), and then increase the
Note
• If the guide mesh has a color set named bifrostVelocity, it will be used as the guiding
velocity input. If it does not, the velocity is calculated from the deforming point positions, so in these cases the mesh topology should not change.
• For best results, the "waves" in the guide mesh should move in a manner that's not
too different from real waves. If the waves are extremely fast, slow, or big, then the simulation may have artifacts or produce other unexpected results.
• For realistic ocean waves, the motion should be horizontal as well as vertical.
• The animation should last as long as the number of frames that you want to
Note
• You can use a collider mesh as an emission region, or you can use a separate mesh to
define a volume.
• If you are using a collider mesh, then set Thickness in the mesh's emission region properties
so that there is a band of liquid around the solid shape (because particles won't be emitted inside a collider).
• If you are using a separate mesh, it should contain the volume below the guide to at least the
depth that you want to simulate (that is, to at least Min Simulation Depth in the global guide
properties). It should also contain sufficient space for splashes above the guide.
• The emission regions can be animated and deforming — as the regions move, new particles
are seeded in formerly empty areas, and particles outside the regions die after the time specified by Death Age in the emission region properties.
Note
• Min Simulation Depth in the global guide properties controls the depth of the liquid in
world space, and may need to be adjusted depending on the scale to which the
scene was modeled. Alternatively if you just want surface splashes with no depth, you can set Min Simulation Depth to 0.0 and use Surface Layer to control the height of a
thin band of liquid on top of the surface. You can also use both.
• Use Blend with Guide on the guide mesh properties to control the blend from the
simulated velocities at the center of the emission region to the input guide velocities at the boundary of the region. This helps to provide a smooth transition from the
simulation to the guide mesh.
• For best results in general, make sure that all particle density settings are equal.
This includes Particle Density in the Particle Reseed group of the global guide
properties, as well as Interior Particle Density and Surface Particle Density in the Emission group of the liquid properties.
Note
• If the simulation does not hold its shape, you can try turning off Compute Guide from High Res Liquid in
the global guide properties.
• If the simulation seems "overactive", for example, if there are explosive bursts, then there may be an issue
with air pockets developing between the liquid and guides. One way to try to address this is to reduce
Interface Distance. However, this value should always be greater than or equal to 1.5 times the Master Voxel Size to avoid noise at the surface.
• Another way to try to eliminate air pockets is to increase Guide Overlap and Liquid Overlap. However,
increasing these values too much can also cause problems.
• You may need to use additional influences to tone down an overly energetic simulation. For example, this
may be the case especially when using a polygon mesh as a guide, if the mesh's "waves" move in a way
that's very different from real waves. For example, if the guiding mesh changes shape too quickly then it may impart extreme accelerations, which in turn cause the simulation to overshoot — in this case, try damping
the velocity with a motion field.
• To improve wakes behind boats, try increasing Min Simulation Depth in the global guide properties. Larger
Bifröst Droplets
• Droplets are particles that break away from the main body of liquid in a Bifröst simulation.
• Particles of which threshold is over the criteria get converted to droplets.
• If the droplet "score" of a particle (based on the number of surrounding particles)
exceeds this value, then the particle becomes a droplet.
• Droplets are simulated ballistically (using the basic equations of motion) and are not
considered in the fluid dynamics computations.
• This can break up fluid-like structures that develop in the simulation, such as sheets and
tendrils, to give a more spray-like effect.
• You can reduce problems like bumps and dimples in the liquid surface caused by
Droplet Controls
• Threshold is a value at which particles get converted to droplets. If the droplet "score"
of a particle (based on the number of surrounding particles) exceeds this value, then the particle becomes a droplet. Droplets are simulated ballistically (using the basic
equations of motion) and are not considered in the fluid dynamics computations. This can break up fluid-like structures that develop in the simulation, such as sheets and
tendrils, to give a more spray-like effect. Lower this threshold to create more droplets, and break up sheets and tendrils more quickly. To prevent the creation of any droplets at all, set the threshold to 1.0 or higher.
• Mergeback Depth is the depth (in voxel widths) within the liquid surface that a droplet
must reach before it rejoins the main liquid body and takes part in the fluid dynamics computations. This can reduce problems like bumps and dimples in the liquid surface caused by particles rejoining the main body too soon.
Meshing with Droplet Radius
• In addition, you can control how particles that have separated from the main body (not
just particles that have exceeded the droplet threshold) get meshed using Droplet
Meshing with Droplet Radius
Bifröst foam
• Secondary particles generated from the primary simulation.
• Foam particles emit continuously into liquids with an initial density value that
dissipates after emission. Foam particle density and rate of dissipation depend on
particles' proximity to the liquid surface.
- At the surface (foam), particles have a density of 1 and dissipate based on the set Dissipation Rate.
- Below the surface (bubbles), particles have a density of 1 plus the Max Liquid Depth value, inherit the set Buoyancy value, and do not dissipate.
- Above the surface (spray), particles have a density of less than 1 and dissipate faster than the set Dissipation Rate.
Work with Bifröst foam
• You can also generate foam if you emit liquid into an existing liquid with a different
density, such as in the case of a hot-tub liquid effect.
• Before adding foam, you can visualize where in the liquid foam will emit by
displaying churn and curvature as color channels. To do this, enable Churn and Curvature in the Optional Channels section of the bifrostLiquidProperties node
attributes. Once enabled, these channels are selectable for display in the Color Channel. Bifröst must re-simulate the liquid to generate data for the Churn and Curvature channels.
• To increase viewport interactivity and decrease simulation time, create a user cache of
your liquid simulation before adding foam.