UE5.1_Niagara高級3.1_ Color Copy by Cell
3.1 Color Copy by Cell【復(fù)制單元格顏色】
As both emitters need access to the neighbor grid it is defined as a System variable.
By initializing the grid in System Update it is destroyed/recreated each frame.
【因為兩個發(fā)射器都需要訪問相鄰網(wǎng)格3D,所以把它定義為系統(tǒng)變量】
【通過在系統(tǒng)更新階段初始化網(wǎng)格,使它每幀都被銷毀/重新創(chuàng)建】
Neighbor Grid 3D is currently only supported on GPU emitters.
【相鄰網(wǎng)格3D目前只支持GPU發(fā)射器】
Neighbor Grid 3D currently uses ExecIndex as the particle identifier. This only remains consistent when reading/writing on the same frame and when using the grid in a simulation stage.
【相鄰網(wǎng)格3D目前使用執(zhí)行索引作為粒子標識符。這只有當在同一幀讀寫且在模擬階段使用網(wǎng)格時,才是保持不變的】
Only one attribute reader can exist at a time. It can be used in multiple locations however. It is good practice to define it at Emitter Spawn for general use.
【同一時間只能有一個屬性讀取器。然而它能被使用在多個位置。一般情況下在發(fā)射器生成時定義它】
The Find Closest Neighbor scratch module returns an ExecIndex stored within the grid.
【找到最近鄰本地模組返回儲存在網(wǎng)格中的執(zhí)行索引】
The Copy Color scratch module uses the returned ExecIndex with the Attribute reader to query the color of the closest Grid_Write particle.
【復(fù)制顏色本地模組使用返回的執(zhí)行索引,并用屬性讀取器來查詢該粒子顏色】
Modulo【余數(shù)】節(jié)點:0%3=0,1%3=1,2%3=2,3%3=0
Floor【向下取整】節(jié)點:1.0=1,1.9=1,-1.9=-2
整數(shù)除以整數(shù)得到整數(shù):2/3=0.0
Neighbor Grid 3D Set Resolution【相鄰網(wǎng)格3D設(shè)置分辨率】模組
注:需要取消勾選Library Only
Grid【網(wǎng)格】:拖入已初始化的Neighbor Grid 3D類型變量
MaxNeighborsPerCell【單元格最大鄰居個數(shù)】:單元格所能儲存的粒子索引的個數(shù),0為不設(shè)置上限
(僅Max Axis)NumCellsMaxAxis【軸上最大網(wǎng)格數(shù)】:每個軸方向上單元格數(shù)量
Resolution Mult【分辨率乘數(shù)】:用于與設(shè)置的分辨率相乘,得到最終分辨率
WorldGridExtents【世界網(wǎng)格長度】:設(shè)置相鄰網(wǎng)格3D在世界空間的虛構(gòu)的大小,并非相鄰網(wǎng)格3D的真實的屬性,用于構(gòu)建粒子位置的轉(zhuǎn)換矩陣,注意要讓此大小包含所有粒子。
Resolution Method【分辨率方法】:選擇設(shè)置分辨率的方法
Grid 3D Create Unit to World Transform【網(wǎng)格3D創(chuàng)建單位到世界變換】模組
注:需要取消勾選Library Only,建立單位空間與世界空間的變換關(guān)系
Camera Facing【面向攝像機】:和圖片面向類似
LocalPivot【本地樞軸點】:設(shè)置單位空間自身的偏移,設(shè)置為(0,0,0)時,單位空間自身偏移(-0.5,-0.5,-0.5)
Offset【偏移】:設(shè)置單位空間在世界空間的偏移
Rotation【旋轉(zhuǎn)】
WorldGridExtents【世界網(wǎng)格長度】:輸入上一個模組的世界網(wǎng)格長度
System.Grid3D_CreateUnitToWorldTransform.WorldToUnit:世界空間轉(zhuǎn)換為單位空間使用的變換矩陣