WaterObject
Abstract base class for representing a body of water.
WaterObject
float
Affects buoyancy of an object, thus affecting the Z velocity of a player (jumping, falling, etc.
float
Affects drag force applied to an object submerged in this container.
string
Liquid type of WaterBlock, such as water, ocean, lava Currently only Water is defined and used.
ColorI
Changes color of water fog.
float
Extent of fresnel affecting reflection fogging.
float
Measures intensity of affect on reflection based on fogging.
float
Power used for specularity on the water surface ( sun only ).
LinearColorF
Color used for specularity on the water surface ( sun only ).
bool
When true the water colors don't react to changes to environment lighting.
Point2F
waveDir [3]
Direction waves flow toward shores.
float
waveSpeed [3]
Speed of water undulation.
float
waveMagnitude [3]
Height of water undulation.
float
Master variable affecting entire body of water's undulation.
filename
Normal map used to simulate small surface ripples.
Point2F
rippleDir [3]
Modifies the direction of ripples on the surface.
float
rippleSpeed [3]
Modifies speed of surface ripples.
Point2F
rippleTexScale [3]
Intensifies the affect of the normal map applied to the surface.
float
rippleMagnitude [3]
Intensifies the vertext modification of the surface.
float
Master variable affecting entire surface.
filename
Diffuse texture for foam in shallow water (advanced lighting only)
Point2F
foamDir [2]
float
foamSpeed [2]
Point2F
foamTexScale [2]
applied to the surface.
float
foamOpacity [2]
float
float
float
float
Reflect
string
Cubemap used instead of reflection texture if fullReflect is off.
bool
Enables dynamic reflection rendering.
float
Overall scalar to the reflectivity of the water surface.
float
Affects the sort order of reflected objects.
int
Affects the sort time of reflected objects.
float
scale up or down the detail level for objects rendered in a reflection
bool
always use z up as the reflection normal
bool
turn off reflection rendering when occluded (delayed).
int
The texture size used for reflections (square)
Underwater Fogging
float
Intensity of underwater fogging.
float
Delta, or limit, applied to waterFogDensity.
float
The depth in world units at which full darkening will be received, giving a wet look to objects underwater.
float
The refract color intensity scaled at wetDepth.
Misc
filename
1D texture defining the base water color by depth
float
Depth in world units, the max range of the color gradient texture.
Distortion
float
Determines start of distortion effect where water surface intersects the camera near plane.
float
Max distance that distortion algorithm is performed. The lower, the more distorted the effect.
float
Determines the scaling down of distortion in shallow water.
Basic Lighting
float
Relative opacity or transparency of the water surface.
ColorI
Changes the color shading of objects beneath the water surface.
Sound
Ambient sound environment when listener is submerged.
Public Static Attributes
bool
Disables rendering of all instances of this type.
bool
Disables selection of all instances of this type.
bool
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 deferred 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.
WaterObject
float density
Affects buoyancy of an object, thus affecting the Z velocity of a player (jumping, falling, etc.
float viscosity
Affects drag force applied to an object submerged in this container.
string liquidType
Liquid type of WaterBlock, such as water, ocean, lava Currently only Water is defined and used.
ColorI baseColor
Changes color of water fog.
float fresnelBias
Extent of fresnel affecting reflection fogging.
float fresnelPower
Measures intensity of affect on reflection based on fogging.
float specularPower
Power used for specularity on the water surface ( sun only ).
LinearColorF specularColor
Color used for specularity on the water surface ( sun only ).
bool emissive
When true the water colors don't react to changes to environment lighting.
Point2F waveDir [3]
Direction waves flow toward shores.
float waveSpeed [3]
Speed of water undulation.
float waveMagnitude [3]
Height of water undulation.
float overallWaveMagnitude
Master variable affecting entire body of water's undulation.
filename rippleTex
Normal map used to simulate small surface ripples.
Point2F rippleDir [3]
Modifies the direction of ripples on the surface.
float rippleSpeed [3]
Modifies speed of surface ripples.
Point2F rippleTexScale [3]
Intensifies the affect of the normal map applied to the surface.
float rippleMagnitude [3]
Intensifies the vertext modification of the surface.
float overallRippleMagnitude
Master variable affecting entire surface.
filename foamTex
Diffuse texture for foam in shallow water (advanced lighting only)
Point2F foamDir [2]
float foamSpeed [2]
Point2F foamTexScale [2]
applied to the surface.
float foamOpacity [2]
float overallFoamOpacity
float foamMaxDepth
float foamAmbientLerp
float foamRippleInfluence
Reflect
string cubemap
Cubemap used instead of reflection texture if fullReflect is off.
bool fullReflect
Enables dynamic reflection rendering.
float reflectivity
Overall scalar to the reflectivity of the water surface.
float reflectPriority
Affects the sort order of reflected objects.
int reflectMaxRateMs
Affects the sort time of reflected objects.
float reflectDetailAdjust
scale up or down the detail level for objects rendered in a reflection
bool reflectNormalUp
always use z up as the reflection normal
bool useOcclusionQuery
turn off reflection rendering when occluded (delayed).
int reflectTexSize
The texture size used for reflections (square)
Underwater Fogging
float waterFogDensity
Intensity of underwater fogging.
float waterFogDensityOffset
Delta, or limit, applied to waterFogDensity.
float wetDepth
The depth in world units at which full darkening will be received, giving a wet look to objects underwater.
float wetDarkening
The refract color intensity scaled at wetDepth.
Misc
filename depthGradientTex
1D texture defining the base water color by depth
float depthGradientMax
Depth in world units, the max range of the color gradient texture.
Distortion
float distortStartDist
Determines start of distortion effect where water surface intersects the camera near plane.
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.
Basic Lighting
float clarity
Relative opacity or transparency of the water surface.
ColorI underwaterColor
Changes the color shading of objects beneath the water surface.
Sound
SFXAmbience soundAmbience
Ambient sound environment when listener is submerged.
Public Static Attributes
bool isRenderable
Disables rendering of all instances of this type.
bool isSelectable
Disables selection of all instances of this type.
bool wireframe
If true, will render the wireframe of the WaterObject.