UE5.1_Niagara基础_官方内容示例_1.5
1.5 Blend Attributes by Value【混合属性数值】
Transient variables are local only to a given stack context (Particle Update, for example) and are recalculated from scratch every frame, they do not persisit their value from frame to frame. This makes them different from Particle. variables which are saved in the particle payload and persist from frame to frame, which comes at a memory and performance cost.
Here we make a transient variable representing the current distance from the emitter origin, and use that to drive a color and scale curve.
【临时变量是仅在给定堆叠环境中(如粒子更新)的本地变量且每帧都重新计算,计算结果不会保留到下一帧。这使临时变量与会被保存在粒子负载中的粒子变量不同,因为粒子变量会消耗内存和性能。】
【在这里我们创建了表示当前粒子与发射器原点的距离的临时变量,并用它来改变颜色和大小曲线】
创建临时变量方法:
1、在Parameters面板的Stage Transients【阶段临时变量】栏点击“+”号直接创建,然后拖到堆叠中设置。
2、在Parameters面板创建普通变量,再右键选择Change Namespace【改变命名空间】,选择Transient。
Normalize Distance Range【标准化距离范围】函数
Start Position【开始位置】
End Position【终点位置】
Distance【标准距离:标准化距离范围=(丨开始位置-终点位置丨)/标准距离,(丨开始位置-终点位置丨)取值为(计算结果)和(标准距离)两者中的最小值】
Invert Normalized Range【颠倒标准化范围:为True时,标准化距离范围=1-原标准化距离范围】
(此专栏为视频对应的文本知识,详细内容讲解请看对应视频,有疑问请到对应视频下方评论区寻找答案,无法找到答案时再在该评论区提出问题,勿在此专栏下方的评论区提出问题)