SeaOptions
The look of a map’s sea, and the game’s function over its material.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
absorptionDistance? |
number |
0 |
How clear the sea is: the metres of water that let through a third of the light of what lies under it, so sand, coral and piles show through the shallows and fade with depth, nearly gone at three times it. 0 keeps the sea opaque. The depth is down to the bed, or to the top of what a WaterContactFoam holds under the water, down to three times this, so coral it wraps keeps its colour. Unity’s water names its own absorptionDistance; this one reads a capture from above rather than a depth texture along the view. A clear sea draws after the opaque things, at a render order of -1 among the transparent ones, and writes its depth: a particle above it that draws after it draws over it, and one under it is hidden. Among transparent things three draws a lower group order first, and within one group order a lower render order first: a transparent thing that sorts before the sea is drawn over by it. A custom sort and a transmissive material follow their own order. The ambient occlusion and the depth effects read its surface, so what stands under it takes none of their shade. A material the game’s material returns in place of the engine’s sets its own transparency. |
color? |
ColorRepresentation |
"#1f6f8b" |
The deep water’s colour. |
contactFoamWidth? |
number |
0.8 |
The metres of foam round what a WaterContactFoam holds, out from where it meets the water; 0 draws none. Up to 4 m on a map of 256 m or less; a larger map’s capture is coarser and reaches as much further. |
contactShallowWidth? |
number |
2 |
The metres of shallow colour round what a WaterContactFoam holds, so a rock in deep water stands in a band of the shallows; 0 draws none. Up to 4 m, as the foam. |
directSpecularIntensity? |
number |
1 |
How much of the lights’ highlight the water draws, the sun’s and every other light’s, from 0, none, to 1, the physically based one: lower it to calm a low sun’s glare on rough water. The sky’s reflection is unchanged. |
facetContrast? |
number |
0.07 |
How far each facet’s tint strays from the water’s colour, lighter or darker, from 0 to 1: 0.07 is a faint mosaic, 0.3 reads as cut glass. Only drawn where facetSize is above 0. |
facetSize? |
number |
0 |
The size in metres of the flat facets the surface breaks into, each tilting as the waves pass, for a low-poly look; 0 keeps the surface smooth. |
foamColor? |
ColorRepresentation |
"#f0f8ff" |
The foam’s colour along the shore. |
foamDepth? |
number |
0.22 |
The metres of depth the shore’s broken foam reaches out to, past the solid line at the water’s edge: on a beach that falls a metre in six, 0.4 lays a skirt of foam about 2.4 m wide. 0 keeps the solid line alone. A pond’s depth is its own, 10 m for the whole of its plane, so there 0.4 reaches 4 % of the way in. |
horizonColor? |
ColorRepresentation |
the deep color, which draws no band |
The colour the deep water turns to toward the horizon, where the view meets the water at a low angle, as a sea darkens to azure far out; the shallows keep their own colour. Stylized Water 2 names its own horizonColor. |
infinite? |
boolean |
true |
Draws the sea out to the camera’s far distance wherever the camera stands, deep past the map’s edge, so it meets the horizon; false draws it across the map alone, for a sea that ends at the map’s edge, such as a flooded room’s. |
material? |
ModelMaterial |
undefined |
The game’s function over the engine’s water material, as ground takes one: handed the engine’s, it returns it patched, or a material of the game’s in its place. Define it once, outside the component. |
rippleSize? |
number |
1, and the sea’s 3 |
Metres across the ripples that drift over the surface’s colour, two layers of noise that lift it at a crest: 1 is a pond’s, 4 a lake’s. Unity HDRP calls its own small band ripples. |
rippleSpeed? |
number |
1 |
How fast the ripples drift: 1 is calm, 0 holds them still. |
shallowColor? |
ColorRepresentation |
"#5bb3b7" |
The colour the water takes where it is shallowest, at its shore. |
shallowDepth? |
number |
1.4 |
Metres of depth over which the shallow colour turns to the deep one, so a shelf round an island reads as a band as wide as its slope. |
shallowEdgeSoftness? |
number |
1 |
The share of shallowDepth, at its deep end, over which the shallow colour turns to the deep, from 0 to 1: 1 turns it smoothly from the shore, 0.3 keeps the shallow colour over the first 70 % and turns it at the shelf’s edge, and 0 draws an exact line at shallowDepth. |
sparkleConeHalfAngleRadians? |
number |
Math.acos(0.992), about 0.127 |
How far a glint’s mirror may point from the light and still flash, in radians: the edge where its flash fades to nothing, at its brightest pointing straight at the light. A smaller angle makes each flash more selective, so fewer glints show and the band of them can narrow toward the light’s mirror; the band’s reach is about this and twice sparkleSpreadRadians either side of it, before the view’s angle stretches it across the water. 0.001 or more and under Math.PI / 2. |
sparkleGlowColor? |
ColorRepresentation |
"#ffffff" |
The glow’s colour, its own rather than the light’s, so a gold glow stays gold under a warm sun: a white glow round a coloured light’s star stays white. The star itself keeps the light’s colour. |
sparkleGlowIntensity? |
number |
0 |
How strongly each glint glows: a soft four-rayed light round its star, the rays reaching further as its flash peaks, that takes the water’s own colour’s place under it in sparkleGlowColor, as a painted glint covers the sea, so the colour reads over a deep blue that added light would grey. It scales with sparkleIntensity and the light’s strength, so it dims under the moon, and saturates: past the point where the glow covers the water, more draws no brighter. The sea’s highlight, its sky and, in clear water, the bed still show through it, and foam keeps its own colour. 0 draws the star alone. 0 to 100. |
sparkleGlowScale? |
number |
1 |
How far each glint’s glow reaches, as a multiple of its own: at 1 it fades out inside its star’s cell, and at 2 it reaches the middles of the next cells, spanning sparkleSize times this. So a strip of small cells draws many stars as large as fewer big ones. Above 1 each pixel inside the glints’ band reads its neighbours’ stars: up to 2, the three nearest; above 2, all eight, which costs more again. A change across 1 or 2 compiles the water’s shader anew. The glints still fade by their cell’s pixels, so smaller cells fade nearer the camera. Only drawn where sparkleGlowIntensity is above 0. 1 to 3. |
sparkleIntensity? |
number |
0 |
How bright the glints are where the sun or the moon mirrors in the water: twinkling four-pointed stars in a band toward the light. 0 draws none; 1 is the reference, near white under a day’s sun at the engine’s exposure. Each takes its light’s colour and strength, and adds to the water after directSpecularIntensity, which scales the ordinary highlight alone. A glint is a small facet of its own tilt that flashes as it catches the light, so none show where the light stands too far from the view’s mirror for sparkleSpreadRadians. |
sparkleSize? |
number |
0.5 |
Metres between glints: one star a cell of this size, the star growing with it, so a larger size draws fewer, larger stars. A star draws only where its cell spans at least two pixels, so a far view wants a larger size. |
sparkleSpreadRadians? |
number |
0.16 |
The most each glint’s facet leans from straight up, in radians, whatever the waves and the facets: the band of glints spans about twice it either side of the light’s mirror, so raise it for a wider band, lower it for a tight one. 0 or more and under Math.PI / 2. |
waveDirectionRadians? |
number |
the look's wind's direction, and 0 without one |
Radians the waves run toward, turned from +z toward +x as the look’s wind’s directionRadians reads: 0 runs along +z. |
waveHeight? |
number |
0, and the sea’s 0.25 |
Metres from trough to crest of a typical wave, as a sea’s significant height reads: four times the surface’s spread about its level. The rare highest crest, where all four waves meet, stands about 1.35 times it over its trough, which a dock’s clearance needs. 0 keeps the surface flat. The mesh needs vertices to move: the sea has its own, and a WaterMaterial’s plane takes segments about a metre apart. |
waveLength? |
number |
12 |
Metres crest to crest of the longest wave: the other three run shorter, the shortest at about half of it. |
waveSpeed? |
number |
1 |
How fast the waves run, as a share of deep water’s pace for their length, so a longer wave runs faster, as at sea: 1 is the sea’s own, 0 holds them still. The waves run on the world’s clock, so a float a system moves reads the same waves the page draws: the devtools’ pause holds them and its speed runs them faster. A change of the speed, the length or the direction while the world runs jumps the surface once to where the new values put it. |