VoxelGIData
繼承: Resource < RefCounted < Object
包含用於 VoxelGI 節點的烘焙體素全域光照資料。
說明
VoxelGIData 包含烘焙的體素全域照明,用於 VoxelGI 節點。VoxelGIData 還提供了若干用來調整全域照明最終外觀的屬性。這些屬性可以在運作時調整,無須再次烘焙 VoxelGI 節點。
注意:為了防止基於文字的場景檔(.tscn)過度增長,導致加載和保存速度變慢,請始終將 VoxelGIData 保存為外部二進位資源檔(.res),不要將其嵌入到場景中。做法是點擊 VoxelGIData 資源旁邊的下拉箭頭,選擇編輯,點擊屬性檢視器頂部的軟碟圖示,然後選擇另存為...。
教學
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
方法
void |
allocate(to_cell_xform: Transform3D, aabb: AABB, octree_size: Vector3, octree_cells: PackedByteArray, data_cells: PackedByteArray, distance_field: PackedByteArray, level_counts: PackedInt32Array) |
get_bounds() const |
|
get_data_cells() const |
|
get_level_counts() const |
|
get_octree_cells() const |
|
get_octree_size() const |
|
get_to_cell_xform() const |
屬性說明
間接光照和反射所使用的法線偏移。較高的值可以減少非粗糙材質中可見的自反射,但會增加光線洩漏並讓間接光照看上去更扁平。如果要優先隱藏自反射而不是追求光照質量,請將 bias 設為 0.0,並將 normal_bias 設為 1.0 和 2.0 之間的值。
要使用的動態範圍(1.0 代表低動態範圍場景亮度)。較高的值可用於提供更明亮的間接光照,但會在較暗的區域產生更多可見的色帶效果(包括間接光照和反射)。為了避免色帶效果,建議將其設定得盡可能低,避免出現明顯的亮度截斷。
VoxelGI 節點產生的間接照明和反射的能量。值越高,間接照明越亮。如果間接照明看起來過於平坦,請嘗試減少 propagation,同時增加 energy。另請參閱影響間接照明有效亮度的 use_two_bounces。
如果為 true,則 VoxelGI 節點會忽略 Environment 光照。如果為 false,則 VoxelGI 節點會考慮 Environment 光照。Environment 光照會即時更新,這意味著無需再次烘焙 VoxelGI 節點即可對其進行更改。
用於間接照明和反射的法線偏置。較高的值能夠減少在非粗糙材質中可見的自反射,但會導致更多可見的漏光問題,間接照明看起來也會更平坦。另見 bias。要優先隱藏自反射,而不是提高照明品質,請將 bias 設定為 0.0,並將 normal_bias 設定為介於 1.0 和 2.0 之間的值。
當光線從表面反彈時使用的乘數。較高的值會導致更亮的間接照明。如果間接照明看起來過於平坦,請嘗試減少 propagation 同時增加 energy。另請參閱影響間接照明的有效亮度的 use_two_bounces。
如果為 true,則執行兩次間接照明反彈而不是一次。這使得以一個較低的性能成本,使間接照明看起來更自然、更明亮。第二次反彈在反射中也是可見的。如果啟用 use_two_bounces 後場景顯得太亮,請調整 propagation 和 energy。
方法說明
void allocate(to_cell_xform: Transform3D, aabb: AABB, octree_size: Vector3, octree_cells: PackedByteArray, data_cells: PackedByteArray, distance_field: PackedByteArray, level_counts: PackedInt32Array) 🔗
There is currently no description for this method. Please help us by contributing one!
返回一個 AABB,表示已烘焙體素資料的邊界,烘焙後應該與 VoxelGI.size 相配對(僅包含表示大小的 Vector3)。
注意:如果修改了大小但沒有對 VoxelGI 資料進行烘焙,則 get_bounds() 和 VoxelGI.size 的值將不配對。
PackedByteArray get_data_cells() const 🔗
There is currently no description for this method. Please help us by contributing one!
PackedInt32Array get_level_counts() const 🔗
There is currently no description for this method. Please help us by contributing one!
PackedByteArray get_octree_cells() const 🔗
There is currently no description for this method. Please help us by contributing one!
Vector3 get_octree_size() const 🔗
There is currently no description for this method. Please help us by contributing one!
Transform3D get_to_cell_xform() const 🔗
There is currently no description for this method. Please help us by contributing one!