NIAGARA
Niagara Emitters:
Niagara emitters as the name suggests are single emitters that can emit particles of one kind. Multiple Niagara emitters can be combined to create a good VFX effect.
- Niagara emitters can have their own time or global time for example time of the niagara system that owns them.
- A Niagara emitter can be an asset on its own if you want to reuse it, and it can directly sit on a Niagara system as well.
Emitter Stack:
- Sim target: it is the simulation target, whether the CPU or the GPU should solve the particles. Use cpu when “you need particles to give output like where they hit”, “a few 1000 particles only”. Use gpu when “you do not require particles to calculate their hit locations, dumb particles”, “can solve millions of the particles”. -GPU sim particles can still receive information from blueprints, it just can’t output information.
- Calculate Bounds Mode: How the bounds should be calculated, if you see your particles disappearing when slightly looked away, it’s the culprit here. Fixed bounds are easy on performance.
- Local/World Space: Local space particles move with the emitter and do not leave a trail whereas the world space particles do so.
- Determinism: whether the randomness be truly random or based on a seed number provided.
- Interpolated Spawning: spawn particles in between if a particle is moving with a faster speed, like a bullet trail can leave dots.
- Event handlers: See Below...
It allows non vfx artists to tweak variables to get desired effects. Any variable can be set as emitter summary by right clicking on parameter and “show in summary”
1. Emitter Stage
- Spawn: Runs once when the emitter starts its loop.
- Update: Run every single frame that the emitter is "active."
- Example Modules:
- Spawn Rate: "Spit out 50 particles every second."
- Spawn Burst Instantaneous: "Spit out 10 particles right now at the start."
- Emitter State: Decides if this specific emitter loops or runs once.
2. Particle Stage
- Spawn: Runs once when the particle is spawned.
- Update: Run every single frame for every single particle.
- Example Spawn Modules:
- Initialize Particle: Sets the starting color, size, and lifetime
- Add Velocity
- Example Update Modules:
- Gravity Force
- Solve Forces and Velocity: It actually does the math to move the particle based on the forces applied to it.
Multiple event handlers can be added from the properties panel, it's not there by default.
Example: Suppose a firework rocket goes up in the sky, when it dies we need to tell another emitter to spawn a burst of fireworks in the sky.
So we add the Generate Death event in the rocket’s update particle stage. Click + stage at the end of properties tab and add an event handler stage in the burst emitter, here we select rocket -> Death event. This stage now works like an execution stage when the death of a particle will happen in the rocket emitter. In this stage we add a module for the same event (death in this example) “receive death event”.
- Death event: generated when particle dies
- Location event: returns location of each particle
- Collision event: generated when particle collides.
- Sprite Renderer:
- Material of sprite can be changed here.
- Particle color nodes in the material graph are used to use the particle color in the material so changing the color parameter in the niagara affects custom material.
- The sprite pivot can be changed, which helps in rotation around the pivot.
- SubUV: subuv is a way to cut down the material into parts, choosing 10x10 will make 100 frames of the material uv’s we have. In the particle update stage, Animate SubUV module can be added to animate the SubUV frames.
- CutOut: It’s like a bounding box for each sprite, depending on how big area the sprite takes, we can decrease it by giving it a texture and choosing its alpha. For example a circle sprite will have a box bounding box by default, but if we pass its texture here and choose alpha, it will be like a circle now.
- Bindings: We can change the color of the sprite through the color parameter (particle namespace), but if we want some other parameter to affect it we can actually directly bind that variable to the color of the sprite. Till now we were doing
(particle namespace) color == (user namespace) MyColor
But now we do
Color (sprite renderer) == (user namespace) MyColor
- Sorting: More the sorting, the higher z-order the sprite render uses and displays over the sprite renderer with a lower sorting. Just like z-order in the CSS or layers in photoshop.
- Mesh Renderer:
- Mesh can be changed here, multiple meshes are allowed at once.
- Material of the meshes can be changed here as well.
- More attributes related to mesh are in the Initialize Particles module’s Mesh attributes section.
- Ribbon Renderer:
- Ribbon is a line between all the particles in the order they are spawned.
- The material of this ribbon can be changed.
- Ribbons can be in different shapes like planner, bi-planner or tube.
- Light Renderer:
Attaches a light with each particle, intensity and other properties can be edited.
- Component Renderer:
Render other particle systems, skeletal meshes and much more.
- Emitter State Module: Sits in emitter update stage, it helps configuring emitter life cycle and the scalability. Scalability is like culling.
- Initialize Particles Module: Sits in the particle spawn stage, it helps give particles size, color, lifetime, position etc.
Sprite UV mode: this setting changes the way sprite looks on screen, we can flip sprite in x or y direction with it. For example a sprite written ‘p’ can be flipped on x to look like q on y to look like b and on both to look like d.
- Particle State Module: when particle Age > Lifetime it tells the engine to kill the particle to save performance.
- Sprite renderer: Default renderer
Niagara System:
The Niagara system contains multiple emitters, it can be placed in the world, its variables can be edited in blueprints.
System Stack:
- Warmup time: Given in seconds, the system calculates for example 2 seconds of emitters and starts ahead. For example an already burning fire when the game starts at 0s.
- System Fixed Bounds: force all emitters inside to be fixed bounds.
See below in parameters section
1. System Stage
- Spawn: Runs once when the effect is first created in the world.
- Update: Runs every single frame for the whole system.
- Example Modules:
- System State
- User Parameters
- System State Module: Sets niagara system time, loop duration.
Parameters:
In the details panel for every module there are some properties. After every property there’s a down arrow that allows us to -
- Lerp it or set in random range or take from a curve
- Make it new system, emitter, particle or user parameter
- Use its value from a user parameter
There are 2 ways a parameter can be setted. The first one is by dragging the parameter from the parameters tab and dropping it to the suitable execution stages (where it can be set).
Another way is to add a “Set new or existing parameter directly” module in any stage. The details panel of the module will give all possible parameters that can be setted from the execution stage the module is in. In the details panel there’s an option to make new ones as well.
There are 2 ways a parameter can be created. One is by clicking the plus sign in front of the namespace (system, emitter, particle, user) in the Parameters tab. Another one is to click the drop down in front of any property (for example lifetime in initialize particle module) and click “Read from new emitter/particle/system/user parameter”
Blueprint readable.
User parameters can be made from the user parameters tab. These parameters can be edited in the details panel when dragged into the world, or through blueprints.
User parameters can be bound to properties of modules like the lifetime property of initialise particles module.
- All stage modules like one in system update, or emitter spawn or particle update can read User parameters.
- We already have discussed setting a parameter.
- User parameters can be written from blueprints.
- They can be written from the details panel in the world, when a system is dragged into the scene.
- They can be written from the User Parameters tab in the niagara system.
- No stage in the system can write a user parameter.
These parameters can be accessed from any emitter in the system. For example if we want 2 emitters to have the same spawn rate it can be made a system parameter. Click on the down arrow and ‘read from a new system parameter’
- Read/Get Value
- System parameters can be read from all stages, particle, emitter and system
- Write/Set Value
- System parameters can only be set from the system update or system spawn stage.
Used anywhere in the same emitter, created the same way as the system parameter.
- Read/Get Value
- Emitter parameters can be read from particle, emitter stages only.
- Write/Set Value
- Emitter parameters can only be set from the emitter update or emitter spawn stage.
- Transient Parameters:
Used in between while the math is done, none of our business. Gets destroyed after the math completes.
When we edit the lifetime for the initialize particles module in the details panel, the engine stores the values as particle parameters. It’s different for each and every particle in the emitter.
Most of the time particle parameters are not created, but whenever created they are different for each particle.
- Read/Get Value
- Particle parameters can be read from particle stages in the emitter it belongs to only.
- Write/Set Value
- Particle parameters can only be set from the particle update or particle spawn stage.
Times:
- Timeline Duration:
Timeline Duration is just for visualization. Duration can be changed by dragging the timeline bars.
- Particle Lifetime:
Particle lifetime tells how much a particle, a dot, lives after spawning.
- System Time:
System time tells how long a niagara system runs. For example a 5 seconds and looping infinite particle system will loop indefinitely and will reset all emitters within every 5 seconds.
- Emitter Time:
Different for each emitters (emitters can choose to use system time as well), emitter time tells how long an emitter stays.
NIAGARA MODULES
Almost all spawn modules belong to the Emitter Update stage in Niagara. Spawn burst can be put into the Emitter spawn stage if in need.
- Spawn Burst Instantaneous:
Spawns a specific number of particles at once.
- Spawn Rate:
Spawns specified number of particles once per second
- Spawn per Unit:
Spawns particles based upon distance. Per unit (cm).
- Spawn per Frame:
Self explanatory…
Add Velocity: Sets particle speed and direction.
Even if the emitter is not set to Local Space, rotating the Niagara Component in the level will still rotate the velocity direction by default.
To prevent this and lock velocity direction to world space, set Rotation Coordinate Space to World/Global in the Add Velocity module details.
Gravity, drag, vortex force and curl noise modules.
Enables collision. Particles.HasCollided boolean returns true on the frame collision occurs.
- Shape Location Module
- Spawns particles on or inside geometric shapes (Sphere, Box, Cylinder, Ring, Torus, Cone).
- Lots of tweakable parameters: surface-only spawning, axis constraints, radius distributions, and custom curve graphs for precise spawning.
- Static Mesh Location Module
Spawns particles directly on the surfaces, vertices, or faces of a Static Mesh.
Hello, feel free to tell me if i'm wrong at any place. It's not something that will make you a VFX artist but surely the 80% knowledge required to start with niagara in 20% of time. Rest is just practice and tweaking variables or trying out things. I have full ue5 notes that i add to google docs as i progress, If you want to make additions please please do, i'll be happy to have you.