Skip to content

Domain World Settings

Ryan Guy edited this page Mar 27, 2024 · 44 revisions

This page documents the domain settings for the FLIP Fluid World panel. The World panel contains parameters that define the physical 'world' that the liquid lives in as well as properties of the liquid that affect it's behavior. All parameters in this panel must be set before baking for changes in the simulation to take effect.

image

World Size

These parameters control the physical size of the domain that the liquid is simulated in. This is an important factor for accurate fluid motion and speed as liquid will be animated differently if simulated in a small glass versus a large swimming pool.

image

World Scaling Mode Which mode to use when setting the physical size of the domain. You can switch seamlessly between modes. When you update the world scale in one mode, the other mode will be automatically updated to be equivalent.
Relative
    Set the physical size of the domain relative to the size of a Blender Unit in meters. If set to 1.0, this will mean that 1 Blender unit will be equivalent to 1.0 meters in the simulation.
Absolute
    Set the physical size of the domain by specifying the size of the longest side of the domain in meters. If set to 12.0, the longest side of the domain will be equivalent to 12.0 meters long in the simulation.

The importance of scale

The simulation world size is an important factor for realistic and predictable results in simulation. The world size tells the simulator how large the physical domain space should be. Setting an appropriate scale will ensure that your fluid moves at realistic speeds and can make the difference between simulating a small mug of coffee and a large section of a beach.

Another important factor is to ensure that animated objects that interact with the fluid are also moving at realistic speeds. Be aware that changing the world size will also affect the calculated speeds of your objects. Use the FLIP Fluids Sidebar > Measure Object Speed Tool to measure the speed of your moving objects within the simulation.

How to use Relative and Absolute world scaling in your workflow

The world scaling UI has been designed so that you can switch seamlessly between Relative and Absolute mode. The UI will also display the exact X, Y, and Z dimensions of your domain in meters so that you can confirm the physical size of your domain.

Use Absolute mode to first set a known physical size for your domain and then switch to Relative mode for the rest of your simulation setup. By switching to Relative Mode, the scale will be consistent whenever you change the size of your domain.

Here is an example workflow. Let's say you have a boat model in your scene and that it is not modeled to the scale of 1 Blender Unit = 1 meter, but you know the boat should be 36 meters long in real life. Here's how you can use Absolute and Relative scaling in your workflow:

  1. Create a domain and size the length of your domain to match the length of the boat model
  2. Using Absolute mode, set the domain length to 36 meters
  3. Switch to Relative mode and expand the domain to the size of your liking

Now that you have set the Absolute scale and switched to Relative scale, the domain will always have a consistent scale when resizing your domain where your boat is always simulated as 36.0 meters long. So easy!

When not to alter the world scaling option

The world scale should not be altered from the default if the fluid will react to other Blender simulation systems such as the rigid body simulator. In this case, the simulation should be modeled to scale where 1 Blender Unit = 1 Meter. This is so that the FLIP Fluids simulation will have the same simulation scale as the other Blender simulation systems. Keep in mind that the frame rate in all systems will need to be the same so that timing is also consistent.

Tips on simulating small world sizes

The FLIP simulation method excels at simulating large splashy bodies of water and the default settings are set up nicely for these types of large scale scenarios. For small world sizes that are roughly less than 0.5 meters, you may need to adjust some settings to achieve better results. Here are some tips on how to improve setups when using small world scales:

  • The FLIP simulation method is naturally chaotic and splashy, which may not be ideal for small fluids. Increasing the PIC/FLIP Ratio in the Advanced Settings Panel will help calm down your fluids to look more realistic at small scales.
  • Smaller world scales can often take longer to to compute. This is because computation time can be proportional to how quickly the fluid moves through the domain. Smaller scale fluids will move more quickly through the domain compared to large scale fluid. When fluid is moving quickly, the simulator will need to process extra substeps per frame in order to keep the simulation stable and accurate. See this documentation topic int he FLIP Fluid Advanced panel for a more in depth explanation on substeps: What are substeps, and how do the min, max, and CFL parameters relate to each other?.
  • Small scale fluid effects are often animated in slow motion. At real-time speeds, small fluid effects will often move a large distance between frames which can result in a loss of visual detail for the viewer. Simulating in slow motion can help show the beautiful motion of your simulated fluid. Another benefit of slow motion fluid simulations is that they can be quicker to process due to less motion between frames resulting in a lower number of substeps (see above tip). The speed of the simulation can be adjusted using the Time Scale in the FLIP Fluid Simulation panel.
  • As simulation scales become smaller, simulating surface tension forces become more important for realism. See the surface tension documentation below.
  • As simulation scales become smaller and if running at real world speed, you may need to simulate at a higher accuracy by increasing the Domain > Advanced > Min Substeps value. Simulations that are run at too low of a Min Substeps value may display jittering or unstable artifacts in the fluid motion.

