vault backup: 2024-02-20 16:02:31
This commit is contained in:
parent
c85e482e37
commit
9e056a9568
@ -166,6 +166,14 @@
|
|||||||
"lastUpdated": 1708241946481
|
"lastUpdated": 1708241946481
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Niagara里面的相关类型": {
|
||||||
|
"Niagara里面的相关类型": {
|
||||||
|
"currentFile": {
|
||||||
|
"count": 1,
|
||||||
|
"lastUpdated": 1708410052197
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,6 +28,11 @@ PS.**Niagara Debugger**工具可以用于检查粒子ID以及对应变量的变
|
|||||||
|
|
||||||
# 其他
|
# 其他
|
||||||
1. **发射器固定粒子ID**:勾选发射器上**RequiresPersistentIDs**选项即可固定。
|
1. **发射器固定粒子ID**:勾选发射器上**RequiresPersistentIDs**选项即可固定。
|
||||||
|
2. ExportParticleDataToBlueprint:可以输出CPU或者GPU变量
|
||||||
|
1. 在该节点上添加蓝图变量名。之后在蓝图的BeginPlay()设置这个变量为该蓝图类。之后实现ReceiveParticleData接口。
|
||||||
|
2. GPU 粒子数据导出是通过从 GPU 内存回读的方式进行的。这需要不可预知的非固定帧数,通常为 1-2 帧。
|
||||||
|
3. GPU 回读性能受限于回读缓冲区的大小。建议使用最小值的 GPU 固定大小分配来捕捉特定帧中可能发生的所有事件。任何超过固定大小的事件都将无法发送。
|
||||||
|
3. Window - GeneratedCode可以看到生成出的HLSL代码。
|
||||||
|
|
||||||
#
|
#
|
||||||
Particle的Module都是c++级别写死的。基本位于`Engine\Source\Runtime\Engine\Classes\Particles`目录。基类为**UParticleModule**;Niagara的Module都是蓝图资产,引擎自带的都在 `Engine\Plugins\FX\Niagara\Content\Modules`。基类为**UNiagaraScript**。
|
Particle的Module都是c++级别写死的。基本位于`Engine\Source\Runtime\Engine\Classes\Particles`目录。基类为**UParticleModule**;Niagara的Module都是蓝图资产,引擎自带的都在 `Engine\Plugins\FX\Niagara\Content\Modules`。基类为**UNiagaraScript**。
|
||||||
@ -38,4 +43,44 @@ Particle的Module都是c++级别写死的。基本位于`Engine\Source\Runtime\E
|
|||||||
- 相关接口,PreSave、Serialize、PostLoad;基类接口实现。
|
- 相关接口,PreSave、Serialize、PostLoad;基类接口实现。
|
||||||
- FNiagaraVMExecutableData相关
|
- FNiagaraVMExecutableData相关
|
||||||
- 编译相关。
|
- 编译相关。
|
||||||
- 其他。
|
- 其他。
|
||||||
|
|
||||||
|
## Niagara里面的相关类型
|
||||||
|
### DataInterface
|
||||||
|
基类为UNiagaraDataInterface。
|
||||||
|
- UNiagaraDataInterface2DArrayTexture
|
||||||
|
- UNiagaraDataInterfaceVirtualTexture
|
||||||
|
|
||||||
|
## Texture相关Module
|
||||||
|
- Textures
|
||||||
|
- SampleTexture
|
||||||
|
- SamplePseudoVolumeTexture
|
||||||
|
- SubUV_TextureSample
|
||||||
|
- WorldAlignedTextureSample
|
||||||
|
- SubUV
|
||||||
|
- SubUVAnimation
|
||||||
|
- V2
|
||||||
|
- SubUVAnimation
|
||||||
|
|
||||||
|
## 生成的代码
|
||||||
|
```c++
|
||||||
|
int2 Emitter_SampleTexture_Texture_TextureSize;
|
||||||
|
int Emitter_SampleTexture_Texture_MipLevels;
|
||||||
|
Texture2D Emitter_SampleTexture_Texture_Texture;
|
||||||
|
SamplerState Emitter_SampleTexture_Texture_TextureSampler;
|
||||||
|
void SampleTexture2D_Emitter_SampleTexture_Texture(in float2 UV, in float MipLevel, out float4 OutValue)
|
||||||
|
{
|
||||||
|
OutValue = Emitter_SampleTexture_Texture_Texture.SampleLevel(Emitter_SampleTexture_Texture_TextureSampler, UV, MipLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SampleTexture_Emitter_Func_(inout FSimulationContext Context)
|
||||||
|
{
|
||||||
|
float4 SampleTexture2D_Emitter_SampleTexture_TextureOutput_Value;
|
||||||
|
SampleTexture2D_Emitter_SampleTexture_Texture(Context.MapSpawn.SampleTexture.UV, Constants_Emitter_SampleTexture_MipLevel, SampleTexture2D_Emitter_SampleTexture_TextureOutput_Value);
|
||||||
|
Context.MapSpawn.OUTPUT_VAR.SampleTexture.SampledColor = SampleTexture2D_Emitter_SampleTexture_TextureOutput_Value;
|
||||||
|
Context.MapSpawn.OUTPUT_VAR.SampleTexture.SamplerUV = Context.MapSpawn.SampleTexture.UV;
|
||||||
|
Context.MapSpawn.Particles.SampleTexture.SampledColor = SampleTexture2D_Emitter_SampleTexture_TextureOutput_Value;
|
||||||
|
Context.MapSpawn.Particles.SampleTexture.SamplerUV = Context.MapSpawn.SampleTexture.UV;
|
||||||
|
}
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user