|
WaterObject Class Reference
[Water]
Abstract base class for representing a body of water. More...
Public Attributes | |
WaterObject | |
ColorI | baseColor |
Changes color of water fog. | |
float | density |
Affects buoyancy of an object, thus affecting the Z velocity of a player (jumping, falling, etc. | |
bool | emissive |
When true the water colors don't react to changes to environment lighting. | |
float | foamAmbientLerp |
Point2F | foamDir [2] |
float | foamMaxDepth |
float | foamOpacity [2] |
float | foamRippleInfluence |
float | foamSpeed [2] |
filename | foamTex |
Diffuse texture for foam in shallow water (advanced lighting only). | |
Point2F | foamTexScale [2] |
applied to the surface. | |
float | fresnelBias |
Extent of fresnel affecting reflection fogging. | |
float | fresnelPower |
Measures intensity of affect on reflection based on fogging. | |
string | liquidType |
Liquid type of WaterBlock, such as water, ocean, lava Currently only Water is defined and used. | |
float | overallFoamOpacity |
float | overallRippleMagnitude |
Master variable affecting entire surface. | |
float | overallWaveMagnitude |
Master variable affecting entire body of water's undulation. | |
Point2F | rippleDir [3] |
Modifies the direction of ripples on the surface. | |
float | rippleMagnitude [3] |
Intensifies the vertext modification of the surface. | |
float | rippleSpeed [3] |
Modifies speed of surface ripples. | |
filename | rippleTex |
Normal map used to simulate small surface ripples. | |
Point2F | rippleTexScale [3] |
Intensifies the affect of the normal map applied to the surface. | |
ColorF | specularColor |
Color used for specularity on the water surface ( sun only ). | |
float | specularPower |
Power used for specularity on the water surface ( sun only ). | |
float | viscosity |
Affects drag force applied to an object submerged in this container. | |
Point2F | waveDir [3] |
Direction waves flow toward shores. | |
float | waveMagnitude [3] |
Height of water undulation. | |
float | waveSpeed [3] |
Speed of water undulation. | |
Basic Lighting | |
float | clarity |
Relative opacity or transparency of the water surface. | |
ColorI | underwaterColor |
Changes the color shading of objects beneath the water surface. | |
Reflect | |
string | cubemap |
Cubemap used instead of reflection texture if fullReflect is off. | |
bool | fullReflect |
Enables dynamic reflection rendering. | |
float | reflectDetailAdjust |
scale up or down the detail level for objects rendered in a reflection | |
float | reflectivity |
Overall scalar to the reflectivity of the water surface. | |
int | reflectMaxRateMs |
Affects the sort time of reflected objects. | |
bool | reflectNormalUp |
always use z up as the reflection normal | |
float | reflectPriority |
Affects the sort order of reflected objects. | |
int | reflectTexSize |
The texture size used for reflections (square). | |
bool | useOcclusionQuery |
turn off reflection rendering when occluded (delayed). | |
Misc | |
float | depthGradientMax |
Depth in world units, the max range of the color gradient texture. | |
filename | depthGradientTex |
1D texture defining the base water color by depth | |
Distortion | |
float | distortEndDist |
Max distance that distortion algorithm is performed. The lower, the more distorted the effect. | |
float | distortFullDepth |
Determines the scaling down of distortion in shallow water. | |
float | distortStartDist |
Determines start of distortion effect where water surface intersects the camera near plane. | |
Sound | |
SFXAmbience | soundAmbience |
Ambient sound environment when listener is submerged. | |
Underwater Fogging | |
float | waterFogDensity |
Intensity of underwater fogging. | |
float | waterFogDensityOffset |
Delta, or limit, applied to waterFogDensity. | |
float | wetDarkening |
The refract color intensity scaled at wetDepth. | |
float | wetDepth |
The depth in world units at which full darkening will be received, giving a wet look to objects underwater. | |
Static Public Attributes | |
static bool | isRenderable |
Disables rendering of all instances of this type. | |
static bool | isSelectable |
Disables selection of all instances of this type. | |
static bool | wireframe |
If true, will render the wireframe of the WaterObject. |
Detailed Description
Abstract base class for representing a body of water.
WaterObject is abstract and may not be created. It defines functionality shared by its derived classes.
WaterObject exposes many fields for controlling it visual quality.
WaterObject surface rendering has the following general features:
- Waves represented by vertex undulation and user paramaters.
- Ripples represented by a normal map and user parameters.
- Refraction of underwater objects.
- Dynamic planar reflection or static cubemap reflection.
- Paramable water fog and color shift.
It will, however, look significantly different depending on the LightingManager that is active. With Basic Lighting, we do not have a prepass texture to lookup per-pixel depth and therefore cannot use our rendering techniques that depend on it.
In particular, the following field groups are not used under Basic Lighting:
- Underwater Fogging
- Misc
- Distortion
- And foam related fields under the WaterObject group.
WaterObject also defines several fields for gameplay use and objects that support buoyancy.
Member Data Documentation
ColorI WaterObject::baseColor |
Changes color of water fog.
float WaterObject::clarity |
Relative opacity or transparency of the water surface.
string WaterObject::cubemap |
Cubemap used instead of reflection texture if fullReflect is off.
float WaterObject::density |
Affects buoyancy of an object, thus affecting the Z velocity of a player (jumping, falling, etc.
Depth in world units, the max range of the color gradient texture.
filename WaterObject::depthGradientTex |
1D texture defining the base water color by depth
Max distance that distortion algorithm is performed. The lower, the more distorted the effect.
Determines the scaling down of distortion in shallow water.
Determines start of distortion effect where water surface intersects the camera near plane.
When true the water colors don't react to changes to environment lighting.
Point2F WaterObject::foamDir[2] |
float WaterObject::foamOpacity[2] |
float WaterObject::foamSpeed[2] |
filename WaterObject::foamTex |
Diffuse texture for foam in shallow water (advanced lighting only).
Point2F WaterObject::foamTexScale[2] |
applied to the surface.
float WaterObject::fresnelBias |
Extent of fresnel affecting reflection fogging.
Measures intensity of affect on reflection based on fogging.
Enables dynamic reflection rendering.
string WaterObject::liquidType |
Liquid type of WaterBlock, such as water, ocean, lava Currently only Water is defined and used.
Master variable affecting entire surface.
Master variable affecting entire body of water's undulation.
scale up or down the detail level for objects rendered in a reflection
Overall scalar to the reflectivity of the water surface.
Affects the sort time of reflected objects.
always use z up as the reflection normal
Affects the sort order of reflected objects.
The texture size used for reflections (square).
Point2F WaterObject::rippleDir[3] |
Modifies the direction of ripples on the surface.
float WaterObject::rippleMagnitude[3] |
Intensifies the vertext modification of the surface.
float WaterObject::rippleSpeed[3] |
Modifies speed of surface ripples.
filename WaterObject::rippleTex |
Normal map used to simulate small surface ripples.
Point2F WaterObject::rippleTexScale[3] |
Intensifies the affect of the normal map applied to the surface.
Ambient sound environment when listener is submerged.
ColorF WaterObject::specularColor |
Color used for specularity on the water surface ( sun only ).
Power used for specularity on the water surface ( sun only ).
ColorI WaterObject::underwaterColor |
Changes the color shading of objects beneath the water surface.
turn off reflection rendering when occluded (delayed).
float WaterObject::viscosity |
Affects drag force applied to an object submerged in this container.
Intensity of underwater fogging.
Delta, or limit, applied to waterFogDensity.
Point2F WaterObject::waveDir[3] |
Direction waves flow toward shores.
float WaterObject::waveMagnitude[3] |
Height of water undulation.
float WaterObject::waveSpeed[3] |
Speed of water undulation.
The refract color intensity scaled at wetDepth.
float WaterObject::wetDepth |
The depth in world units at which full darkening will be received, giving a wet look to objects underwater.