1.
Preparation
This is the effect we are going to make in this tutorial.
Note: The main content of this tutorial comes from the Content Examples
that come with Unreal Engine
Tip: Use ⬆️ ⬇️ to turn the page up and down. We recommend browsing with a large screen for a better reading experience.
3.
Let's start the reconstruction
Right click and select FX
=> Niagara System
to create.
4.
Create Niagara System
Select Empty
template, click +
and Finish
5.
Create Niagara System
As a result, we get a Niagara System
asset, click to open it.
6.
Empty Niagara System
You can see that we have an empty Niagara system.
7.
Spawn Rate
Click on the +
sign to the right of the Emitter Update
to add the Spawn Rate
module.
Spawn Rate
: Number of particles per second to spawn.
8.
Spawn Rate
Set the Spawn Rate
value to 5.0
.
Spawn 5.0 particle per second.
9.
Attributes
An important aspect of Niagara is something we call Attributes
. These are bits of data that are saved alongside the various scripts.
An Emitter level attribute, for example, is a single piece of data for the entire emitter. In this tutorial here, a Float
, called Emitter.SineWave
.
10.
SineWave
Click the +
sign to the right of the Emitter Attributes
to add a float
attribute.
11.
SineWave
Name this new property SineWave
.
12.
SineWave
Drag this property under Emitter Update
.
If dragged into Emitter Spawn
, its value would only be set once, on the first frame the emitter was born.
By setting it in Emitter update
, that Attribute gets a new value every frame.
13.
Edit Attribute
Modify the value type of the property to Sine
function dynamic input.
14.
Edit Attribute
Set the value type of Normalized Angle
to Multiply Float
15.
Edit Attribute
Link A
with the Age
attribute of the emitter
16.
Edit Attribute
Edit the value of B
to 0.2
.
In this case, we make ourselve a sinewave which is accessible by every single particle in the emitter, and we sample that sinewave in the "Add Velocity" module to spray oscillating particles as time goes on.
17.
Initialize Particles
Select Initialize Particles
and set:
1. Lifetime
to 3.0
2. Color Mode
to Direct Set
3. Mesh Scale Mode
is Uniform
and its value is 3.0
18.
Add Velocity
Add Add Velocity
module to the Particle Spawn
section.
19.
Add Velocity
Click the first Fix issue
button to add its dependency on the SolveForcesAndVelocity
module.
20.
Edit Velocity
Set the value type of Velocity
to Rotate Vector
21.
Edit Velocity
Set the Z
value of Vector To Rotate
to 100.0
.
22.
Edit Velocity
Set the value type of Pitch
to Multiply Float
23.
Edit Velocity
Set the A
value of Pitch
to the SineWave
of the emitter.
24.
Edit Velocity
Set the B
value of Pitch
to 24.0
.
25.
Edit Velocity
Set the time increment (Delta Time)
of the velocity as a sine function (Sine)
.
26.
Edit Velocity
Set the value type of Normalized Angle
to Multiply Float
27.
Edit Velocity
Sets the A
value of Normalized Angle
to the Age
of the emitter.
28.
Edit Velocity
1. Set the B
value of Normalized Angle
to 0.2
.
2. Set the Scale
value to 0.5
.
3. Set the value of Bias
to 1
.
29.
Initial Mesh Orientation
Add Initial Mesh Orientation
module to the Particle Spawn
section.
30.
Initial Mesh Orientation
Set the value of Orientation Vector
to the Velocity
of the particle.
31.
Update Mesh Orientation
Add Update Mesh Orientation
module to the Particle Update
section.
32.
Update Mesh Orientation
Add Update Mesh Orientation
to the Particle Update
module.
33.
Scale Mesh Size
Add Scale Mesh Size
module to the Particle Update
section.
34.
Scale Mesh Size
Edit the Scale Factor
's value to Vector 2DFrom Float
.
35.
Scale Mesh Size
Set the value type of Value
to Float from Curve
36.
Scale Mesh Size
Select the first point and edit its value to: (Time is 0.0
, Value is 0.0
).
37.
Scale Mesh Size
Mouse over the small red circle, right click, and select Add key to Curve
.
38.
Scale Mesh Size
Set the Time
of the newly added point to 0.25
and the Value
to 1
.
39.
Scale Mesh Size
In the same way, add a point: Time
is 0.75
and Value
is 1
.
Then select each point, right-click, and select Auto
.
40.
Remove Sprite Renderer
Select Sprite Renderer
, right-click, and select Delete
.
41.
Add Mesh Renderer
Add Mesh Render
module to the Render
section.
42.
Edit Mesh Renderer
Select the value of Particle Mesh
as S_Gnomon
.