This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
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
Работа с контентом
Оптимизация контента
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

water_mesh_base

The water_mesh_base material simulates water and other liquids and is applied to the Water Mesh object.

Prior Knowledge
This article assumes you have prior knowledge of the following topics:

States#

In the States tab, you can set rendering passes and available options. Enabling some states activates additional textures and parameters in the Textures and Parameters tabs respectively.

Material window, States tab

Default#

The Deferred Buffers state specifies if deferred buffers of the material should be filled.

Options#

FieldSpacer Interaction Enables the effect of FieldSpacer object on the Water Mesh object.
Additional Details
Provides additional detail layers for more detailed ripple effect. Enabling the option activates additional detail layers in the Waves Animation set of parameters.
Additional Details state disabled.
Additional Details state enabled.
Caustics
Enables the effect of light rays refraction by the water surface. Enabling the option activates the Caustics set of parameters.
Caustics state disabled
Caustics state enabled
Caustics Distortion
Removes pixelation and makes caustics look smoother. When smoothing is not required, you can disable this option to gain performance.
Caustics Distortion state disabled
Caustics Distortion state enabled
Planar Reflection If enabled, this state allows using planar reflections on the water surface instead of SSR.
Enabling the option activates a set of Planar Reflection states and Planar Reflection parameters.

Post Processing#

Post processing options activate post processing effects for the material.

  • DOF — enables the depth of field effect.
  • Motion blur — enables the motion blur effect.

Planar Reflection#

This set of states is enabled by toggling on the Planar Reflection option.

Map Size The size of the planar reflection map, in pixels: the higher the value, the better the quality is.
Available sizes of the map are:
  • 128 — creates a reflection image with 128x128 resolution.
  • 256 — creates a reflection image with 256x256 resolution.
  • 512 — creates a reflection image with 512x512 resolution.
  • 1024 — creates a reflection image with 1024x1024 resolution.
  • 2048 — creates a reflection image with 2048x2048 resolution.
  • 4096 — creates a reflection image with 4096x4096 resolution.
  • Quart height — creates a reflection image with the resolution height/4 x height/4, where height is an application window height.
  • Half height — creates a reflection image with the resolution height/2 x height/2, where height is an application window height.
  • Height — creates a reflection image with the resolution height x height, where height is an application window height.
Show Pivot Displays the pivot plane that shows the direction of reflective surface. By specifying the direction of planar reflection, you can create a reflection surface even if it was exported at an angle.

Textures#

Material window, Textures tab
Foam This texture specifies foam on water. The engine samples the foam texture twice to create plausibility of the real world foam behavior.
The texture is 3-channeled:
  • RGB values store the color.
Normal Detail
The Normal Detail map stores normal information required to achieve an additional (detail) effect of Normal Mapping. Normal map helps to create ripples (cat's-paw effect) on the water surface.
The texture is 2-channeled:
  • RG values store two components of a surface normal.
  • B value is calculated based on the R and G values in run-time.
With absolutely white normal map
With ripple-simulated normal map
Depth LUT LUT texture that shows the color of the bottom. Depending on the depth, the engine chooses the color of the water and multiplies it by the depth LUT texture. This generated LUT shows how deep the photon goes through water until completely scattered.
The texture is 4-channeled:
  • RGB values store color.
  • A value is used to create "transparent" water near the shore. In other words, it defines the fog density.
Caustic The 3D Caustic texture determines the pattern of light rays refracted by the water surface.
The texture is 1-channeled:
  • R value defines the caustics pattern.

Parameters#

Waves Radius#

The Waves Radius parameter sets the radius of waves on the water surface.

Waves Animation#

Waves for the water_mesh material are created by using the Normal Detail map. The engine performs sampling from the map and creates ripples using several detail layers.

There are two base detail layers (Detail 0 and 1), additional ripples (Detail 2-4) are enabled by toggling on the Additional Details parameter.

Each detail layer has the following parameters:

Detail UV Transform This parameter specifies the transformation of the detail map sampling.
The first two values are the scale texture coordinates along the X and Y axes. The third and forth specify the wind force and direction for the U and V axes.
Detail Intensity This parameter sets the intensity of the sample of the detail normal map.

Foam Parameters#

Patch 0 UV Size Size of the first foam texture patch.
Patch 0 UV Speed Speed of the first foam patch.
Patch 1 UV Size Size of the second foam texture patch.
Patch 1 UV Speed Speed of the second foam patch.
Shoreline Intensity Foam intensity near shores or different objects in water.

Subsurface Scattering Parameters#

Color
The water Subsurface Scattering (SSS) color.
Ambient Intensity
Intensity of subsurface scattering for ambient lighting. The lower the value, the faster the light rays dissipate in water.
Intensity Through Waves
Intensity of light rays passing through waves. The lower the value, the faster the light rays dissipate in water.
Intensity Around Foam
Intensity of subsurface scattering near the foam areas.
Diffuse Intensity Intensity of subsurface scattering for diffuse lighting.

Underwater Parameters#

The Underwater parameters adjust the underwater part of the water_mesh_base material.

The final color of underwater is calculated using the following formula:

Final Color Formula
FinalColor = FogColor * SunLighting^(1/FogSunLighting) + FogColor * EnvLighting^(1/FogEnvLighting)

FogColor, FogSunLighting, and FogEnvLighting are specified in the material. The other parameters (Sun and Environment lighting) are calculated according to the sun lighting and environment lighting of the scene. In fact, this formula defines how the sun and the environment lights affect the final underwater color.

Fog Transparency
The transparency of the underwater fog. The higher the value, the more transparent the underwater fog is.
Fog Transparency: 5.0
Fog Transparency: 30.0
Fog Lighting Depth The distance from the water surface, in units, up to which the light affects the underwater color.
Lighting Offset Height offset for lighting.
Fog Color
The underwater fog color. The Sun and Environment lighting affect this parameter to create the final underwater fog color.
Fog Environment Lighting Degree of impact of the environment lighting on the final underwater color.
Fog Sun Lighting Degree of impact of the sun lighting on the final underwater color.
Shafts Intensity Intensity of the underwater sun shafts.

Planar Reflection#

This group of parameters contains Planar Reflection Parameters.

Default#

Material Mask The material bit mask. The decal can be projected onto the water surface only if the material mask of the decal material matches this mask.

Other#

Reflection Roughness
The environment reflection roughness of the water surface. This parameter helps to tweak reflections on the water surface relative to the environment.
Reflection Occlusion
The occlusion factor for environment reflections on parts of the water surface with negative normals. Using this parameter enables simulation of reflection of waves on the water surface removing too bright areas on waves close to the horizon.
  • By the minimum value of 0, no occlusion is performed for reflections of waves, no matter what normals the water surface has.
  • By the higher values, occlusion is performed for reflections on parts of the water surface with negative normals that have a certain slope. The higher the value, the less intensive reflections are on the surface parts with negative normals.

Reflection Occlusion Slope Slope of negative normals of the water surface, at which occlusion is performed for wave reflections.
Refraction Scale
Scale of the water refraction.
Diffuse Distortion Distortion of decals projected onto water.
Soft Intersection Soft intersection of water with the shoreline and surfaces of objects.

Caustics#

Notice
The Caustics state should be enabled for this set of parameters to be effective.
UV Transform
UV Transform coordinates for the caustic texture.
Distance Fade
Distance from the water surface downwards, at which light shapes fade, in units.
Distance Fade: 20.0
Distance Fade: 40.0
Animation Speed Movement speed of the light patterns.
Brightness Brightness of the light shapes.
Last update: 24.11.2020
Build: ()