白噪波纹理节点

The White Noise Texture node returns a random number based on an input seed. The seed can be a number, a 2D vector, a 3D vector, or a 4D vector; depending on the Dimensions property. The output number ranges between zero and one.

../../../_images/render_shader-nodes_textures_white-noise_node.png

白噪波纹理节点。

输入

输入是动态的,下面的输入端口会在选择的节点属性需要时出现。

矢量

用于二维、三维及四维随机种的矢量。

W

用于一维及四维随机种的数值。

属性

规格尺寸

用于计算噪波的空间维度。

  • 1D

    W 作为随机种。

    2D

    The X and Y components of the Vector input are used as seed.

    3D

    使用 矢量 作为随机种。

    4D

    矢量 输入和 W 输入同时用作种子。

输出

输出随机值。

注意事项

The slightest difference in seed values would result in completely different outputs. Consequently, bad precision may have significant impact on the output. This issue mostly affects Cycles but not Eevee. Usually, we can mitigate this issue by:

  • 消除有问题的随机种数值。如果有问题的随机种是常数,则应通过选择较低的维度或将其乘以零来消除该问题。
  • 将随机种与任意数值相加。该问题可能只发生在特定边界(如单位边界)上,因此只需与任意数值相加即可解决问题。
  • 对随机种取绝对值。在计算中,零可能是正的或负的,因此取绝对值可统一为单一取值。

../../../_images/render_shader-nodes_textures_white-noise_issue.png

Precision issue due to signed zeros on the Z axis.

../../../_images/render_shader-nodes_textures_white-noise_solution1.png

Mitigating the issue by eliminating the Z axis.

../../../_images/render_shader-nodes_textures_white-noise_solution2.png

Mitigating the issue by adding an arbitrary value.

../../../_images/render_shader-nodes_textures_white-noise_solution3.png

Mitigating the issue by taking the absolute value.

举例

../../../_images/render_shader-nodes_textures_white-noise_solution1.png

Generating cell noise using the Snap vector operation and the White Noise node.