This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Water Mesh

Water Mesh is a loaded mesh usually used to create finite basins of an arbitrary form. The differences between the Water Mesh and the Global Water are the following:Water Mesh — загруженный меш, обычно используемый для создания ограниченных водоемов произвольной формы. Различия между Water Mesh и Global Water заключаются в следующем:

  • The water mesh can provide buoyancy simulation (it can have a body assigned).Water Mesh может имитировать плавучесть (на него можно назначить тело).
  • The underwater mode is not available for the water mesh.Подводный режим недоступен для Water Mesh.
  • The water mesh can have multiple water levels. It means that you can create, for example, a water flow with height difference located above the sea level (i.e. the filling level of global water).Water Mesh может иметь несколько уровней воды . Это означает, что вы можете создать, например, поток воды с перепадом высот, расположенным над уровнем моря (т.е. уровень заполнения Global Water).

See alsoСмотрите также#

Mesh RequirementsТребования к сетке#

Water mesh can be of any arbitrary form and size, but there are also 3 major requirements:Water Mesh может быть любой произвольной формы и размера, но есть 3 основных требования:

  • The mesh should be flat and have a uniform grid.Меш должен быть плоским и иметь равномерную сетку.
  • The mesh should be oriented strictly along the axes.Меш должен быть ориентирован строго по осям.
  • The mesh should have the UV map. Otherwise, normal maps used to simulate water surface rippling won't be applied.Меш должен иметь UV-развертку. В противном случае карты нормалей, используемые для имитации ряби на поверхности воды, не применятся.

Besides these requirements, there are also several important notes:Помимо этих требований, есть еще несколько важных замечаний:

  • Triangulation of polygons in the water mesh is not important for waves simulation as changes are made for mesh vertices. However, triangulation affects the final appearance of water surface during waves simulation. For example, appearance of the water mesh with polygons that are triangulated as follows will differ:Триангуляция полигонов в Water Mesh не важна для моделирования волн, так как изменения вносятся для вершин сетки. Однако триангуляция влияет на окончательный вид поверхности воды при моделировании волн. Например, внешний вид Water Mesh с полигонами, триангулированными следующим образом, будет отличаться:

  • If one mesh is used to represent several water basins with dynamic reflections, they all should be exported on the same level (height) (as dynamic reflections are calculated correctly only for flat horizontal meshes exported on the same level). You still can create a mesh with different heights, however, in this case, you will be limited to static reflections only.Если одна сетка используется для нескольких водоемов с динамическими отражениями , все они должны быть экспортированы на одном и том же уровне (высоте) (поскольку динамические отражения рассчитываются корректно только для плоских горизонтальных мешей, экспортируемых на одном уровне). Конечно, вы можете создать меш с разными высотами, однако в этом случае вы будете ограничены только статическими отражениями.
  • Scale of mesh UV coordinates affects appearance of water waves simulated by using normal maps. For example, if you apply the same normal map to 2 meshes with UV coordinates at the scale of 1:1 and 2:1 correspondingly, waves on the second mesh will be narrower than on the first mesh because of normal map tiling.Масштаб UV-координат меша влияет на внешний вид волн на воде, смоделированных с помощью карт нормалей. Например, если применить одну и ту же карту нормалей к двум сеткам с UV-координатами масштаба 1:1 и 2:1 соответственно, волны на второй сетке будут более узкими, чем на первой, из-за тайлинга карт нормалей.

    UV coordinates at scale of 1:1Координаты UV в масштабе 1:1
    UV coordinates at scale of 2:1Координаты UV в масштабе 2:1
  • To simulate a river flow, make sure that its UV map is rectangular.Чтобы смоделировать течение реки, убедитесь, что ее UV-карта прямоугольная.

Adding Water MeshДобавление Water Mesh#

To add a water object of a finite size to the scene via UnigineEditor:Чтобы добавить в сцену водный объект ограниченного размера через UnigineEditor:

  1. On the Menu bar, click Create -> Water -> Mesh:

    В панели меню нажмитеCreate -> Water -> Mesh:

  2. Choose a mesh to be used and place the water mesh object in the scene:

    Выберите меш для использования и поместите объект Water Mesh в сцене:

Editing WaterРедактирование воды#

Settings of a water mesh object can be adjusted via the Parameters window:Настройки объекта Water Mesh доступны в окне Parameters:

  • In the Water Mesh section, waves that determine periodic and sinusoidal nature of water can be set. Also on the Water Mesh tab, you can set a mesh to used for the water mesh object and specify a field mask.В разделе Water Mesh можно задать волны, которые определяют периодический и синусоидальный характер колебаний водной поверхности. Также на вкладке Water Mesh вы можете установить меш, используемый для объекта Water Mesh, и указать маску поля.
  • In the Surfaces section, water surfaces that determine optical and dynamic behaviour of water can be adjusted.В разделе Surfaces можно настроить водные поверхности которые определяют оптическое и динамическое поведение воды.

Water WavesВолны воды#

