WaterRenderer#

Class in WaveHarmonic.Crest, WaveHarmonic.Crest

The main script for the water system.

Attach this to an object to create water. This script initializes the various data types and systems and moves/scales the water based on the viewpoint. It also hosts a number of global settings that can be tweaked here.

Members#

Properties#

ViewerHeightAboveWater

Vertical offset of camera vs water surface.

ViewerDistanceToShoreline

Distance of camera to shoreline. Positive if over water and negative if over land.

SeaLevel

Sea level is given by y coordinate of GameObject with WaterRenderer script.

TimeProviders

Loosely a stack for time providers.

TimeProvider

The current time provider.

Gravity

Physics gravity applied to water.

Scale

Current water scale (changes with viewer altitude).

CollisionProvider

Provides water shape to CPU.

FlowProvider

Provides flow to the CPU.

DepthProvider

Provides water depth and distance to water edge to the CPU.

AlbedoLod

Albedo - a colour layer composited onto the water surface.

AnimatedWavesLod

All waves (including Dynamic Waves) are written to this simulation.

Viewer

The camera which drives the water data.

CastShadows

Have the water surface cast shadows for albedo (both foam and custom).

ClipLod

Clip surface information for clipping the water surface.

DepthLod

Water depth information used for shallow water, shoreline foam, wave attenuation, among others.

DropDetailHeightBasedOnWaves

Drops the height for maximum water detail based on waves.

DynamicWavesLod

Dynamic waves generated from interactions with objects such as boats.

ExtentsSizeMultiplier

Applied to the extents’ far vertices to make them larger.

FlowLod

Horizontal motion of water body, akin to water currents.

FoamLod

Simulation of foam created in choppy water and dissipating over time.

GeometryDownSampleFactor

How much of the water shape gets tessellated by geometry.

GravityMultiplier

Multiplier for physics gravity.

Layer

The water chunk renderers will have this layer.

LevelLod

Varying water level to support water bodies at different heights and rivers to run down slopes.

Material

Material to use for the water surface.

Portals

The portal renderer.

PrimaryLight

The primary light that affects the water.

Reflections

The reflection renderer.

LodResolution

The resolution of the various water LOD data.

ScaleRange

The scale the water can be (infinity for no maximum).

ShadowLod

Shadow information used for lighting water.

LodLevels

Number of levels of details (chunks, scales etc) to generate.

TeleportThreshold

The height where detail is focused is smoothed to avoid popping which is undesireable after a teleport.

TimeSliceBoundsUpdateFrameCount

How many frames to distribute the chunk bounds calculation.

Underwater

The underwater renderer.

Viewpoint

The viewpoint which drives the water detail - the center of the LOD system.

VolumeMaterial

Underwater will copy from this material if set.

WaterBodyCulling

Whether ‘Water Body’ components will cull the water tiles.

WindSpeed

Base wind speed in km/h.

WriteMotionVectors

Whether to enable motion vector support.

Static Properties#

Instance

The water singleton instance.

RunningWithoutGraphics

Is runtime environment without graphics card

RunningHeadless

Is runtime environment non-interactive (not displaying to user).

FrameCount

The frame count for Crest.