This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
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

Unigine provides realistic water with complex behavior and ability to interact with rigid bodies. It can represent different types of water basins, from oceans, seas, natural lakes and streams to mud, mires, slush and other types of liquids.

In Unigine, water is implemented as 2 types of objects:

  •   Global Water is an infinitely spread mesh with auto-tessellation that represents a boundless ocean (the wireframe of the water is not scaled; regardless of the camera position it always stays the same). It is optimized so the GPU is not overloaded. Features:
    • Support for the underwater mode.
    • The physical interaction with scene objects is not available.
    • Limited to a single water level: the filling level of water always remains the same. So, if you need to create, for example, mountain lakes or water flows with height difference, you should use a water mesh.
  •   Water Mesh is a loaded mesh used to create finite basins of an arbitrary form. Features:
    • Support for buoyancy simulation (it can have a body assigned).
    • The underwater mode is not available for the water mesh.
    • Multiple water levels: you can create, for example, a water flow with height difference located above the sea level (i.e. the filling level of global water).

See also#

Water Surfaces#

Both the global water and the water mesh have a surface approximating optical and dynamic behavior of water (the Surfaces section of the Parameters window):

The surface (ObjectWaterMesh) or water_surface (ObjectWaterGlobal) adds the following effects:

  • Surface waves — geometrical waves and rippling produced by surface displacement according to the normal map (see the water_mesh_base material and global water), as well as waves conditioned by the physical interaction with objects (in case the water mesh is used).
  • Reflection — specular reflection of direct sunlight and skylight from the water surface. Reflection can be:
    • Dynamic. In this case, water reflections are set up by adjusting parameters in the Reflection field of the Parameters tab of the Materials window.
    • Static. In this case, water reflections are baked into a cube map that should be specified in the Reflection field of the Textures tab of the Materials window.
  • 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.
  • White caps in water. They look like foam, except that they are spread all over the water surface.

Water Interaction with Field Spacer#

Some areas of the water surface can be cut out by using a Field Spacer. It allows you to dynamically adapt the water surface to an object placed into water. For example, you can set a field spacer for a boat, so that water is not rendered inside this boat.

If a material assigned to a water object allows for interaction with FieldSpacer objects, you can specify the field mask that specifies an area of the Field Spacer node to be applied to water. This mask must match the mask set for the Field Spacer node.

Last update: 2022-01-28
Build: ()