This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Water

A water object represents infinitely spread water with auto-tessellation (wireframe of the water is not scaled - regardless of the camera position it stays the same). This type is suitable to represent boundless ocean while not overloading the GPU. However it cannot have a body assigned, and thus does not provide proper physical interaction with scene objects.

See also

  • A ObjectWater class to edit water object via UnigineScript

Surfaces

The water object consists of two surfaces approximating optical and dynamic behavior of the water:

  • Water Surface includes the following effects:
    • Surface waves — geometrical waves and rippling produced by surface displacement according to normal maps (see water_base material), as well as waves conditioned by the physical interaction with objects.
    • Reflection — specular reflection of direct sunlight and skylight from the water surface.
    • Fresnel effect — increase or decrease of water surface reflectance depending on the angle of the camera. In real life when looking at the water straight from above, it is transparent and non-reflective. When looking at the surface from a distance, the view angle becomes smaller and the amount of reflection increases until it seems completely non-transparent.
    • Refraction as light passes through air-water boundary.
    • Foam, spray or bubbles.
  • Volume surface introduces the following:
    • Underwater volume at the bottom. It simulates underwater conditions and adds the visual depth to the rendered water, by growing more opaque as it gets deeper. Underwater volume is available only for infinite water object. To imitate the same effect with water meshes, volumetric fog can be added.
    • Subsurface scattering that allows you to achieve additional play of colors. It becomes most visible at the horizon when the viewing angle is close to the water surface.
    • Caustics — light patterns formed on surfaces underneath the water. This effect is caused by the group of light rays focusing or defocussing because of the water surface is not flat, but rippled rough.

Waves

Depicting water should not be limited to the calm and still aquatic surface in the tranquil weather. Lakes disturbed and rippled by the wind, surf and breaking waves of the ocean can be simulated with four directional waves, summed to create dynamic undulation. This model uses static geometry animated in vertex shader. It delivers credible image, as movement each of the wave is set independently, greatly enhancing the realism and flexibility of adjustment.

The waves have the following characteristics defining their periodic and sinusoidal nature:

Direction

A directional wave (unlike the circular one from the objects, for example) travels along the specified direction:

  • By the minimum value of 0, the wave spreads along the Y axis and is parallel to the X axis.
  • Positive values rotate the wave about the Z axis, meaning the wave direction is slanted counterclockwise relative to its initial spread.
  • Negative values rotate the wave on the water surface clockwise.
  • By the maximum possible values of 180 or -180, the wave direction becomes parallel to the X axis yet again.

Speed

The wave progresses along the water surface with the definite speed:

  • The minimum value of 0 means the wave is inactive.
  • Increasing the value results in waves following each other faster.

Length

The length represents distance between successive crests of the wave:

  • The smaller the value is, the more rippled the water surface is.
  • The higher the value is, the broader formed waves are.

Amplitude

Amplitude determines the distance between the highest and the lowest wave peaks. Together with the length, it sets the wave form.

  • The minimum value of 0 means the wave is not formed.
  • Increasing the value forms higher waves up to tsunami-like ones.
Last update: 2017-07-03
Build: ()