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.Physical Noise是一个长方体形状的区域,可基于体积噪声纹理添加分布流。 Physical Noise可以模拟以空间3D噪声影响粒子和物理物体的力场。
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启用噪音。彩色正方形是噪声图像纹理
|
See also也可以看看#
- The PhysicalNoise class to edit Physical Noise nodes via API通过API编辑Physical Noise节点的PhysicalNoise类
- The data/samples/physicals/noise_00 sampledata/samples/physicals/noise_00样本
- The fragment from the video tutorial on physics demonstrating the noise effect来自的片段演示噪声效应的物理视频教程
Main Concepts主要概念#
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.影响Physical Noise框内的粒子和物理物体的力的方向存储在Noise纹理中:3D纹理,其每个纹理像素均存储力的方向。用于Physical Noise的噪声纹理可以是调整后的通过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:当物理物体落在Physical Noise框内时,当前点处的力开始对其产生影响。此力的计算方法如下:
Here:这里:
Name | Description |
---|---|
force force | The resulting force that affects the physical body at the current point在当前点影响身体的合力 |
force_direction force_direction | Direction of the force vector that is stored in the color of a texel of the noise texture以噪声纹理的纹素的颜色存储的力矢量的方向 |
force_multiplier force_multiplier | Force multiplier力乘数 |
threshold threshold | Threshold distance along the axes门槛距离沿轴 |
The force_direction is obtained from the noise texture as follows: 从噪声纹理获得force_direction,如下所示:
As the force_direction is a vector, the calculation is actually performed as follows: 由于force_direction是向量,因此实际上按以下方式执行计算:
The pixel_color is obtained by sampling a pixel with the given coordinates from the noise texture. The pixel coordinates are calculated as follows: 通过从噪声纹理中采样具有给定坐标的像素来获得pixel_color。像素坐标计算如下:
Here:这里:
Name | Description |
---|---|
pixel_color pixel_color | Color of the noise texture pixel that stores direction of the force vector存储力矢量方向的噪声纹理像素的颜色 |
pixel_coordinates pixel_coordinates | Coordinates of the noise texture pixel that stores direction of the force vector存储力矢量方向的噪声纹理像素的坐标 |
body_position body_position | Local coordinates of the physical body (relative to coordinates of the Physical Noise node)实体的局部坐标(相对于Physical Noise节点的坐标) |
step step | Sampling Step采样步骤 |
offset offset | Sampling Offset采样偏移 |
threshold threshold | Threshold Distance along the axes门槛距离沿轴 |
Adding Physical Noise增加物理噪音#
To add a Physical Noise to the scene via UnigineEditor:通过UnigineEditor将Physical Noise添加到场景中:
- Run the project with UnigineEditor.跑步UnigineEditor的项目。
-
On the Menu bar, click Create -> Physics -> Physical Noise.在菜单栏上,单击创建→物理→物理噪声。
-
Click somewhere in the world to place the Physical Noise.单击世界上的某个地方以放置Physical Noise。
A new Physical Noise node will be added to UnigineEditor, and you will be able to edit it via the Parameters window.新的Physical Noise节点将被添加到UnigineEditor,您将能够通过Parameters窗口对其进行编辑。
Editing Physical Noise编辑物理噪音#
In the Physical Noise section (Parameters window -> Node tab), you can adjust parameters of the Physical Noise.在Physical Noise部分(Parameters窗口→Node选项卡)中,可以调整Physical Noise的参数。
Node Parameters节点参数#
The following parameters are used to set conditions of the size of the Physical Noise node.以下参数用于设置Physical Noise节点大小的条件。
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 Noise节点的编辑模式。启用后,可以调整大小的Physical Noise框边会用彩色矩形突出显示。要更改边的大小,请拖动相应的矩形。 |
---|---|
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.Physical掩码。 Physical Noise的物理掩码必须比赛物理对象的Physical掩码。否则,物理噪声将不会影响对象。 |
Size | Size of the Physical Noise box along the axes in units.沿轴的Physical Noise框的大小(单位)。 |
Threshold |
Threshold distance along the axes. The threshold determines the distance of gradual change from zero to full force value. These 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.沿轴的阈值距离。阈值确定从零到全力值的逐渐变化的距离。这些值是相对于Physical Noise框的大小。这意味着阈值应小于Physical Noise框的大小。
|
Texture Sampling Parameters纹理采样参数#
The following parameters are used for pixel sampling from the generated noise texture.以下参数用于从生成的噪声纹理进行像素采样。
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.力乘数。值越高,影响Physical Noise节点内部对象的合力值就越大。 |
---|
Texture Generation Parameters纹理生成参数#
The following parameters are used to generate a noise texture that will be used at run time.以下参数用于生成将在运行时使用的噪声纹理。
Scale | Scale of the noise texture. The minimum value is 0, the maximum value is 1.噪波纹理的比例。最小值为0,最大值为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.Perlin噪声的八度数。值越高,噪波纹理的细节越多。最小值为0,最大值为16。
|
||||
Image Size | Size of the noise texture image in pixels.噪点纹理图像的大小(以像素为单位)。 |