Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
NoiseTexture3D
繼承: Texture3D < Texture < Resource < RefCounted < Object
由 Noise 物件生成的雜訊所填充的紋理。
說明
使用 FastNoiseLite 或其他庫來填充所需大小的紋理資料。
該類在內部使用 Thread 生成紋理資料,因此如果生成過程尚未完成,Texture2D.get_image() 可能會返回 null。在這種情況下,需要等待紋理生成後再存取圖像和生成的位元組資料:
var texture = NoiseTexture3D.new()
texture.noise = FastNoiseLite.new()
await texture.changed
var data = texture.get_data()
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
屬性說明
Gradient,用於將每個圖元的亮度對應到一個顏色值。
生成的紋理的深度(單位為圖元)。
生成的紋理的高度(單位為圖元)。
如果為 true,則反轉該雜訊紋理。白變黑,黑變白。
Noise 物件的實例。
如果為 true,來自雜訊產生器的雜訊圖像,將被正規化到範圍 0.0 到 1.0。
關閉正規化會影響對比度,並允許生成非重複的可平鋪雜訊紋理。
如果為 true,則從 Noise 資源請求無縫紋理。
注意:與非無縫雜訊相比,無縫雜訊紋理可能需要更長的時間來生成,並且/或者可能具有較低的對比度,具體取決於所使用的 Noise 資源。這是因為一些實作使用更高的維度來生成無縫雜訊。
注意:預設的 FastNoiseLite 實作在生成無縫紋理時使用退回路徑。如果使用的 width、height 或 depth 小於預設值,你可能需要通過增大 seamless_blend_skirt 來讓無縫混合更高效。
float seamless_blend_skirt = 0.1 🔗
用於無縫紋理生成的預設/退回實作。它決定接縫混合的距離。較高的值可能會導致較少的細節和對比度。詳情見 Noise。
注意:如果使用的 width、height 或 depth 小於預設值,你可能需要通過增大 seamless_blend_skirt 來讓無縫混合更高效。
生成的紋理的寬度(單位為圖元)。