|
FhSim
3.1.0
Marine systems simulation
|
The Environment can draw the sea, the sky and the seabed in two ways:
The look is visual only: it never changes the simulation. The design is in doc/plans/pbr-ocean-rendering.md and ADR 0009 (doc/adr/); this page is about using it.
The quickest way is a preset:
Visual.Preset | What it sets (only where the input file does not set the parameter itself) |
|---|---|
"None" (default) | Nothing: every parameter has the default its documentation gives; the look is Classic. |
"Realistic" | Visual.OceanStyle = "PBR", Visual.Sky = "Procedural", a light haze over the horizon (Visual.FogVisibility = 20000, Visual.FogHeight = 150). Add auto-exposure and bloom in <Rendering> (section 2.5) for the look of a camera. |
"Analysis" | Visual.OceanStyle = "PBR", Visual.ClarityScale = 4 (one sees four times further into the water than is physical), Visual.Caustics = 0, Visual.MarineSnow = 0, Visual.TailDisplacement = 0 (the drawn surface is exactly the physics surface), Visual.SeabedRocks = 0: a steady, clear picture of structures in the water. |
A parameter given in the input file always wins over the preset. For example, a reference scene that says Visual.OceanStyle = "Classic" stays classic with any preset.
Three parameters set the look of a scene in one go (ADR 0009 D34):
Each one sets a group of the parameters of section 2. Any of them turns on the PBR look (and Visual.Weather and Visual.TimeOfDay the procedural sky) unless the input file says otherwise. A parameter given in the input file always wins, so a preset is a starting point: Visual.Weather = "Storm" Visual.RainRate = "0" is a dry storm. They combine with Visual.Preset, and win over it where both set a parameter.
In FhSimUI all three are in the "Parameters" panel (F9), with the cloud parameters (Visual.CloudCover, CloudThickness, CloudAltitude, CloudSpeed). Choosing an option sets all its values at once and the sliders move with them: the clouds change within a second (made on a worker), the sun and the sky within about half a second. Tune from there; "Copy XML" gives the result for the input file. Visual.TimeOfDay is not in the panel when Visual.SunDirection = "Time" (the sun then follows StartTime; use Visual.SunTimeShift); with Visual.TimeOfDay = "Now" it is, so another option returns to a fixed sun. The density of the marine snow keeps the value of the start.
The values are chosen to look good, not to be measured weather. The underwater options in particular see further than real water of their colour (the clarity scale), so that something shows.
**Visual.Weather**
| Option | Look | Cover | Thickness | Base [m] | Cloud drift [m/s] | Visibility [m] | Fog [m] | Fog height [m] | Banks | Rain [mm/h] |
|---|---|---|---|---|---|---|---|---|---|---|
"Clear" | a cloudless sky, far visibility | 0 | 1 | 1500 | 5 | 60000 | none | 50 | 0 | 0 |
"Fair" | fair-weather cumulus, a light haze on the horizon | 0.25 | 0.8 | 1500 | 6 | 40000 | 30000 | 150 | 0 | 0 |
"Broken" | broken cumulus, sun and shadow | 0.55 | 1.5 | 1200 | 8 | 25000 | 20000 | 150 | 0 | 0 |
"Overcast" | a grey deck with a few thin spots, soft light | 0.93 | 2 | 1000 | 8 | 20000 | 15000 | 200 | 0 | 0 |
"LowCloud" | a low stratus deck | 0.9 | 2 | 250 | 6 | 10000 | 8000 | 150 | 0 | 0 |
"Drizzle" | a low grey deck and light rain | 1 | 2.5 | 450 | 8 | 10000 | 7000 | 200 | 0 | 1.5 |
"Rain" | dark overcast and steady rain | 1 | 3.5 | 700 | 10 | 9000 | 7000 | 250 | 0 | 3 |
"Storm" | dark, torn storm clouds driven by the wind, rain | 0.95 | 4.5 | 900 | 20 | 8000 | none | 50 | 0 | 2.5 |
"Haze" | few clouds, a milky haze | 0.15 | 0.6 | 2500 | 4 | 8000 | 6000 | 300 | 0 | 0 |
"Mist" | a thin mist over the water | 0.4 | 1 | 1500 | 4 | 10000 | 2000 | 80 | 0 | 0 |
"Fog" | thick sea fog | 0.8 | 1.5 | 300 | 3 | 6000 | 400 | 60 | 0 | 0 |
"FogBanks" | banks of sea fog with clear lanes | 0.2 | 0.8 | 1500 | 4 | 30000 | 200 | 60 | 0.8 | 0 |
**Visual.Underwater**
| Option | Look | Water type | Turbidity | Clarity scale | Marine snow | Caustics |
|---|---|---|---|---|---|---|
"Tropical" | very clear blue tropical water: one sees across tens of metres | OceanI | 1 | 1 | 0.3 | 1.2 |
"Ocean" | clear open ocean | OceanIB | 1 | 1 | 0.6 | 1 |
"Coastal" | blue-green coastal water: about 20 m | Coastal1 | 1 | 3 | 1 | 0.8 |
"Fjord" | green fjord water: a hazy 10-15 m | Coastal3 | 1 | 3 | 1 | 0.7 |
"Murky" | murky green water: a few metres | Coastal5 | 1.5 | 2.5 | 1.5 | 0.4 |
"Harbour" | turbid harbour or estuary water: an arm's length to a few metres | Coastal9 | 2 | 2.5 | 2 | 0.2 |
"ClearView" | coastal colour, but one sees far (not physical) | Coastal1 | 0.5 | 8 | 0.3 | 0.5 |
"Inspection" | a steady, very clear view of structures: no caustics, no particles (not physical) | Coastal3 | 0.5 | 12 | 0 | 0 |
**Visual.TimeOfDay**
| Option | Look | Sun (azimuth, elevation) | Moon (azimuth, elevation), style |
|---|---|---|---|
"Dawn" | the sun just up in the east | 90, 1 | - |
"Morning" | a low morning sun | 120, 15 | - |
"Noon" | a high sun | 180, 45 | - |
"Afternoon" | the afternoon sun | 230, 30 | - |
"GoldenHour" | a low warm sun | 260, 6 | - |
"Sunset" | the sun on the horizon | 270, 0.5 | - |
"Dusk" | the blue hour after sunset | 280, -4 | 120, 10, Natural |
"Night" | a dark night, a natural full moon | 0, -25 | 150, 25, Natural |
"MoonlitNight" | a night lit by a large bright moon (not physical) | 0, -25 | 150, 25, Bright |
"BloodMoon" | a night under a large red moon (not physical) | 0, -25 | 150, 18, Blood |
"Now" | the sun and moon of the computer's clock now, at the scene's place, moving through the run | from the clock | from the clock, Natural |
The time of day fixes the sun (and at night a full moon, section 2.1) and does not move it through the run; the stars then turn over a sky of 60 deg north. For the sun of a date, time and place use Visual.SunDirection = "Time" (section 2.1), which wins over Visual.TimeOfDay. Reference scene presets.xml.
"Now" is the exception: the sun, the moon and the stars of the computer's clock at the scene's place, as Visual.SunDirection = "Time" with StartTime = "Now", but without StartTime and also when chosen in the panel while running. The calendar time at simulation time 0 becomes the clock (in whole seconds) when "Now" is chosen minus the simulation time then; in the input file that is the clock at the start, logged so that the run can be repeated with StartTime and Visual.SunDirection = "Time". The place is Visual.Latitude, Visual.Longitude, else the scene's origin (Origin.Lat, Origin.Lon), else latitude 0, longitude 0 (logged). This calendar time is what FhSimUI shows as the date and time of the picture (FhSim core ADR 0044); choosing another option returns to that option's fixed sun and to the input file's StartTime (without one FhSimUI shows no date). The tide keeps the input file's StartTime. Visual.SunTimeShift is not in the panel with "Now".
Without a preset, set Visual.OceanStyle = "PBR" and add what you need from the tables below.
Visual.OceanStyle = "PBR" asks FhSim core for its HDR render pipeline (core ADR 0018). If the graphics hardware cannot run it (it needs half-float render targets and GLSL 3.30, which any GPU of the last ten years has), or the input file says <Rendering Pipeline="Off">, core logs a warning and the picture is the classic one; the PBR water then shows the deep-water colour without the scene behind it.
| Parameter | Use |
|---|---|
Visual.Sky | "Procedural": a physically based atmosphere with a cloud layer, for any sun position (recommended). The image sets ("Cloudy", "Mountains", "Morning", "Stormy") still work; the sun then comes from the image. |
Visual.SunDirection | [azimuth, elevation] in degrees, azimuth from north towards east. With the procedural sky the default is 135, 35. "Time": the sun for the date, time and place (below). |
Visual.CloudCover | Share of the sky with cloud, 0 to 1 (0.3). The clouds drift (Visual.CloudSpeed, towards the mean wave direction) and their shadows move over the sea. |
Visual.CloudThickness | 1 for fair-weather cumulus; 3 to 5 for dark storm clouds. |
Visual.CloudModel | "Volumetric" (default): clouds with depth, from Visual.CloudAltitude (their base) up through 900 m (thickness 1) to 2400 m (thickness 4), lit by the sun and the sky, with bright tops, grey bases and silver linings; they can be seen from below, flown through and seen from above (aerial vehicles; reference scene aerial_clouds.xml). "Layer": the thin layer of earlier versions, cheaper. Their shadows move over the sea, the seabed and the vessels and structures in the scene. |
Visual.CloudResolution | "Normal" (default), "High" or "Ultra": finer detail of the clouds, crisp edges overhead. The same cloud field; a little longer start-up (0.05 s, 0.3 s) and more GPU memory (11 MB, 43 MB). |
Visual.Visibility | Meteorological visibility [m] (30000). Lower values give a hazier, whiter sky, a redder low sun and more haze over the sea. |
Visual.FogVisibility | Fog over the sea: the visibility [m] in it at sea level; 0 (default) for none. It covers vessels, the water and the low sky alike and lies as a band over the horizon. 200 to 1000: thick fog; 2000 to 10000: mist; 20000: a light haze that hides the edge of the drawn sea. |
Visual.FogHeight | How fast the fog thins upwards [m] (50): 20 to 50 for low sea fog with the sky clear above, several hundred for haze that reaches high. |
Visual.FogBanks, Visual.FogBankSize | With Visual.FogVisibility: 0 for an even fog layer, up to 1 for banks of fog with clear lanes between them, of about Visual.FogBankSize (1500 m). Tunable. |
Visual.RainRate | Rain [mm/h]: falling streaks, rings on the water near the camera, and the visibility of rain (about 10 km at 2 mm/h, 2 km at 25 mm/h). Combine with an overcast Visual.CloudCover = "1". Tunable. |
Visual.SkyImage | An equirectangular Radiance HDR image (.hdr, for example a CC0 sky from Poly Haven) as the sky. Its sun is found and used as the light; turn it with Visual.SkyImageAzimuth. |
The sun stands where it would at the start time plus the simulation time (UTC, NOAA's solar position) and moves through the run; the sky follows in steps of a quarter degree (about once a minute). Below the horizon come the twilight and a dark blue night with the moon where it stands, in its phase, lighting the sea at night, and the stars of the Yale Bright Star Catalogue. Visual.SunTimeShift [h] moves the sun's clock (not the tide's), and is tunable: the time of day while running (F9 in FhSimUI). StartTime is shared with the tide (Tide.StartTime is its old name). In a scene with an origin (Origin.Lat, Origin.Lon on the Environment, see the overview) Visual.Latitude and Visual.Longitude may be left out: the sun is then at the origin. Only the procedural sky moves the sun; image skies keep their own. Reference scene time_of_day.xml.
The night is dark, as it should be. For a night scene that is easy to see, make the moon larger and brighter than nature (all tunable):
| Parameter | Use |
|---|---|
Visual.MoonStyle | "Natural" (default), "Bright": four times as large, always full, light 300 times the full moon's; "Blood": as Bright, copper red |
Visual.MoonSize | Factor on the moon's size, on top of the style (default 1) |
Visual.MoonBrightness | Factor on the moon's light, on top of the style (default 1) |
Visual.MoonDirection | "azimuth, elevation" [deg]: a full moon at a fixed place, also without "Time"; empty: where it stands |
The moon must be up: with "Time" choose StartTime or Visual.SunTimeShift, or set Visual.MoonDirection. The disc shows the lunar surface (NASA LRO map); a large Visual.MoonSize shows it closer.
| Parameter | Use |
|---|---|
Visual.WaterType | A Jerlov water type: "OceanI" (clearest, deep blue) to "OceanIII", "Coastal1" to "Coastal9" (green, turbid). "Custom" uses Visual.WaterAbsorption and Visual.WaterBackscatter. |
Visual.Turbidity | Scales the particles of the water type: above 1 more turbid and brighter. |
Visual.ClarityScale | Lets light travel further than physical (analysis only). |
Visual.UnderwaterVisibility | The same, given as how far a black target is seen [m] (analysis only). See "Engineering clarity" in 2.4. |
Visual.SurfaceVisibility | The same as Visual.UnderwaterVisibility, for the camera above the surface (analysis only). See "Engineering clarity" in 2.4. |
Visual.DepthDimming | 1 (default): light dims with depth. 0: objects are lit as at the surface (analysis only). See "Engineering clarity" in 2.4. |
Visual.FoamAmount | Scales the whitecap coverage (1: the observed coverage for the wind speed). Half of it is fresh whitecaps; the rest is the foam they leave, which thins into streaks along the waves and a lace of bubble walls over about 12 s. |
Visual.Reflections | Reflections of vessels and structures in the water (1; 0 for the sky only). They cost about 1.8 ms per frame at 1080p on an integrated GPU while a vessel is in view. |
Visual.WindSpeed | Wind for the roughness of the waves too short for marenv; by default from the significant wave height. |
The waves are the same everywhere, set by Waves.*. Harbour basins behind a breakwater and rivers should be calmer, and a river flows. A water map tells the picture where:
| Parameter | Use |
|---|---|
Visual.WaterMap | Path of a water map: a grid in the scene's frame with the wave shelter (0 fully sheltered, 1 open sea) and, optionally, the surface flow (north, east) [m/s]. Sheltered water gets smaller waves, fewer whitecaps and finer ripples; where there is flow, the ripples drift downstream. Outside the map nothing changes. |
Visual.ShelterRipples | How much of the fine roughness (wind ripples) stays where the shelter is 0 (0.3). |
The map is a JSON header and a raw grid of float32 values, in the layout of fhsim_fjord's elevation grid (row 0 at the south edge):
The raw file holds rows x cols x channels values, interleaved per cell; channels may also be ["shelter"]. Whoever builds the scene makes the map (fhsim_fjord from map data). Make it smooth over 50 to 100 m, so that no edges show, and let the shelter reach 1 and the flow 0 at the map's edges. The reference scene sheltered_harbour.xml (examples/input/reference_scenes/, map from make_watermaps.py) shows a basin, a river and the open sea.
Visual.WaterMap changes the picture only. For the physics, give the same file to:
| Parameter | Use |
|---|---|
Waves.ShelterMap | Bodies feel the waves times the shelter (elevation, tilt, particle velocity and acceleration, dynamic pressure): a moored boat in a basin moves as in the sheltered water it is drawn in. |
Current.WaterMap | The map's flow is added to the configured current, with a 1/7 power law over the depth (zero at the seabed): boats and cables in the river feel its flow. |
Tide.Model = "Harmonic" (Environment parameters, ADR 0009 D18) raises and lowers the whole sea with the astronomical tide: the drawn surface (both looks), the underwater pass, the fog's altitude and the depths of the caustics follow the level, and so do floating bodies. Terrain, quays and fixed structures stay put, so the water climbs and uncovers them.
Tide.File holds the harmonic constants (amplitude [m] and Greenwich phase lag [deg, UTC] per constituent, and the mean level above the scene's z = 0); Tide.Constituents, Tide.Amplitudes and Tide.Phases give them inline. Get them for a station by fitting a year of predictions: examples/input/tide/fit_tide.py fits the 30 constituents that Tide.* knows to a level series, and fetches Kartverket's predictions for a Norwegian port (--fetch LAT LON YEAR; CC BY 4.0, credit "Kartverket (Norwegian Mapping Authority), Hydrographic Service"). trondheim_tide.json next to it is Trondheim's, relative to mean sea level (1.7 cm rms against Kartverket five years later). Mean sea level is 0.065 m below NN2000 there, so a scene in NN2000 heights sets Tide.MeanLevel = "-0.065". The level is the same everywhere (no tidal currents).
A SurfaceWake per vessel draws its Kelvin waves, foam and calm trail on the PBR sea (connect the vessel's Position and Velocity; see the wakes page, section The wake on the sea surface). Visual only. Reference scene vessel_wake.xml (Gunnerus at 10 kn).
Seeing more under water. Realistic water hides what lies a few metres away. For inspection: the camera's flashlight (key L, <Visualization><Flashlight Enabled Intensity Colour Type Cone Range>, FhSim core) lights the seabed, kelp and every physically based object in its beam, fading with the water along the way, and shows its beam in the water; Visual.ClarityScale (> 1) lets all light travel further than physical; a clearer Visual.WaterType too.
| Parameter | Use |
|---|---|
Visual.Caustics | Strength of the caustics and light shafts (1). |
Visual.MarineSnow | Density of the suspended particles around a camera under water (1). |
Visual.SeabedRockShare, Visual.SeabedMudDepth, Visual.SandRipples | The look of the seabed: rock patches, the depth where it turns to mud, sand ripples. |
Visual.SeabedRocks | Loose rocks (1; 0 for none). |
Visual.Kelp, Visual.KelpDepth | A kelp bed where the seabed is shallower than the kelp depth (off by default). It bends with the current and the waves. |
Engineering clarity. For a picture of a net or a structure in turbid water, where the physical picture hides it. All four options are for inspection and are not physical. Their defaults give the physical picture.
| Option | Where | Use |
|---|---|---|
NetFarOpacity | NetStructure (fhsim_marine_elements) | 0 to 1, default 0. Draws a net that is too fine to resolve with at least this opacity. |
Visual.DepthDimming | Environment | 1 or 0, default 1. 0 lights objects, the light scattered in the water, the marine snow and the camera flashlight as at the surface: the light does not dim with depth. The caustics still fade with depth. The attenuation along the line of sight stays, so use Visual.ClarityScale or Visual.UnderwaterVisibility to see further. |
Visual.UnderwaterVisibility | Environment | How far a black target is seen [m], instead of Visual.ClarityScale. It gives ClarityScale = c_green V / 4.8, where c_green is the beam attenuation of the configured water in green (it follows Visual.WaterType, Visual.Turbidity and the Custom water). In the default water 50 m gives ClarityScale 3.0 and 200 m gives 12.0. A value below the water's own visibility gives ClarityScale 1 and one warning. Giving both Visual.UnderwaterVisibility and Visual.ClarityScale is an error. A preset's ClarityScale does not count: the visibility replaces it. |
Visual.SurfaceVisibility | Environment | How far a black target is seen [m] when the camera is above the mean surface, with the same conversion and the same warning as Visual.UnderwaterVisibility. The water body, the seabed and the objects seen through the surface, and the fog of the underwater pass, use it. Under water the camera uses Visual.UnderwaterVisibility or Visual.ClarityScale. Not given: the clarity is the same above and under water. Use it for clear water under water and a normal, opaque-looking sea from above, for example Visual.UnderwaterVisibility = "800" with Visual.SurfaceVisibility = "30". It does not conflict with Visual.ClarityScale. |
Exposure, tone mapping, bloom, auto-exposure and anti-aliasing belong to the render pipeline, which is FhSim core's, so they are attributes of the <Rendering> child of <Visualization>, not Environment parameters:
| Attribute | Use |
|---|---|
Exposure | Brightness of the whole picture (1). |
AutoExposure | 0: fixed exposure (reproducible pictures). Up to 1: the exposure follows the mean brightness of the picture, with a time constant AdaptationTime (1.5 s), aiming at ExposureKey (0.14, which leaves a daylight scene of the procedural sky unchanged). 0.75 lifts a dark storm by about one stop. |
Bloom | Glow around light brighter than display white (the sun, its glints); 0.05 by default, 0 for none. Classic objects (display colours up to white) never bloom. |
AntiAliasing | FXAA (default) or None. |
Tonemapper | Knee keeps classic objects as they are; ACES is filmic. |
Debug | Luminance shows the luminance in false colour (green is display white). |
Shadows, ShadowDistance | Sun shadows of vessels and structures, on themselves and on the water (on; 250 m square in front of the camera). |
ShadowCascades | Finer sun shadow maps nearer the camera (core ADR 0041): 2 by default, sharp shadows of a small boat on itself within about 60 m; 3 for closer still, 1 for one map. The water takes the coarsest map only (its pass is at Ogre's 16 texture units). |
Quality | Low, Medium (default) or High: one setting for the shadows, parallax and surface detail; an attribute written beside it wins. Low for a slow machine, High for close-up pictures. |
The full list is in the FhSim user manual (OBSERVERS section, <Rendering>). All the Environment's parameters, with their ranges and defaults, are listed in its parameter documentation.
Lamps light the PBR picture at dusk, at night and under water: deck floodlights, searchlights, the lamps of a fish farm or an ROV. Each is a <LocalLight> element of <Visualization> (or a SimObject publishes its own; core ADR 0027):
| Attribute | Use |
|---|---|
Position | Where the lamp is, NED [m] (needed). |
Direction, Cone | The beam's axis and the half-angle of its edge [deg]; without Cone, a lamp that shines all round. |
Intensity | Luminous intensity on the axis [cd]: about 50 for a masthead light, 1e3 to 1e4 for a deck floodlight. |
Colour | Its hue (linear RGB). |
Range | It fades out to this distance [m]. |
ReflectionOnly | 1: lights nothing, only shows in the waves (navigation and shore lights far away). |
CastShadows | 1: a spot (with Cone) casts shadows (core ADR 0037): of the vessels and structures on each other, on the water and on the seabed. At most <Rendering SpotShadows> lamps (2) do at once; the water receives the first one's shadow only (its pass is at Ogre's 16 texture units). |
The lamps light the vessels and structures that have PBR materials, the seabed and the kelp, the foam and the water, and under water their beams glow in it. On the sea every lamp above the water also shows as a glint, drawn out by the waves into the long broken streak of harbour lights; up to 16 more lights do only that. The candela are taken against the sky's light: a floodlight shows at night and not at noon. Dim light (below about 100 lux) is lifted as the eye lifts it, so a navigation light's reflection shows at night although it lights nothing. At most 8 lamps light the scene at once (the strongest near the camera); the camera's flashlight (key L) is one of them. A spot with CastShadows="1" casts shadows: a work light on a deck at dusk leaves the shadow of the rail, a crane or a hanging load on the deck, on the water it lights (in its light and in its glints) and on the seabed below. In fog, rain and haze the lamps glow and floodlights show their beams; fog and rain also dim their reflections. Reference scene night_lights.xml (try it with Visual.Weather = "Fog" or "Rain").
Wet surfaces. Rain makes the PBR materials of vessels and structures above the water darker and glossy (more on decks than on walls); they get wet within half a minute and dry over about a quarter of an hour after the rain. Thick fog dampens them a little. Visual.Wetness (0 to 1, tunable) fixes how wet they look; below 0 (the default) it follows the weather.
Drops on the lens. In rain the camera's lens collects drops (more when it looks up), over a rough sea a low camera catches spray, and when the camera comes up out of the water the lens is covered and the drops run off over a few seconds. Each drop shows the scene upside down and blurred. Visual.LensDrops (tunable) scales them; 0 turns them off (for clean pictures or analysis).
In FhSimUI, the panel Parameters (key F9, or View → Parameters) lists the parameters that may change while the simulation runs (FhSim core ADR 0025), with sliders within their ranges. A change shows in the next frame, also while paused; Copy XML copies the tuned values as attributes to paste into the input file. The Environment's tunable parameters (PBR look only):
| Parameter | Range in the panel |
|---|---|
Visual.WaterType | Custom or a Jerlov type |
Visual.Turbidity | 0 to 20 |
Visual.ClarityScale | 1 to 100 |
Visual.DepthDimming | 0 or 1 |
Visual.SurfaceOpacity | 0 to 1 |
Visual.SkyIntensity | 0 to 10 |
Visual.FoamAmount, Visual.ContactFoam, Visual.CrestScatter, Visual.Caustics | 0 to 5 |
Visual.Reflections | 0 to 1 |
Visual.Visibility | 100 to 200 000 m |
Visual.FogVisibility (0: no fog), Visual.FogHeight | 0 to 20 000 m, 1 to 2000 m |
Visual.TailDisplacement, Visual.WaveLodBias | 0 to 3, 0.1 to 10 |
Visual.ShelterRipples (with a water map) | 0 to 1 |
Visual.SunTimeShift (with Visual.SunDirection = "Time") | −24 to 24 h |
Visual.RainRate | 0 to 50 mm/h |
Visual.FogBanks, Visual.FogBankSize | 0 to 1, 50 to 20 000 m |
Waves.Hs, Waves.MeanPeriod, Waves.MainDirectionDeg (spectrum waves; physics too) | 0 to 20 m, 1 to 25 s, −360 to 360° |
The density of the marine snow keeps the turbidity of the start. A new sea state fades in over 8 s, for the physics (floating bodies, loads) and the picture alike, applied between two steps.
Environment parameters; for the camera look add <Rendering AutoExposure="0.75" Bloom="0.08"/> under <Visualization>.
A sunny day at sea
A storm
Sunset
A fish farm in a fjord, nets seen under water
Sea fog
A kelp forest
The reference scenes in examples/input/reference_scenes/ show these looks with fixed seeds; render them with render_reference_scenes.py --style PBR (add --rendering AutoExposure=0.75 and the like for <Rendering>).
Measured at 1920 x 1080 on an integrated GPU (AMD Radeon 8050S): the classic look takes about 1 ms of GPU time per frame, the PBR look about 2.5 to 3 ms above water (with bloom, auto-exposure and FXAA: +0.4 ms), about 3 ms under water with the seabed, rocks and kelp. A discrete GPU of the last five years needs a fraction of that. At start-up the procedural sky takes about 0.5 s.
Visual.Reflections), and less on rough water.Waves.ShelterMap and Current.WaterMap. A river above sea level (its own water level) is not drawn yet; the camera under the water in a sheltered area sees the caustics of the sheltered surface.Visual.OceanStyle = "PBR": look in ogre.log for [fhsim] Render pipeline warnings (the hardware fallback, or <Rendering Pipeline="Off">).<Rendering Exposure>, or <Rendering AutoExposure="0.75">. With Visual.GpuTiming = "True" the log shows the auto-exposure's mean luminance and correction every 10 s.Visual.OceanDebug = "Mirror" shows the sea as a flat mirror with the sun marked red.<Rendering Debug="Luminance"> shows the luminance in false colour (green is display white).Visual.OceanStyle = "Classic" (the default) has three tiers of ocean surface, chosen by Visual.Quality:
| Tier | Visual.Quality | What the sea surface draws |
|---|---|---|
| Fast | 0 to 3 | The original simple shading. |
| Fair | 4 to 6 | A dark water colour, a Fresnel reflection of the sky, a sun glitter path, and an opacity that grows with the water depth under the camera (seen from above). |
| Nice | 7 to 10 | All of Fair, plus whitecaps and the foam of the vessels' wakes. |
The Nice sea adds four detail ripple layers (normal maps repeating at about 24, 13, 6.7 and 3.3 m) on top of the waves, with strength 0.3 and the finest layer at half weight (owner 2026-12-01, chosen from short videos; it was 0.5 with all layers at full weight).
The Fair and Nice sea never gets darker than a dark blue-grey (sRGB 13, 19, 27; owner 2026-12-01: 0.6 of the first floor, it only lifts the black patches a little), so a ripple facet that reflects the dark lower half of the sky cube does not show as near-black. Brighter pixels are unchanged.
Seen from above, the dark facets of the Fair and Nice sea are partly see-through: their opacity drops to 0.7 of its value (kClassicDarkAlpha in OceanSurface/functions.h), and facets with luminance 0.25 and above are unchanged. An object under the surface then shows faintly behind the surface pattern, so you can see it and see that it is below the surface. The level was chosen from stills of a red test cylinder (0.2 to 1.0, owner 2026-12-01).
From above, the surface is more opaque the deeper the water under the camera. Visual.SurfaceVisibility sets how many metres of water make it opaque (default 15 m for the classic look): the opacity is the largest of the Fresnel reflection, 1 - exp(-2 depth / (V cos)) (depth under the camera, V the visibility, cos the angle of the sight line to the surface normal) and the old distance term. In shallow water the seabed shows through. From below nothing changes: the fog depends on the distance only and structures stay clear.
At Nice, white foam shows where the crests of the realised waves break. Visual.FoamAmount scales how much (1: the coverage of Monahan and O'Muircheartaigh (1980) for the wind speed, as in PBR; 0: no whitecaps). The classic foam is white, lit by the sun and the sky. A whitecap stays where its crest broke: it grows in over about 1.5 s and fades out by 5.5 s. Thin foam is see-through, thick foam is opaque with a lace of bubble walls. Far away, where a pixel is wider than the foam patches, an even cover is drawn instead, so the whitecaps reach the horizon. It has none of PBR's long-lived residual foam streaks. A sea without waves (Visual.VisualizeWaves = "False") has no whitecaps.
Vessels with a SurfaceWake SimObject (see wakes.md) leave white foam in their wake at Nice: the bow wave, the churned water at the stern and the trail behind. The Kelvin waves (the V of waves behind the hull) are drawn too. Foam shows from above the water only.