UE5.1_Niagara高级3.1_ Color Copy by Cell
3.1 Color Copy by Cell【复制单元格颜色】
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.
【因为两个发射器都需要访问相邻网格3D,所以把它定义为系统变量】
【通过在系统更新阶段初始化网格,使它每帧都被销毁/重新创建】
Neighbor Grid 3D is currently only supported on GPU emitters.
【相邻网格3D目前只支持GPU发射器】
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.
【相邻网格3D目前使用执行索引作为粒子标识符。这只有当在同一帧读写且在模拟阶段使用网格时,才是保持不变的】
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.
【同一时间只能有一个属性读取器。然而它能被使用在多个位置。一般情况下在发射器生成时定义它】
The Find Closest Neighbor scratch module returns an ExecIndex stored within the grid.
【找到最近邻本地模组返回储存在网格中的执行索引】
The Copy Color scratch module uses the returned ExecIndex with the Attribute reader to query the color of the closest Grid_Write particle.
【复制颜色本地模组使用返回的执行索引,并用属性读取器来查询该粒子颜色】
Modulo【余数】节点:0%3=0,1%3=1,2%3=2,3%3=0
Floor【向下取整】节点:1.0=1,1.9=1,-1.9=-2
整数除以整数得到整数:2/3=0.0
Neighbor Grid 3D Set Resolution【相邻网格3D设置分辨率】模组
注:需要取消勾选Library Only
Grid【网格】:拖入已初始化的Neighbor Grid 3D类型变量
MaxNeighborsPerCell【单元格最大邻居个数】:单元格所能储存的粒子索引的个数,0为不设置上限
(仅Max Axis)NumCellsMaxAxis【轴上最大网格数】:每个轴方向上单元格数量
Resolution Mult【分辨率乘数】:用于与设置的分辨率相乘,得到最终分辨率
WorldGridExtents【世界网格长度】:设置相邻网格3D在世界空间的虚构的大小,并非相邻网格3D的真实的属性,用于构建粒子位置的转换矩阵,注意要让此大小包含所有粒子。
Resolution Method【分辨率方法】:选择设置分辨率的方法
Grid 3D Create Unit to World Transform【网格3D创建单位到世界变换】模组
注:需要取消勾选Library Only,建立单位空间与世界空间的变换关系
Camera Facing【面向摄像机】:和图片面向类似
LocalPivot【本地枢轴点】:设置单位空间自身的偏移,设置为(0,0,0)时,单位空间自身偏移(-0.5,-0.5,-0.5)
Offset【偏移】:设置单位空间在世界空间的偏移
Rotation【旋转】
WorldGridExtents【世界网格长度】:输入上一个模组的世界网格长度
System.Grid3D_CreateUnitToWorldTransform.WorldToUnit:世界空间转换为单位空间使用的变换矩阵