Labo Aquaria

UE4 is my life style.
Here is the Labo I show my creation with UE4 and Oreo...
<< Chuni Text Material | main | Morphing with render target texture in Niagara (2) >>
Morphing with render target texture in Niagara (1)

    What's up guys?

    Today, I'm blogging how to creat Niagara with Texture Render.

    First, Please make sure your Niagara plugin on.
    Next, Let's make some assets.




    "Niagara Emitter"*1

    "Niagara Module Script" *4


    "Material" *2

    "RenderTargetTexture" *2



    "Niagara Module Script"

    A: It's for counting total particles.

    B: For decide range of spawn.
    C: Third is for setting texture and particles position whatever you lke are needed.

    D: It's gonna adjust particle's position and color and scale between A and B.



    This draws "materials" and "Render texture" and controls spawn.



    [Niagara Module Script]

    1. Put "Module.Int" in MapGet 3 times and rename. This is for counting total particles and culculation of length of each particle. Second, Input 4 "" in MapSet. Spawn count is NumX * Num Y * NumZ at this time.



    [Niagara Emitter]

    1. Put "Niagara Module Script" that you edited on "Emitter Update".


    2.Add "Spawn Burst Instantaneous" and let "Spawn Rate" disable.

    Parameter of "Spawn Count" is "Emitter.TotalNum" at that time.


    [Niagara Emitter]

    1. Put "Particles.Scale" in "Set Variables" for its mesh's scale.


    2.Put the new"Niagara Module Script" you're gonna edit next on "Particle Spawn" and you may not find any parameter right now.

    Next, add 9 parameters below in Parameters tab.


    • Particles.BiginningPosition
    • Particles.BiginningScale
    • Particles.EndPosition
    • Particles.EndScale
    • Particles.MidPosition
    • Particles.MidScale
    • Particles.NoisePosition


    • Particles.EndColor
    • Particles.MidColor

    3.Drag and drop "BiginningPosition" under " Niagara Module Script" you added and link current position.


    4.Drag and drop "BiginningScale" and link current scale.


    5.Add "Curl Noise Location" and drop "NoisePosition" under it.


    [Niagara Module Script]

    You may feel this have a bit complexity.
    Speaking easily, these nodes work to line each particle in order with numbers of XYZ.


    Call 4 parameters at "MapGet".

    • Module.SpawnRange
    • Emitter.NumX
    • Emitter.NumY
    • Emitter.NumZ

    Call 2 parameters at "MapSet".

    • Particles.Position
    • Particles.Range


    1. Set up the length between each particles with these nodes as above.  Length = Spawn Range / (Particle count:X or Y or Z - 1)

    2. Construct some nodes to calculate X, Y and Z position of each particle.

    • Current particle position X = Fmod( Current particle ID, particle count: X) * Length
    • Current particle position Y = (Floor( Current particle ID, particle count: Y) - Floor( Current particle ID / particle Count: X*Y) * Particle count: Y) * Length
    • Current particle position Z = Floor( Current particle ID / particle Count: X*Y) * Length


    Now, each particle which is executed is gonna has each position.
    If you'd return and look at screen of "Niagara Emitter", you could find a new parameters "SpawnRange" in module.




    Next, I'm gonna show the way of setting Morph target.

    | UE4 | 06:08 | comments(0) | - |

    S M T W T F S
    << May 2020 >>