To... | Do this |
Improve the simulation’s overall quality
|
-
Shallow Water Solver simulations are based on substeps. If you see instabilities, open the Simulation tab, and increase Substeps. Higher values slow down the simulation, but create more accurate results. You can increase the parameter in steps of 10 .
|
Avoid reflecting waves
|
-
By default, waves are reflected at the heightfield’s boundaries. The fastest way to avoid reflections is to open the Setup tab, and change Boundaries to Periodic. Waves will then pass through the heightfield’s boundaries, but reappear on the opposite side.
-
You can also dampen waves near the boundaries with parameters in the Damping Layer folder. This works for all types of Boundaries.
-
Turn on Enable Damping Layer.
-
The axis checkboxes let you choose in which directions the waves should be damped.
-
Large Layer Size and Damping Strength values help to damp the waves before they reach the boundaries.
|
Avoid repeating and reentering waves
|
|
Make the water faster
|
Note
Note that fast moving water may causes instabilities. To fix this, go to the Simulation tab and increase Substeps in increments of 10 .
-
If you are utilizing sourcing, you can go to the Setup tab and increase Source Scale. This change sources more water and makes it flow faster.
-
Another way is to increase the Setup tab’s Gravity parameter. You can, for example, enter an expression like 9.8*2 to double the value.
-
With values greater than 1 , Time Scale speeds up the entire simulation, resulting in more flow per frame.
|
Make the water slower
|
-
If sourcing, go to the Setup tab and decrease Source Scale to get a smaller water volume.
-
Also under Setup, decrease Gravity, for example with an expression like 9.8*0.25 .
-
With values, smaller than 1 , Time Scale slows down the entire simulation, resulting in lower flow speed.
-
In the Setup tab, turn on Max Wave Speed to set a speed limit for the waves.
|
Source more water
|
-
You can draw a bigger source mask. Instructions on how to draw such a mask can be found on the Shallow Water Solver page.
-
In the solver’s Setup tab, set a higher value for Source Scale.
|
Use Velocity Diffusion
|
-
This parameter blurs the velocity field and with higher settings, the water becomes more viscous.
-
Small values of Velocity Diffusion can also help to stabilize the simulation.
|
Use a force mask
|
All mask layers are located in the solver’s Bindings tab. Force Mask Layer is not preconfigured, but the workflow is the same as with the other layers. Below, there’s a quick guide. For a more complete workflow, visit the Shallow Water Solver fields page.
-
Create a heightfield mask node, e.g. using HeightField Paint somewhere in your network between the Heightfield and the Shallow Water Solver node.
-
Create the mask.
-
Add a HeightField Copy Layer node.
-
Under Destination add a unique name, e.g. force . Don’t use any of the names, listed in the solver’s Bindings tab.
-
Go to the solver’s Bindings tab. Under Force Mask Layer, enter force .
-
Add a HeightField Mask Clear node to delete the current mask and keep the network healthy.
|
Use animated masks
|
Masks don’t have to be static. You can, for example, use an animated HeightField Noise or a deforming object to create a source mask.
-
In the solver’s Setup go to the Constraint Updates subpane.
-
Set Source Frequency to Once per Frame to signal the solver that the mask is animated. For an animated sink mask, use Sink Frequency.
-
If the mask’s animation or deformation is very fast, choose Every Substep to increase precision. Note that this option can drastically slow down the simulation.
-
You can also use a static mask, but animate Source Scale instead.
-
Move the timeline slider to the frame, when sourcing should start.
-
Alt + click the Source Scale parameter to create an animation key.
-
Go to the frame when sourcing should be at maximum.
-
Create another key.
|
Change mask and layer names
|
You can change the layer names under the solver’s Bindings tab.
-
Enter a new name for the layer you want to change. Make sure that every name is unique and not used anywhere else in the network.
-
Update all nodes where the original name occured and apply the new layer name.
|
Avoid spikes and disappearing voxels
|
Sometimes you might see spikes or disappearing voxels. This often happens with fast moving water, or in areas where water with different flow directions collides. Below you can find ways to reduce the spikiness.
-
Go to the solver’s Simulation tab and increase Substeps. A good start is to double the default value to 20 . You can also try higher values of 50 or even 100 .
-
Under the Setup tab you can find Velocity Diffusion. Very small values (< 0.001 ) help to stabilize the simulation. Very high settings make the water more viscous.
-
In the Setup tab there’s the Max Wave Speed checkbox. Turn it on and enter a hard speed limit. This can also help to reduce the occurrence of spikes.
|