Gravity and Force Fields

These parameters control how forces generated by gravity or by Force Field Objects are resolved on the simulation grid (What is the simulation grid?).

image

Gravity Mode The value of gravity that will be used in this simulation.
Scene
    Use the gravity vector defined in the Blender > Properties > Scene tab.
Custom
    Use a custom defined gravity vector.
Gravity Gravity vector value to use if Gravity Mode is set to Custom.
Set to Zero Gravity Operator automatically sets the Gravity Mode to Custom and Gravity to 0.0.

Force Field Resolution

The Force Field Resolution option is an optimization setting that can be used to speed up force field computation. Similar to many other simulation calculations, force fields calculations are stored on a 3D grid where the resolution value denotes how many voxels that the longest side of the domain is divided into. However, unlike many other simulation caclulations, the force field resolution can be lower than the domain resolution. A lower force field resolution will be quicker to compute as there are less grid voxels to calculate.

Note: The size of a voxel in a 3D simulation grid can be thought of as a single unit of detail, or the minimum amount of detail that the simulator will be able to resolve. Similar to how the size of a pixel in a 2D image defines the minimum amount of detail that can be seen in a picture. Read more about the simulation grid here.

The Force Field Resolution option provides four level of detail presets for the force field grid:

image

Force Field Resolution Amount of grid resolution to use for force field calculations. Higher resolution improves simulation accuracy at the cost of speed and RAM. Increase to resolve smaller/sharper details in your force field setup. Decrease to lower force field detail, speed up computations, and lower RAM usage.
Low
    Low resolution force field grid. Domain resolution divided by 4.
Medium
    Medium resolution force field grid. Domain resolution divided by 3.
High
    High resolution force field grid. Domain resolution divided by 2.
Ultra
    Very high resolution force field grid. Matches domain resolution.

image

Which force field resolution should I choose?

Choosing the right force field resolution will optimize your simulation to maximize performance while keeping a sufficient level of physics detail. This section will provide general guidelines for which resolution mode to choose.

Static Force Field Objects

For force field objects that are static (not moving), force field calculations will only need to be computed once, typically on the first frame of a simulation. A single force field computation over the entire animation will not have a significant impact on the total bake time of the simulation. For simulations where all force field objects are static, choose Ultra for the highest level of detail and accuracy.

Dynamic Force Field Objects

For force field objects that are dynamic (animated/keyframed), force field calculations will need to be re-computed on every frame. Depending on the force field mode, dynamic objects can add a significant amount of time to the simulation due to their need to be re-computed.

Simple Force Fields

Some force fields are less computationally intensive to compute than others. The following force field modes are considered to be simple and relatively quick to compute: Point Forces, Vortex Forces, Turbulence Force. If your simulation contains only dynamic objects that are simple force fields, choose Ultra for the highest level of detail and accuracy.

Complex Force Fields

Some force fields can be computationally intensive to compute and add a significant amount of time to the simulation. The following force field modes are considered to be complex and can take a long time to compute: Surface Forces, Volume Forces, and less as much Curve Guided Forces. If your simulation contains at least one of these types of force field using a dynamic object, you will need to choose the right resolution to balance simulation performance and level of detail. Here are some general guidelines and tips for how to choose a suitable resolution:

  • Visualizing the force field grid: Enable the Display Grid option in the Debug panel grid visualizer. By setting the Grid Display Mode to Force Field Grid, you will be able to view the grid and voxel size for the selected resolution mode.

    Your force field object will be converted into voxel data within the simulator with the voxel size shown in the visualizer. Choose a force field resolution that gives sufficient voxel coverage over your object. Any object geometry details smaller than a single voxel will not be resolved in the simulator. For a reference on voxel coverage, see this blog post on force field resolution comparisons.

  • Low Resolution Domains: A low resolution domain, such as resolutions less than 150, contain a relatively low amount of voxels compared to higher resolution domains. A low amount of voxels can be quite quick to compute the force field calculations. If your domain is low resolution, setting the force field resolution to High or Ultra can often be a good choice.

  • High Resolution Domains: A high resolution domain, such as resolutions greater than 250, contain a much larger amount of voxels compared to lower resolutions. A high amount of voxels can take quite a long time to compute. If your domain is high resolution, setting the force field resolution to Low or Medium can often be a good choice.

Force Field Weights

Force field weights control the amount of influence that force field objects have on the fluid and whitewater particles. The weight values scale the strength of the force fields, so a higher weight value will corresponds to a stronger force field. These weights will only control the forces generated by force field objects and do not apply to the force of gravity.

image

