Water Bodies

Oceans

By default Crest generates an infinite body of water at a fixed sea level, suitable for oceans and very large lakes.

Lakes

Crest can be configured to efficiently generate smaller bodies of water, using the following mechanisms.

  • The waves can be generated in a limited area - see the User Inputs section.

  • If the lake altitude differs from the global sea level, use a Water Level Input to change the height of the water to match. It is recommended to cover a larger area than the lake itself, to give a protective margin against lower mesh densities from LODs in the distance.

  • For advanced lake authoring, see the Water Body Component

Water Body Component

The Waterbody component can cull water chunks outside its bounds, clip water outside its bounds at the texel level, and override the material of chunks inside its bounds. The typical use case is for creating Closed Lakes, but it is not required.

Clipping

The Water Body component turns off tiles that do not overlap the desired area. The Clip Surface feature can be used to precisely remove any remaining water outside the intended area. Additionally, the clipping system can be configured to clip everything by default, and then areas can be defined where water should be included. See the Clip Surface section.

Material Override

The Water Body can override the water material on the water chunks. This can be used to give closed lakes a distinct appearance.

Important

It is important to understand that since this feature cannot be applied partially to a water chunk, and a water chunk can overlap two water bodies, this feature does not work well with bordering water bodies - including bording an ocean. Typically it works best with only a single lake in the scene.

Tip

Crest has many simulations which can change the appearance of water at the texel level. We encourage everyone to consider those options instead.

Usage

The Water Body component, if present, marks areas of the scene where water should be present. It can be created by attaching this component to a Game Object and setting the X/Z scale to set the size of the water body. If gizmos are enabled, an outline showing the size will be drawn in the Scene View.

  1. Add WaterBody component to a GameObject

  2. Position and expand the scale (XZ only) of the GameObject so the bounds covers the desired area (bounds visible with gizmos)

  3. Configure clip and material overrides as desired

  4. If clipping is enabled, set Water Renderer ‣ Simulations ‣ Surface Clipping ‣ Default Clipping State to Everything Clipped

Tip

If you only want the material override feature, then disable Water Renderer ‣ Surface ‣ Culling ‣ Water Body Culling.

Streams

There are several ways to accomplish streams. The most pertinent data is flow for the current and height for the stream gradient (optional).

Flow & Height Map

A river being a large stream, often without a visible gradient, can be implemented with just a Flow Map. The water level can also be adjusted to make a stream gradient by using a height map or a mesh with the Water Level Input.

Splines

Splines are a great option for creating streams. They can direct flow and create gradients.

Please see Rivers.

Shallow Water Simulation

The Shallow Water Simulation can simulate streams and bake the final output to a texture.

Please see Stream Simulation.

Separate Water Bodies

The Water material has the Custom Mesh toggle which configures the material for usage with separate mesh renderers. This can be optimal for water bodies which are separate and may need different material properties.

There are a few considerations:

  • There will be no displacement from our system (ie waves etc) when using this mode, but displacement will still contribute to normals.

  • Currently, inputs like Sphere Water Interaction will not work with them, unless the inputs are placed at sea level, as they are unaware of these separate bodies

Troubleshooting

Ocean waves are affecting rivers and/or lakes

This is typically caused by incorrect blending, input feathering or large global waves with chop. For the latter, chop will add horizontal displacement which can cause waves to displace onto another input, circumnavigating the input’s blending.

The following are potential solutions:

  • If varying the water level, enable Shape FFT/Gerstner ‣ Sea Level Only on the ShapeFFT/Gerster used for ocean waves. This will fade global waves so there are none one metre or further away from sea level. This is enabled by default.

  • Make sure Shape FFT/Gerstner ‣ Blend on the non global input is set to an option which overrides previous values. Also make sure to pay attention to Shape FFT/Gerstner ‣ Queue, to ensure local waves execute after global ones.

  • Shape FFT/Gerstner ‣ Feather will feather the edges of the input which affects blending.

  • Using water depth for wave attenuation can help greatly with reducing global waves affecting inland water bodies

    • Be sure to check Water Renderer ‣ Simulations ‣ Water Depth ‣ Attenuation In Shallows, Shape FFT/Gerstner ‣ Waves ‣ Respect Shallow Water Attenuation and Respect Shallow Water Attenuation on the Wave Spectrum, as it reduces the effectiveness of attenuation.

  • If changing wave attenuation is not desired, expanding the input to give a buffer is a good solution. For splines, override the spline radius at Shape FFT/Gerstner ‣ Waves ‣ Mode ‣ Radius for the ShapeFFT/Gersnter attached to the spline.