This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
Tutorials

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:水网可以是任意形式和大小,但也有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:
  • 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 2nd mesh will be narrower than on the 1st mesh because of normal map tiling.
    UV coordinates at scale of 1:1比例为 1:1 的 UV 坐标
    UV coordinates at scale of 2:1比例为 2:1 的 UV 坐标
  • To simulate a river flow, make sure that its UV map is rectangular.要模拟河流,请确保其 UV 贴图是矩形的。

Adding 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:可以通过 Parameters 窗口调整 water mesh 对象的设置:

  • 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 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 必须在世界坐标的中心导出;否则,某些效果(例如焦散)可能无法正确渲染。
最新更新: 2022-03-10
Build: ()