Fluid Particles Force field object weight for the simulation fluid particles and resulting surface mesh.
Whitewater Foam Force field object weight for the whitewater foam particles.
Note: This setting currently has no effect on the simulation and is just a placeholder setting. The movement of foam particles is controlled solely by the motion of the fluid surface. Force fields and gravity currently have no effect on foam particles, but this could be changes in future development.
Whitewater Bubble Force field object weight for whitewater bubble particles.
Note: Bubble particles are assumed to be at a lower density compared to the containing liquid and due to buoyancy, bubbles will drift in the opposite direction of the force fields. If you desire bubble particles to move with the direction of the force fields, set this weight to a negative value.
Whitewater Spray Force field object weight for whitewater spray particles.
Tip: Spray particles are often at a lower density compared to the bulk liquid. Depending on the desired effect, setting a higher weight value for spray particles can be a good choice. For example, in a beach wave scene setup, a force field could act as a wind force where the spray weight would be high while other particles have a low or no weight.
Whitewater Dust Force field object weight for whitewater dust particles.

Viscosity

Viscosity in this simulator is a value that controls the liquid's resistance to flow. Adding some viscosity to the liquid creates internal friction within the liquid that has the effect of making the fluid look 'thin' like oil or paint at low viscosity values or look 'thick' like honey or molasses at higher viscosity values.

image

Enable Viscosity Enable the viscosity solver.
Variable Viscosity Enable the variable viscosity solver for mixed viscosity simulations. After enabling, each Fluid/Inflow object can be set to assign a viscosity value to the generated fluid. When enabled, viscosity value attributes will also be generated for the fluid surface. After baking, the viscosity values can be accessed in a Cycles Attribute Node with the name flip_viscosity from the Fac output. See the additional notes on variable viscosity for important information about this feature.
Viscosity The value of viscosity to use in this simulation. A higher viscosity value relates to a 'thicker' fluid.
NOTE: The visual 'thickness' of the fluid is dependent on the size of the simulation domain. For example, a viscosity value may appear 'thick' in a small domain size, but if the same value is used in a larger domain, the fluid may appear visually 'thin'.
NOTE: The viscosity value does not correspond to any real-life physical quantity. It is just a number that specifies the amount of viscosity.
TIP: The viscosity method is highly accurate for high viscosity fluids that buckle and coil and this level of accuracy will increase simulation time. For very low viscosity or thin fluids, enabling the viscosity solver can be overkill. A trick to bypass the solver for very low viscosity fluids is to instead increase the PIC/FLIP Ratio setting in the Advanced Panel. This will lower the accuracy of the simulation which naturally results in a more viscous looking fluid. Try comparing the default value of 0.05 with a value of 1.0 to get an idea for how this changes the behavior of the fluid.
Accuracy Amount of accuracy of the viscosity solver. Decrease to speed up baking at the cost of viscosity accuracy. Increase to improve accuracy at the cost of baking speed. High viscosity thick or stiff fluids benefit the most from increasing accuracy. Low viscosity thin fluids can often work well at the lowest accuracy. Setting above a value of 4 may have greatly diminishing returns on improvement and is not recommended.

Variable Viscosity Notes

  • This feature is currently affected by a bug in Blender and is hidden by default. Unhide this feature by enabling the Developer Tools option in the addon preferences. See the Preferences > Developer Tools documentation for more information on how to enable this feature, the features affected by this bug, and how to work around this issue.
  • Variable viscosity simulations can put a lot of additional stress on the viscosity solver that 'solves' the fluid viscosity equations. When the solver becomes too stressed, it can fail. It is normal and okay for the solver to fail infrequently and is sometimes unavoidable. However, if the solver fails frequently and on multiple consecutive frames, this can indicate that the simulation is too complex for the current settings and can result in an unstable simulation. The solution to reduce solver failures is to increase the number of simulation substeps during a frame (What are substeps?).
  • Symptoms of an unstable viscosity simulation can be stuttering fluid motion, viscosity not being applied, fluid suspended in air, or other unexpected behavior.
  • The status of the viscosity solver can be viewed in the Domain > Stats > Solver Stats info panel.
  • See the Stats > Additional Solver Notes topic for more information and how to diagnose and resolve issues related to solver stress and solver failures.
  • image

Side effects that affect viscosity

There are other simulation settings that can affect the amount of viscosity during a simulation when the viscosity solver is enabled. In general, settings that increase simulation accuracy such as resolution, frame rate, speed/timescale, and substeps can result in more viscosity experienced compared to lower accuracy simulations. For more information on settings that affect simulation accuracy, see this topic: Scene Troubleshooting: Fluid behavior changes when changing Frame Rate, Speed, or Substeps.

Surface Tension

