Water Exclusion#

Also referred to as clipping or masking, 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 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.

Watertight Hull#

The Watertight Hull component uses the clip simulation 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.