This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
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 Noise

A physical noise is a cuboid shaped area that adds a distribution flow based on a volumetric noise texture. The physical noise enables to simulate a force field that affects particles and physical bodies with a spatial 3D noise.

Notice
The physical noise can affect only a cloth, a rope or a rigid body. Also you should remember that a rigid body requires a shape to be assigned.

For example, if you add the physical noise for particles, you can get the following:

Noise is disabled
Noise is enabled. A colored square is a noise image texture.

Notice
The physical noise will affect particles only if their physical mass is nonzero. The physical mass for the particles can be set on the Particles tab of the Parameters panel.

See also#

Main Concepts#

Notice
The calculations described below are added for better understanding of the physical noise parameters.

The direction of the force, which affects particles and physical bodies inside the physical noise box, is stored in the noise texture: a 3D texture, each texel of which stores force direction. The noise texture that is used for the physical noise can be adjusted via UnigineEditor.

When the physical body falls within the physical noise box, the force at the current point starts to affect it. This force is calculated as follows:

Here:

Name Description
force The resulting force that affects the physical body at the current point.
force_direction Direction of the force vector that is stored in the color of a texel of the noise texture.
force_multiplier Force multiplier.
threshold Threshold distance along the axes.

The force_direction is obtained from the noise texture as follows:

As the force_direction is a vector, the calculation is actually performed as follows:

The pixel_color is obtained by sampling a pixel with the given coordinates from the noise texture. The pixel coordinates are calculated as follows:

Here:

Name Description
pixel_color Color of the noise texture pixel that stores direction of the force vector.
pixel_coordinates Coordinates of the noise texture pixel that stores direction of the force vector.
body_position Local coordinates of the physical body (relative to coordinates of the physical noise node).
step Sampling step.
offset Sampling offset
threshold Threshold distance along the axes.

Adding Physical Noise#

To add a physical noise to the scene via UnigineEditor:

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

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

The new physical noise node will be added to UnigineEditor and you will be able to edit it via the Parameters window.

Editing Physical Noise#

In the Physical Noise section (Parameters window -> Node tab), you can adjust parameters of the physical noise.

Notice
To have a more clear understanding how the following parameters affect the resulting force inside the physical noise node, see Main Concepts.

Node Parameters#

The following parameters are used to set conditions of the size of the physical noise node.

Edit Size Toggles the editing mode for the physical noise node. When enabled, the physical noise 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 noise must match the physical mask of the physical object. Otherwise, the physical noise won't affect the object.
Size Size of the physical noise box along the axes in units.
Threshold Threshold distance along the axes. The threshold determines the distance of gradual change from zero to full force value. This values are relative to the size of the physical noise box. It means that the threshold values should be less than the size of the physical noise box.

Texture Sampling Parameters#

The following parameters are used for pixel sampling from the generated noise texture.

Notice
You can animate a force field in run-time by changing these parameters.
Offset Sampling offset along the axes.
Step Size of the sampling step along the axes.

Force Multiplier#

Force Force multiplier. The higher the value is, the higher the value of the resulting force that affects an object inside the physical noise node will be.

Texture Generation Parameters#

The following parameters are used to generate a noise texture that will be used in run-time.

Notice
It is not recommended to change values of the following parameters in run-time as the noise texture will be regenerated and the performance will decrease.
Scale Scale of the noise texture. The minimum value is 0, the maximum value is 1.
Frequency Number of octaves for the Perlin noise. The higher the value is, the more details the noise texture has. The minimum value is 0, the maximum value is 16.

Frequency = 1
Frequency = 16
Image Size Size of the noise texture image in pixels.
Last update: 2021-04-09
Build: ()