Water Exclusion#

Features detailed here can either exclude or include the surface and/or volume.

Clip Surface#

Fig. 3 Crest 4: Water Bodies and Surface Clipping (outdated but still useful)#

This data drives clipping of the water surface (has no effect on the volume), as in carving out holes. It is similar to Unity’s Terrain Holes feature. This can be useful for hollow vessels or low terrain that goes below sea level. Data can come from primitives (signed-distance), geometry (convex hulls) or a texture.

To turn on this feature, enable the Surface Clipping simulation on the WaterRenderer script, and ensure the Alpha Clipping is enabled on the water material.

The data contains 0-1 values. Holes are carved into the surface when the value is greater than 0.5.

User Inputs#

The Clip Input component can write data to the simulation and supports the Primitive Mode, Texture Mode, Spline Mode, Paint Mode and Renderer Mode.

Primitive#

Clip areas can be added using signed-distance primitives which produce accurate clipping and supports overlapping. The position, rotation and dimensions of the primitive is determined by the Transform.

Renderer#

The following input materials are provided:

  • Clip Include Area: Removes clipping data so the water surface renders.

  • Clip Remove Area: Adds clipping data to remove the water surface.

Displacement#

Displacing the water surface is another option for removing water from an area. Simply push the water below the surface using an Animated Waves Input or Water Level input.

When using the Animated Waves Input, it is possible to displace the water surface and have it affect underwater rendering:

  • Enable the Displacement collision layer (see Collision Layers)

  • Set Displacement Pass to Lod Independent (Last).

  • Set Collision Layer on Floating Objects to anything earlier to Everything

Tip

Displacement is not as precise as the clip simulation. It requires thicker walls to hide the edge of the effect.

It is also possible to nest buoyant objects, in addition to above:

  • Set Collision Layer to not Everything on Floating Objects that you want to nested

Watertight Hull#

The Watertight Hull component uses the clip simulation and/or displacement to remove water from a convex hull. Simply assign a convex hull mesh.

Mask Underwater#

The Portals & Volumes feature can remove both the water surface and the underwater volume. Otherwise, enable/disable the Underwater Renderer where needed.