A Shallow Water Simulation is a versatile tool which simulates fluid dynamics in shallow water. Generally speaking it has many use cases from emergent gameplay to generating streams. At launch only the stream and shoreline use case is supported.

The simulation will inject water height, foam and flow to give convincing results.

Warning

Like any simulation it can be difficult to control and thus expectations should be tempered. For example if you have a vision for what kind of shoreline waves you want, the terrain will have to be authored to produce that output with the simulation. Furthermore, depending on the riverbed, some streams will not reach the end.

Usage

To get started perform the following:

  • Add the ShallowWaterSimulation component

  • Add a Depth Probe

  • Move the transform to where you want the simulation

  • Adjust the Width property to desire size

  • Optionally set the Preset

  • Click “Populate Depth Probe & Reset Simulation”

After changing a property you will need to click “Reset Simulation” for them to be reflected. Changing properties when the simulation is running can cause instabilities and visual anomalies - this is expected and just click “Reset Simulation” when ready.

The above steps is for a fixed position simulation. If you want the simulation to be movable or follow the camera, then change Placement. This is only possible when injecting displacement (like for shorelines).

Tip

When having the simulation follow the camera, for best performance, see Dynamic Depth Probes.

Troubleshooting

I am seeing water and/or waves jitter at the shoreline

This can happen if TAA or similar temporal effects are active. Make sure motion vectors are enabled. Please see Motion Vectors for more information.