Compare all eight elements / Unity version of this element
What you will build
Build a charge-up followed by a flash. Gather moves small light particles from a radius of 70 cm to 10 cm in 0.5 seconds. Flash appears once at the center, 0.5 seconds after the effect starts. Set particle positions directly so they approach the center without overshooting it.
Preparation: coordinates and a test level
Use Niagara, Unreal Engine 5.8’s particle-effects editor. An Emitter emits particles; a System combines emitters into one effect. Choose a regular Niagara emitter, rather than Lightweight Emitters or Niagara Fluids. Other Unreal Engine versions may show different creation dialogs or control names. The instructions retain the English control names so you can find them in the editor.
- Open a 3D project using the Blank template. Save a practice Level: the scene where you place and test the effect. In the Content Browser, the panel listing your assets, create a VFX/Light folder. If Niagara is missing, open Edit → Plugins and check that Niagara is enabled.
Keep the practice scene and its assets together - Add a standard cube for the floor. Set Location to (0,0,-5) and Scale to (4,4,0.1). Unreal uses Z-up and centimeters; the original cube is 100 cm wide, so its top surface is now at Z=0. Add a second cube at (200,0,50), scale one, as a size reference.
Scale reference - Right-click an empty area in the Content Browser and choose FX → Niagara System. Create a system containing the Simple Sprite Burst emitter template and name it NS_Light. If your Unreal Engine version first creates an empty system, choose Add Emitter and add Simple Sprite Burst.
Inspect the parent and child roles separately - Drag NS_Light from the Content Browser into the Level. This placed object is an Actor. Set its Rotation to zero and Scale to one. Double-click NS_Light to open it, rename the first emitter Gather (the inward-moving light particles), and set Emitter Properties → Sim Target to CPUSim so the CPU calculates its particles.
Inspect the parent and child roles separately - Open System State and set Loop Behavior to Once, with Loop Duration 3 seconds. Open Emitter State and choose Self, Once, a two-second duration and Inactive Response Complete. Once plays it once. Self uses the emitter’s own timing; Complete lets existing particles finish after emission stops.
Set timing for the whole effect and each emitter
Preview is the playback window inside the Niagara Editor. Its repeat-playback button is separate from the emitter’s own loop settings above. Keep the camera still and use a light-gray floor. If automatic exposure keeps changing the screen brightness, lock exposure with a Post Process Volume before comparing the effect.
Read Niagara inputs and execution groups
Select an emitter in System Overview, the effect’s structure panel. Add a Module, a block that performs a task such as setting speed or size, using a group’s + button. The dropdown beside an input lets you choose a fixed Direct Set value, a Random Range between minimum and maximum, or a Float from Curve graph. Initialize Particle sets starting values. Lifetime is how many seconds a particle remains alive; choose Direct Set for a fixed duration or Random for a range. Select a mode before entering values if it currently says Unset.
Emitter Update decides when and how many particles to emit. Particle Spawn runs once when each particle appears, setting its initial position and speed. Particle Update runs every update while that particle is alive, changing its movement and appearance. Modules within a group run from top to bottom. A Renderer draws particles as flat images (Sprites), 3D shapes (Meshes), or connected strips (Ribbons).
A curve changes a value over time. With Float from Curve, link Curve Index to the specified time variable. Particles.NormalizedAge is progress through the particle’s lifetime: zero when it appears and one when it disappears. It is not a time in seconds. Add keys, the points on the graph, and enter their horizontal Time and vertical Value. Start with Linear interpolation, which connects keys with straight lines. RGB controls color; Alpha, or A, controls how strongly the particle is visible. Set these separately.
1. Make and import a grayscale mask
- Create a 512×512 RGB, 8-bit Photoshop image on black and draw coverage in white on a separate layer.
RGB / 8 bit - Make a roughly 320-pixel white-centered radial gradient fading to black, retaining black image edges and a white center.
Keep black margins - Keep the PSD, export T_LightDot.png and import it. Disable sRGB, use Masks (no sRGB) compression and Clamp addressing for X/Y; save the texture.
Connect image brightness to opacity: black disappears
Use this image as a grayscale mask. R means the red channel; in a grayscale image it also represents brightness. Connecting R to the material’s Opacity makes white visible and black transparent. Importing a black-background image alone does not remove its background.
2. Build a particle-color material
- Create a Material in the Content Browser, name it M_Light, and open it. A Material defines a surface’s color and transparency. Use Surface domain, Additive blending, which adds light to the background, and Unlit shading, which displays the color without scene lighting. Enable Two Sided to show the back and Used with Niagara Sprites for this renderer.
Used with Niagara Sprites - Right-click an empty area of the Material Editor graph and search for Texture Sample Parameter2D. Add that node and name it MaskTex and assign your PNG. Choose Masks as the sampler type. Add a Vector Parameter named Tint for color. Add two Scalar Parameters named Intensity for brightness and Opacity for visibility. Set Tint to white and both scalar defaults to one.
MaskTex: PNG / Sampler Type = Masks - Add Particle Color to receive Niagara’s particle color RGB and alpha A.
Color connection: add two Multiply nodes. Connect Particle Color RGB to A of the first node and Tint RGB to B. Feed that result into A of the second node and Intensity into B. Connect the second result to Emissive Color.
Transparency connection: add two more Multiply nodes. Feed MaskTex R and Particle Color A into the first. Multiply that result by Opacity in the second. Connect its result to Saturate, which limits values to zero through one, then connect Saturate to the material’s Opacity.
Top: color path Bottom: opacity clamped to 0–1 - Click Apply, then Save. Right-click M_Light in the Content Browser and choose Create Material Instance. Name it MI_Light, open it and set Tint to pale gold. An instance reuses the original wiring while letting you adjust values such as color. Assign MI_Light to the Niagara renderer’s Material input.
Save, then assign it to the renderer that draws the effect
Including Particle Color A lets Niagara’s Scale Color gradually fade the particle. Alpha zero is invisible; one keeps the original visibility. Intensity adjusts brightness, while Opacity adjusts how strongly the image shows. An emissive-looking particle does not automatically add a Light to illuminate the floor or walls.
For editor basics see the UE material walkthrough.
3. Assemble Gather
Select Gather. Emit 20 particles, then move them inward by changing their distance from the center with Scratch Pad modules. Set their positions directly rather than accelerating them with an attraction force.
| Setting | Value | Purpose / check |
|---|---|---|
| Level / NS_Light Location | (0,0,100) cm | Keep the 70-cm shell above the floor. |
| Emitter Properties / Local Space | On | On: measure positions relative to the effect’s center; moving the Actor also moves existing particles. |
| Spawn Burst Instantaneous / Time; Count | 0 s; 20 | Emit 20 particles together 0 seconds after the effect starts. Disable continuous Spawn Rate. |
| Initialize Particle / Lifetime; Color | 0.5 s; White A=1 | Gather phase. |
| Initialize Particle / Sprite Size | Random Uniform 5–8 cm | Keep gathering dots small. |
| Shape Location / Sphere Radius | 70 cm | The next scratch projects points to the shell. |
| Sprite Renderer / Material | MI_Light | Begin at intensity one. |
Omit velocity, gravity, attraction and integration. Write positions after Particle State. The initialization below projects even volume-distributed sphere samples onto the same shell.
4. Store a birth direction
A Scratch Pad lets you build your own Niagara processing block with nodes. Create SaveGatherDirection using the required group’s + menu → New Scratch Pad Module. Right-click an empty graph area and search for a node by name to add it. The white Parameter Map wire carries particle data; connect Input Map → Map Set → Output Module. Branch from Input Map to Map Get to read values. Feed your calculated result into Map Set to save it on the particle. Click Apply & Save, then compile the System. Any formula below describes the nodes to connect; it is not text to paste as code.
- Add SaveGatherDirection after Shape Location in Particle Spawn. Read Particles.Position with Map Get and convert it to a Vector, three X/Y/Z values. Use Length to find its distance from the center and Normalize to keep only its direction with length one. Local Space places the center at (0,0,0).
Fade before the particles pass through the center - Use Select to choose the normalized direction when Length is above 0.001; otherwise choose the constant (1,0,0). This handles points too close to the center to have a useful direction. Save the chosen value in a new Vector attribute named Particles.StartDirection through Map Set.
Fade before the particles pass through the center - Multiply the chosen direction by 70 and connect that result to Particles.Position in the same Map Set. Keep StartDirection at length one; use the multiplied value only for the starting position, 70 cm from the center.
Fade before the particles pass through the center - Click Apply & Save and Compile. Before adding the next update module, play the effect. Points should appear on the surface of a sphere and stay still. This confirms the starting positions are ready.
Fade before the particles pass through the center
5. Shrink the radius over lifetime
Next, make a separate Scratch Pad module named GatherPosition. Use Particle Update’s + menu → New Scratch Pad Module. Connect Input Map → Map Set → Output Module and read the required inputs with Map Get.
- Create GatherPosition after Particle State in Particle Update. Read Particles.StartDirection, the direction saved at spawn, and Particles.NormalizedAge, progress through the particle’s lifetime.
Create GatherPosition · Particle State · Read - Pass NormalizedAge through Saturate to keep it between zero and one. Connect it to Lerp’s Alpha. Lerp blends between its A and B values: set A=70 and B=10 so the radius changes from 70 to 10. Multiply the result by the saved direction.
Fade before the particles pass through the center - Connect the result to Map Set → Particles.Position, then Apply & Save. Recalculate the position from the saved starting direction each update. Do not add it to the current position. The particles will approach a radius of 10 cm without crossing the center.
Fade before the particles pass through the center
u = saturate(Particles.NormalizedAge)
r = lerp(70, 10, u)
Position = Particles.StartDirection × r
Use normalized alpha keys (0,0), (0.1,0.8), (0.8,0.8), (1,0) with RGB scale one. Traveling 60 cm over 0.5 s leaves a ten-centimeter gap without overshoot.
6. Start Flash at 0.5 seconds
- Paint a white central disc and narrow cross on a separate black image as T_FlashMask. Duplicate MI_Light to MI_Flash, replace the mask and use near-white tint.
Black margins become transparent - Add a new Simple Sprite Burst as Flash. If duplicating Gather, remove its shape and both scratch modules so Flash remains at the center.
Remove the gathering motion from Flash - Use local space, Self/Once/two seconds/Complete, one burst at 0.5 s and no rate. Initialize lifetime 0.25 s, zero offset, white/alpha one, size 120 cm and MI_Flash.
Time since playback started → - Use alpha keys (0,0), (0.08,1), (1,0). Start intensity one before comparing two to four. The peak is about 0.02 s after Flash birth, or 0.52 s after system start.
Most visible
Check position types and time origins
StartDirection is a vector and Niagara Position is a distinct type. Use Position/vector conversion as required. Store cross-stage data in the Particles namespace, not a temporary module value.
Gather travels 70→10 cm in 0.5 s, a constant 120 cm/s. Flash delay is system seconds; alpha age 0.08 is normalized particle life. Peak time is 0.5+0.25×0.08≈0.52 s.
First playback, restarting and saving
Disable Flash to inspect the gather shell and endpoint. Restore it and restart for the 0.5-second onset. If points overshoot, check for leftover velocity/integration modules.
To test again, stop Preview and move the Timeline playback position back to the start. Choose which emitters are enabled, then play. Enabling another emitter halfway through can give it a different start time, so restart when comparing parts.
After editing a Scratch Pad, click Apply & Save. Compile the System to check its processing graph, fix any errors, then save it. Apply and save the Material too. Test the placed effect in the Level and save the Level. Changes to a placed effect’s Component during Level Play can be temporary; make lasting adjustments in the Niagara System asset.
Troubleshoot one variable at a time
| Symptom | First check | Comparison |
|---|---|---|
| No inward movement | Update scratch and stored direction | Save StartDirection at spawn and write Position in update. |
| Motion accelerates unexpectedly | Accumulation versus assignment | Overwrite Position with StartDirection×r; do not add it. |
| Flash appears on the shell | Copied modules | Remove shape, scratch and velocity from Flash. |
Completion checks
- Gather alone moves from shell to center vicinity.
Fade before the particles pass through the center - Flash starts once at system time 0.5 s.
Emit Flash once, 0.5 seconds after the system starts - Gather and peak remain distinct without bloom.
Check gathering and the brief flash as separate phases - The core reads at small size against light/dark backgrounds.
Compare whether the core and shape remain visible
Compare the Unity version and continue
This version replaces Unity radial velocity with stored direction and a position Lerp, making the 70→10-cm distance and 0.5-second duration explicit.
Compare with the Unity workflow while checking axes, units and execution order. Continue with another Niagara element.