By default, water surface ripples according to the normal map (see the water_mesh_base material). However, different kinds of waves can be also simulated with 4 directional geometrical waves, summed to create dynamic waves. This model uses static geometry animated in vertex shader. Movement each of the wave is set independently that enhances flexibility of adjustment.По умолчанию рябь на поверхности воды создается в соответствии с картой нормалей (см. материал water_mesh_base). Тем не менее, различные виды волн также могут быть смоделированы с помощью 4-х направленных геометрических волн , которые в сумме создают динамические волны. Эта модель использует статическую геометрию, анимированную в вершинном шейдере. Движение каждой волны задается независимо, что повышает гибкость регулировки.

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.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.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.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.By the maximum possible values of 180 or -180, the wave direction becomes parallel to the X axis yet again.
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.
Направленная волна (в отличие от круговой от предметов, например) идет по заданному направлению:
  • By the minimum value of 0, the wave spreads along the Y axis and is parallel to the X axis.При минимальном значении 0 волна распространяется вдоль оси Y и параллельна оси X.
  • Positive values rotate the wave about the Z axis, meaning the wave direction is slanted counterclockwise relative to its initial spread.Положительные значения поворачивают волну вокруг оси Z, что означает, что направление волны наклонено против часовой стрелки относительно ее начального распространения.
  • 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.При максимально возможных значениях 180 или -180 направление волны снова становится параллельным оси X.
Speed The wave progresses along the water surface with the definite speed (measured in units per second):
  • The minimum value of 0 means the wave is inactive.The minimum value of 0 means the wave is inactive.
  • Increasing the value results in waves following each other faster.Increasing the value results in waves following each other faster.
The minimum value of 0 means the wave is inactive.Increasing the value results in waves following each other faster.
Волна распространяется по поверхности воды с определенной скоростью (измеряется в единицах в секунду):
  • The minimum value of 0 means the wave is inactive.Минимальное значение 0 означает, что волна неактивна.
  • 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, the more rippled the water surface is.The smaller the value, the more rippled the water surface is.
  • The higher the value, the broader formed waves are.The higher the value, the broader formed waves are.
Length of the First Wave = 10Length of the First Wave = 10
Length of the First Wave = 70Length of the First Wave = 70
The smaller the value, the more rippled the water surface is.The higher the value, the broader formed waves are.Length of the First Wave = 10Length of the First Wave = 70
Длина представляет собой расстояние между последовательными гребнями волны:
  • The smaller the value, the more rippled the water surface is.Чем меньше значение, тем больше рябь на поверхности воды.
  • The higher the value, the broader formed waves are.Чем выше значение, тем шире формируются волны.
Length of the First Wave = 10Длина первой волны = 10
Length of the First Wave = 70Длина первой волны = 70
Amplitude Amplitude determines the distance between the highest and the lowest wave peaks. Together with Length, it sets the wave form.
  • The minimum value of 0 means the wave is not formed.The minimum value of 0 means the wave is not formed.
  • Increasing the value forms higher waves up to tsunami-like ones.Increasing the value forms higher waves up to tsunami-like ones.
Amplitude of the First Wave = 0.3; Length = 10Amplitude of the First Wave = 0.3; Length = 10
Amplitude of the First Wave = 0.7; Length = 10Amplitude of the First Wave = 0.7; Length = 10
The minimum value of 0 means the wave is not formed.Increasing the value forms higher waves up to tsunami-like ones.Amplitude of the First Wave = 0.3; Length = 10Amplitude of the First Wave = 0.7; Length = 10
Амплитуда определяет расстояние между самым высоким и самым низким пиками волны. Вместе с Length, он задает форму волны.
  • The minimum value of 0 means the wave is not formed.Минимальное значение 0 означает, что волна не сформирована.
  • Increasing the value forms higher waves up to tsunami-like ones.При увеличении значения формируются более высокие волны вплоть до цунамиподобных.
Amplitude of the First Wave = 0.3; Length = 10Амплитуда первой волны = 0,3; Длина = 10
Amplitude of the First Wave = 0.7; Length = 10Амплитуда первой волны = 0,7; Длина = 10

Simulating Physical InteractionМоделирование физического взаимодействия#

To initiate physical simulation of water, it should have a water body assigned and enabled. These options are available only for water mesh objects, because of their finite size. If prolongation of the covered area is required, it can be done without the artists exerting additional efforts: water mesh objects are simply placed next to each other. However, the waves from the objects do not spread on the adjacent mesh. Sinusoidal waves can be synchronized, if necessary, by changing the sign of the Amplitude value.Чтобы началась физическая симуляция воды, на нее должно быть назначено и включено тело Water Body. Эти параметры доступны только для объектов Water Mesh, так как их размер ограничен. Если требуется увеличение покрываемой площади, то это можно сделать без дополнительных усилий со стороны художников: объекты Water Mesh просто размещаются рядом друг с другом. Однако волны от объектов не распространяются на соседний меш. синусоидальные волны при необходимости можно синхронизировать, изменив знак значения Amplitude.

As an option, a body of the water can be named in the corresponding field to be identified and handled by UnigineScript.Как вариант, имя тела объекта воды можно указать в соответствующем поле, и оно будет идентифицировано и обработано UnigineScript.

Примечание
Water mesh must be exported at the center of world coordinates; otherwise, some effects (for example, caustics) may not be rendered correctly.Water Mesh необходимо экспортировать в центре мировых координат; в противном случае некоторые эффекты (например, каустика) могут отображаться неправильно.
Последнее обновление: 06.04.2022
Build: ()