In part two of this tutorial series, I will show you how to quickly get started using Niagara for VFX in UE5.
Niagara Overview
Niagara is Unreal Engine’s VFX system
There are four components that make up a Niagara VFX system
The System is a container for everything that is needed to build an effect
Modifying system-level behaviors will modify everything contained within that effect
Emitters are where particles are generated from within the Niagara system
Emitters are used to control how particles are born, what happens as the particles age, and how the particles actually look and behave
Emitters are organized into stacks that contain groups where modules are used to complete tasks
In Niagara, Modules are the basic building blocks
Modules are added to the stacks of the Emitters where they are then processed (from top to bottom)
Parameters are the abstraction of the data from a Niagara simulation
Parameter types are assigned to the parameter to define the data represented by that parameter
Exploring the Emitter
The first emitter we will learn is using a template
Right click in the Content Browser and create a new folder for your Niagara system
In the new folder, right-click and choose the FX menu and then Niagara System
Select create an empty system
Rename the new Niagara system and double-click to open it
Go ahead and dock this window
Right-click and add an emitter
Under the templates tab, choose fountain
The emitter options are color-coded red and anything related to the particle options is color-coded green
We have multiple options to change the emitter
If we click on the spawn rate option, we can control the rate at which the particles will spawn
We can make these changes to this parameter in the selection tab
Lower numbers mean a slower spawn rate and higher numbers mean a faster spawn rate
If we choose the particle state for the emitter, we can change when the particles will disappear at the end of their lifetime
We can choose initialize particles which allows us to change multiple particle parameters
For instance, we can change the sprite size and rotation
Creating a Unique Particle
Niagara System & Emitter
In the Niagara folder, right-click and choose the FX menu and then Niagara System
Select create an empty system
Rename the new Niagara system and double-click to open it
Right-click and add an emitter
Under the templates tab, choose fountain
Particle Material
To make our own unique particle, we need to start with a material
In the content browser, right-Click and add a new materials folder
Right-click in the new folder and choose material from the menu
Give your material a name
Double-click on the material to open it
Choose the plane primitive option since we will be working with a 2D material
Change the blend mode from opaque to translucent – this will allow us to use a transparent material (in this case, the black background of the texture)
Change the shading model to unlit – this means that Unreal will only use an emissive color
I will be using Magic02 from Kenney’s Particle Pack – link is in the description
Back in the content browser, right-click and make a new folder – renaming it
Drag-and-drop your texture into the folder
Open the material window and right-click in the graph and search for particle color
Hold down the T-key and left-click to add a texture sample node
Go back to your content browser and select your texture
Back in the material, click on the use selected asset arrow
To add a multiply node, hold down the M-key and left-click in the graph – this will allow us to mix the particle color and the texture sample together
Connect the RGB pin of the particle color node to the emissive color of the material node
Connect the RGBA pin (alpha) to the top pin of the multiply node
Connect the Red pin of the texture sample node to the bottom pin of the multiply node – it doesn’t really matter if you use Red, Green, or Blue because the texture is black-and-white
Connect the pin from the multiply node to the opacity of the material node
Click on apply and save to save the material
Creating Particles
Go back to the particles window
On the emitter node, select sprite renderer – this is used to define the particles as 2D sprites based on our material
Click on the browse icon for the material and select the material
Back in the particle window, click on the use selected asset for the material [arrow]
04. Particle Animation
If you don’t want gravity to affect the particles, uncheck gravity on the emitter node
To allow the particles to move in multiple directions, choose add velocity on the emitter node
Change the velocity mode to from point – this means that velocity is added from an arbitrary point in space with a falloff
We can also change the velocity’s speed – a low range will allow the particles to still move but stay in a relatively small area
Particle Color
Scale color will allow us to fade the material in on a more gradual level
You can work with the graph if you wish but for color, it is easier to change the scale mode to RGBA linear color curve – this allows us to control the color of the material over time
The bottom color stops affect the alpha
In order to have the color at its fullest only in the center (and fading at the beginning and end) we need to change the alpha color stops
Left-click and move the left color alpha stop to the right – placing it toward the center
Add a new alpha color stop on the left by left-clicking under the color bar
Double-click on the new alpha color stop and change the opacity to zero
Now we can change the color of the material
Double-click on the top-left color stop and change the color
If you only want one color, copy the hex color and paste it on the right color stop
If you want multiple colors, you can change the right color stop to a new color
You can also add more color by left-clicking between the two color stops to add more color stops
Particle Scale
To change the size of the particle, click on particle update and search for size
Choose scale sprite size to add a module to the emitter node
You can now use the graph to change the size of the particle over time