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).
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):
- Surface waves — geometrical waves and rippling produced by surface displacement according to normal maps (see the water_mesh_base and water_global_base material), 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.