This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
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
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Physical Water

A physical water is a cuboid shaped area inside which water interaction effects are simulated. The physical water is usually used with water objects: you can add the physical water node together with a water node to indicate an area where physical interactions will take place. Note, however, that you cannot simulate waves by using the physical water.

Notice
The water will affect only objects, to which a cloth body or a rigid body are assigned. If the rigid body is used, a shape should be also assigned. However, cloth bodies cannot float in the physical water: they can only go with the water flow.
Also it is possible to generate particles in the contacts between the rigid bodies and the physical water (in order to create, for example, foam on the water or water splashes). This requires that the ObjectParticles node must be added as a child node to the PhysicalWater node.
Notice
You cannot generate particles in the contact between the water and the cloth body, since cloth bodies cannot float in the water.

Bodies with different physical properties behave differently in the same physical water. Therefore, in addition to editing physical water parameters, you should adjust parameters of the physical body in order to get the expected result.

Physical bodies of objects participating in the contact with a physical water can be obtained via UnigineScript. Also you can get the depth of the object submergence, the force applied to the contact, coordinates of the contact point and the relative velocity between the object and the physical water.

By using the physical water, you can create, for example, flows in the ocean.

See also#

  • The PhysicalWater class to manage physical water nodes via API
  • A set of samples located in the data/samples/physicals folder:
    1. water_00
    2. water_01
  • The fragment from the video tutorial on physics demonstrating the physical water effect

Adding Physical Water#

To add a physical water to the scene via UnigineEditor:

  1. Run the project with UnigineEditor.
  2. On the Menu bar, click Create -> Water -> Physical Water.

  3. Click somewhere in the world to place the physical water.

The new physical water node will be added to UnigineEditor and you will be able to edit it via the Parameters window. By default, the size of the node is 1×1×1 unit.

Editing Physical Water#

In the Physical Water section (Parameters window -> Node tab), you can adjust the following parameters of the physical water:

Edit Size Toggles the editing mode for the physical water node. When enabled, the physical water box sides that can be resized are highlighted with the colored rectangles. To change the size of a side, drag the corresponding rectangle.

Physical Mask Physical mask. The physical mask of the physical water must match the physical mask of the physical object. Otherwise, the physical water won't affect the object.
Size Size of the physical water box along the axes in units.
Velocity Velocity of the flow in the physical water along the axes.
Density Density of the physical water. It determines buoyancy of objects that float in the physical water. The higher the value, the higher buoyancy of the object. The lower the water density, the deeper the object submerges into water.
Notice
The density and the mass of the physical body also affect buoyancy of the object.

Physical Water density = 10
Physical Water density = 25
Linear Damping Value indicating how much the linear velocity of the objects decreases when they get into the physical water. The higher the value is, the lower the linear velocity will be.
Angular Damping Value indicating how much the angular velocity of the objects decreases when they get into the physical water. The higher the value is, the lower the angular velocity will be.
Last update: 2020-11-24
Build: ()