Surface Tension in this simulator is a property of the liquid and simulates the natural cohesion of surface molecules that cause fluids to form into beads, drip, and add an elastic look to splashes. Depending the the type of liquid, surface tension can be an important property of the liquid for realism and often works well in combination with low viscosity liquids.

image

Enable Surface Tension Enable the surface tension solver.
TIP:Surface tension in combination with sheeting can help create beautiful splashing effects! See comparison video. Surface tension in combination with low viscosity fluids can help create smooth small-scale liquid flows.
NOTE: The visual amount of tension on the fluid is dependent on the size of the simulation domain. For example, a surface tension value may appear large in a small domain size, but if the same value is used in a larger domain, the fluid may appear with a visually low amount of surface tension.
NOTE: The surface tension value does not correspond to any real-life physical quantity. It is just a number that specifies the amount of surface tension.
Accuracy Amount of accuracy when calculating surface tension. Increasing accuracy will produce more accurate simulation results and can help eliminate surface 'oscillation' artifacts and improve the smoothness of the flow but will require more simulation substeps which will lead to longer baking times.
TIP: The amount of accuracy required for a smooth surface tends to increase as the amount of surface tension increases. For high surface tension effects, you may need to increase this value to 100% in order to reduce surface artifacts.
Estimated Substeps (Info) Displays the estimated number of substeps per frame that the simulator will run in order to keep simulation stable during surface tension computation. This number will depend on domain resolution and size, framerate, amount of surface tension, and surface tension accuracy.
NOTE: The number of estimated substeps may exceed the Max Substeps value in the Advanced Settings panel. In this case, the Max Substep value should be increased to at least the number of estimated substeps or the amount of surface tension should be decreased.
NOTE: Changing surface tension settings may change the number of substeps that the simulator is required to run. This can affect simulation accuracy which can affect the result of the simulation. For more information see this topic: Scene Troubleshooting: Fluid behavior changes when changing Frame Rate, Speed, or Substeps.
Related Documentation: What are substeps, and how do the min, max, and CFL parameters relate to each other?

Sheeting Effects

The Sheeting Effects feature fills in gaps between fluid particles to help preserve thin fluid sheets and splashes. This option helps prevent holes in the fluid surface as splashes stretch out and grow.

image

Enable Sheeting Effects Enables sheeting/gap-filling feature. Fluid sheeting fills in gaps between particles to help preserve thin fluid sheets and splashes.
TIP: Fluid sheeting in combination with surface tension can help create beautiful splashing effects! See comparison video
Sheeting Strength The rate at which new sheeting particles are added. A higher value will add sheeting particles more often and fill in gaps more quickly.
TIP: The sheeting effects feature is an artificial simulation technique that fills in gaps by adding more fluid to the domain. Prolonged use of sheeting in a simulation can result in an increased volume of generated fluid. Sheeting effects should be used sparingly and only when needed. A technique of keyframing the Sheeting Strength parameter down to 0.0 after the sheeting effect is no longer needed (such as after a splash) can be used to reduce the amount of newly generated fluid.
TIP: The amount of sheeting strength against an obstacle object can be scaled by setting the sheeting strength multiplier in the Obstacle Properties.
Sheeting Thickness How thick to fill in gaps.
TIP: Using a thickness that is too low may reduce how well the simulator is able to fill in gaps. Values less than 0.05 are not recommended.

Side effects that affect sheeting

There are other simulation settings that can affect the amount of sheeting during a simulation when this feature is enabled. In general, settings that can increase the frequency of simulation calculations such as resolution, frame rate, speed/timescale, and substeps can result in higher sheeting strength experienced compared to simulations running at a lower frequency of calculations. For more information on settings that affect the frequency of simulation calculations, see this topic: Scene Troubleshooting: Fluid behavior changes when changing Frame Rate, Speed, or Substeps.

Boundary Friction

This parameter controls the amount of friction on the boundary walls. Friction values for obstacle objects can be set in the Obstacle object settings.

image

Boundary Friction Amount of friction on the domain boundary walls.

Related topic: Getting fluid to effectively stick to a moving object can be difficult in fluid simulation. For a trick to aid in fluid adhesion, see this example scene that uses an attractive surface force that helps liquid stick to a moving obstacle: Example Scenes: Surface Force Fluid Adhesion.

Side effects that affect friction

There are other simulation settings that can affect the amount of friction during a simulation when the friction value is greater than 0.0. In general, settings that increase simulation accuracy such as resolution, frame rate, speed/timescale, and substeps can result in more friction experienced compared to lower accuracy simulations. For more information on settings that affect simulation accuracy, see this topic: Scene Troubleshooting: Fluid behavior changes when changing Frame Rate, Speed, or Substeps.

Clone this wiki locally