FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
visual::PbrOceanSettings Struct Reference

#include <VisualSettings.h>

+ Collaboration diagram for visual::PbrOceanSettings:

Public Member Functions

double ClassicSurfaceVisibility () const
 
double SurfaceClarity () const
 

Public Attributes

std::vector< double > sunDirection
 Visual.SunDirection [azimuth from north towards east, elevation], deg; empty: detect.
 
double rainRate = 0.0
 Visual.RainRate [mm/h] >= 0: rain (streaks, rings on the water, lower visibility); 0: none.
 
bool sunFromTime = false
 Visual.SunDirection = "Time": the sun from StartTime, Visual.Latitude, Visual.Longitude and the simulation time.
 
double latitude = 0.0
 Visual.Latitude [deg], north positive (with "Time").
 
double longitude = 0.0
 Visual.Longitude [deg], east positive (with "Time").
 
double sunTimeShift = 0.0
 Visual.SunTimeShift [h]: added to the sun's clock (with "Time"; tunable: the time of day).
 
double startTime = 0.0
 StartTime (seconds since 1970, UTC), copied from the EnvironmentConfig (with "Time"); with sunFromClock the clock's.
 
bool sunFromClock = false
 Visual.TimeOfDay = "Now": sunFromTime with startTime from the computer's clock (whole seconds) when chosen, minus the simulation time then.
 
double sunIntensity = -1.0
 Visual.SunIntensity, sun irradiance in units of the mean sky radiance; < 0: detect.
 
double skyIntensity = 1.0
 Visual.SkyIntensity, scale of the sky radiance on the water.
 
double windSpeed = -1.0
 Visual.WindSpeed [m/s] for the unresolved slopes; < 0: from Hs.
 
std::vector< double > waterAbsorption = {0.45, 0.07, 0.04}
 Visual.WaterAbsorption a [1/m], RGB.
 
std::vector< double > waterBackscatter = {0.004, 0.005, 0.006}
 Visual.WaterBackscatter b_b [1/m], RGB.
 
double crestScatter = 1.0
 Visual.CrestScatter, strength of light through wave crests.
 
double visibility = 30000.0
 Visual.Visibility [m], haze towards the horizon.
 
double fogVisibility = 0.0
 Visual.FogVisibility [m] >= 0: visibility in the fog at sea level; 0: no fog.
 
double fogHeight = 50.0
 Visual.FogHeight [m] > 0: height over which the fog thins by a factor e.
 
double fogBanks = 0.0
 Visual.FogBanks in [0, 1]: 0 an even layer; 1 banks with clear lanes between them.
 
double fogBankSize = 1500.0
 Visual.FogBankSize [m]: typical size of the banks.
 
double lensDrops = 1.0
 Visual.LensDrops >= 0: scale of the drops and spray on the camera's lens (ADR 0009 D38); 0: none.
 
double wetness = -1.0
 Visual.Wetness in [0, 1]: how wet surfaces above the water look (core ADR 0028); < 0: from the rain and fog.
 
MoonStyle moonStyle = MoonStyle::Natural
 Visual.MoonStyle: "Natural", "Bright" or "Blood" (with "Time" or Visual.MoonDirection).
 
double moonSize = 1.0
 Visual.MoonSize > 0: factor on the moon's angular size (on top of the style).
 
double moonBrightness = 1.0
 Visual.MoonBrightness >= 0: factor on the moon's light (on top of the style).
 
std::vector< double > moonDirection
 Visual.MoonDirection [azimuth, elevation] deg: a fixed, full moon; empty: from the time.
 
std::string waterMap
 Visual.WaterMap: path of a water map (shelter, flow; environment::WaterMap); empty for none.
 
double shelterRipples = 0.3
 Visual.ShelterRipples in [0, 1]: share of the small-scale roughness kept where the shelter is 0.
 
double surfaceOpacity = 1.0
 Visual.SurfaceOpacity in [0, 1]; < 1 shows the scene below (not physical).
 
double waveLodBias = 1.0
 Visual.WaveLodBias > 0; larger filters short components earlier.
 
double tailAmplitude = 1.0
 Visual.TailAmplitude >= 0: scale of the spectral tail (1: the saturation spectrum, at most 90 % of the unresolved slope variance).
 
double tailDisplacement = 1.0
 Visual.TailDisplacement >= 0: scale of the tail's displacement of the surface (0: normals only).
 
std::string waterType = "Custom"
 Visual.WaterType: "Custom" (WaterAbsorption/WaterBackscatter) or a Jerlov type (WaterTypeNames()).
 
double turbidity = 1.0
 Visual.Turbidity >= 0: scale of the backscattering (particles) of the water type.
 
double clarityScale = 1.0
 Visual.ClarityScale >= 1: light travels this much further under water than physical (for analysis).
 
double underwaterVisibility = 0.0
 Visual.UnderwaterVisibility [m] > 0: sets clarityScale so that a black target is seen this far in the configured water; 0: not given.
 
double surfaceClarityScale = 0.0
 Visual.SurfaceVisibility [m] as a ClarityScale >= 1, for the water seen from above; 0: not given (the same as clarityScale).
 
double surfaceVisibility = 0.0
 Visual.SurfaceVisibility [m] as given; 0: not given.
 
int depthDimming = 1
 Visual.DepthDimming 1 or 0: 1 dims light with depth (physical); 0 lights objects as at the surface.
 
double contactFoam = 1.0
 Visual.ContactFoam >= 0: foam where objects pierce the surface.
 
double caustics = 1.0
 Visual.Caustics >= 0: strength of the caustics and light shafts under water.
 
double marineSnow = 1.0
 Visual.MarineSnow >= 0: density of the suspended particles seen under water (times Visual.Turbidity).
 
double reflections = 1.0
 Visual.Reflections in [0, 1]: strength of the screen-space reflections of vessels and structures in the water (0: the sky only).
 
double foamAmount = 1.0
 Visual.FoamAmount >= 0: scale of the whitecap coverage (1: Monahan and O'Muircheartaigh 1980; 0: no foam).
 
OceanDebug debug = OceanDebug::None
 Visual.OceanDebug.
 

Static Public Attributes

static constexpr double kClassicSurfaceVisibility = 15.0
 

Detailed Description

Settings of the PBR ocean surface (Visual.OceanStyle = "PBR"). Plain data, testable without visualization.

Negative values of sunIntensity and windSpeed, and an empty sunDirection, mean "derive it": the sun from the sky texture, the wind from the significant wave height of the realised components.

Member Function Documentation

◆ ClassicSurfaceVisibility()

double visual::PbrOceanSettings::ClassicSurfaceVisibility ( ) const
inline
Returns
The visibility [m] of the water seen from above, for the classic fair and nice sea (Visual.SurfaceVisibility, else kClassicSurfaceVisibility).

◆ SurfaceClarity()

double visual::PbrOceanSettings::SurfaceClarity ( ) const
inline
Returns
The ClarityScale of the water seen from above the surface (Visual.SurfaceVisibility, else clarityScale).

Member Data Documentation

◆ kClassicSurfaceVisibility

constexpr double visual::PbrOceanSettings::kClassicSurfaceVisibility = 15.0
staticconstexpr

[m] used by the classic look when Visual.SurfaceVisibility is not given.


The documentation for this struct was generated from the following file: