欢迎光临散文网 会员登陆 & 注册

UE5.1_Niagara高级1.3 _Communicate with External Render Targets

2023-04-12 10:59 作者:Winter惜曦  | 我要投稿
  • 1.3 Communicate with External Render Targets【与外部渲染目标通信】

  • To read an external render target, we need a "TextureRenderTargetObject" user parameter. This is a named parameter which can be fed by an on-disk render target 2d, or set via blueprint using "Set Niagara Variable - Texture Render Target".

    If using an on-disk asset, simply assign it directly onto the user parameter here.

    Later, this texture object will be consumed by our Render Target 2D data interface.

    【为了读取外部渲染目标,我们需要一个“TextureRenderTargetObject”用户参数。这个命名参数可由磁盘(即文件夹)里的渲染目标2D提供,或通过蓝图使用"Set Niagara Variable - Texture Render Target"设置。】

    【如果使用磁盘资产,可简单地直接在用户参数面板里设置】

    【然后,我们的渲染目标2D数据接口就会使用这个纹理对象】

  • The crucial binding for the TextureRenderTargetObject is here on the emitter level render target data interface. There is an entry to assign a Render Target User Parameter. Here is where we link the two.

    【对TextureRenderTargetObject变量至关重要的绑定是在发射器层级渲染目标数据接口里。那里有个分配渲染目标用户参数的入口。我们在那里连接它们】

  • The Blur Grid stage is dependent on the Iteration Count chosed on the "Generic Simulation Stage Settings". In the node graph is a returned value for which iteration the stage is on, this integer can be used to adjust the simulation as iterations progress, in this case the blur radius for the blur is increased for each subsequent iteration.

    This allows for a softer blur as the iteration count increases.

    【模糊网格阶段取决于Generic Simulation Stage Settings里的迭代数量。迭代数量在节点图表是一个表示当前迭代阶段的返回值,随迭代次数的增加这个整数可用于调整模拟,在此案例中,模糊半径随迭代次数增加而增加】

    【这使得随迭代次数的增加,网格越模糊】

  • 1:Cus_SampleTextureToGrid2DCollection模组:新增灰度化处理选项

  • 2:Cus_BlurGrid2Dcollection模组:模糊处理

    Engine.System.TickCount变量:粒子系统帧计数,粒子系统模拟重置时从0开始计算运行了多少帧

  • 3:在用户参数面板创建Texture Render Target变量,在Set Render Target 2D里的Render Target User Parameter选择该用户参数。当该用户参数有效时,将使用该渲染目标而不创建一个内部的渲染目标,之后该目标将被Niagara模拟所调整。

  • 4:在Actor的Components中添加Niagara Particle System Component,然后添加Niagara System

  • 5:在Actor的Construction Script中:

    Create Render target 2D节点

    Set Niagara Variable节点

    Create Dynamic Material Instance节点

    Set Texture Parameter Value节点

  • 6:在Actor的Event Graph中:

    Delay

    Niagara→Activate【游戏运行时先取消自动激活,等开始后过几帧再激活粒子系统,减少第一帧的运算量】


UE5.1_Niagara高级1.3 _Communicate with External Render Targets的评论 (共 条)

分享到微博请遵守国家法律