Compare all eight elements / Unity version of this element
What you will build
Build a small campfire. Flames is the main flame: it rises, narrows and fades. Sparks adds small, fast embers, and Smoke adds larger, slower clouds. Keep these three parts separate so you can adjust each part without changing the others.
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/Fire 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_Fire. 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_Fire 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_Fire to open it, rename the first emitter Flames (the main flame), 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 Infinite, with Loop Duration 2 seconds. Open Emitter State and choose Self, Infinite, a two-second duration and Inactive Response Complete. Infinite repeats the effect. 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 - Draw three white tongues rising from the lower center. Vary the heights, taper the tips and leave at least 32 pixels of black margin.
Keep black margins - Soften the edges by about two to four pixels. Preserve broad readable white shapes before adding small detail.
Keep black margins - Keep the PSD, export T_FlameMask.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_Flame, and open it. A Material defines a surface’s color and transparency. Use Surface domain, Translucent blending, which layers a partly transparent image over 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_Flame in the Content Browser and choose Create Material Instance. Name it MI_Flame, open it and set Tint to orange. An instance reuses the original wiring while letting you adjust values such as color. Assign MI_Flame 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 Flames
Select Flames. Spawn Rate continuously emits particles and Add Velocity gives them upward speed. Build this main flame before adding sparks and smoke.
| Setting | Value | Purpose / check |
|---|---|---|
| Level / NS_Fire Location | (0,0,10) cm | Place just above the floor. |
| Emitter Properties / Local Space | Off | Off: use Level/world coordinates; moving the Actor does not carry already-emitted particles with it. |
| Emitter Update / Spawn Rate | 25 /s | Emit 25 particles each second. Remove or disable the burst, which emits a group at once. |
| Initialize Particle / Lifetime | Random: 0.8–1.2 s | Per-particle lifetime. |
| Initialize Particle / Color; Mass | White, A=1; 1 | Keep particle tint neutral. |
| Initialize Particle / Sprite Size | Random Non-Uniform: (35,45)–(55,70) cm | A narrow upright card. |
| Shape Location / Ring-Disk Radius | 12 cm | A small XY emission area. |
| Add Velocity / Linear | Random Range Vector: (-10,-10,100)–(10,10,160) cm/s | Use positive Z for rise. |
| Sprite Renderer / Material | MI_Flame | Begin camera-facing and unaligned. |
Order spawn as Initialize Particle → Shape Location → Add Velocity. Retain Particle State → Solve Forces and Velocity in update and omit gravity. Read dependency errors and verify the resulting order after Fix Issue.
4. Shape the flame’s birth and disappearance
- In Particle Update, add Scale Sprite Size to vary the flame’s size over its lifetime. Set the uniform Scale Factor to Float from Curve and link Curve Index to Particles.NormalizedAge. Add keys (0,0.3), (0.25,1), (1,0.1). Each particle starts small, becomes full-sized, then narrows near the end.
Age = seconds / NormalizedAge = lifetime progress - Add Scale Color in Particle Update. Keep RGB scale one. Set Scale Alpha to Float from Curve, using Particles.NormalizedAge, with keys (0,0), (0.1,1), (0.65,0.7), (1,0). This makes the flame appear and disappear gradually.
Smoke - Play Flames alone before adding the other parts. Check that the particles rise, grow, then become small and faint. For an optional wobble, add Curl Noise Force before Solve Forces and Velocity. Begin at zero strength and increase it gradually.
Smoke
5. Separate sparks and smoke
- Duplicate Flames and name the copy Sparks, the embers. Use a separate small white-dot mask and material instance. Set Spawn Rate to four particles per second, Lifetime to 0.3–0.6 s, Sprite Size to 3–6 cm and Z speed to 200–300 cm/s. Keep X/Y around ±10. These smaller particles move upward faster than the flame.
Smoke - Duplicate Flames again and name the copy Smoke. Paint a soft white disc on a black 512-pixel image. Make a separate gray translucent instance named MI_Smoke, set its Opacity to 0.2 and assign it to Smoke. Keep MI_Flame unchanged so adjusting the smoke does not recolor the flame.
Smoke - For Smoke set Spawn Rate to six particles per second, Lifetime to 1.5–2 s, size to 40–70 cm, Z speed to 20–40 cm/s and X/Y to ±5. Do not add gravity. Set the size curve from 0.5 to 1.5 so smoke expands as it rises. Use alpha keys (0,0), (0.2,0.5), (1,0).
Smoke - Use each emitter’s enable switch to show Flames, Sparks and Smoke one at a time, then together. Sparks should be smaller and faster than the main flame. Smoke should be larger, slower and remain visible longer.
Smoke
Check units and duplicated settings
A sprite size of 35 means 35 cm, not pixels. Visible mask coverage can be smaller than the card. At 25/s and maximum life 1.2 s, roughly thirty flame particles remain.
For Sparks/Smoke recheck copied rate, lifetime, size, velocity, material and curves independently. Begin at shader intensity one and compare reduced smoke opacity.
First playback, restarting and saving
Enable Flames alone for roughly two seconds and inspect rise, taper and fade. Restore Sparks and Smoke one at a time and compare their speeds and lifetimes.
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.
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 |
|---|---|---|
| Visible rectangles | Material opacity path | Read mask R rather than its opaque A and include particle alpha. |
| No upward travel | Velocity and solver | Check positive Z and an update solver. |
| Smoke glows like fire | Instance and blend mode | Isolate Smoke with translucent gray low-opacity shading. |
Completion checks
- Upward taper remains readable without hue.
Smoke - Isolated layers have distinct speeds, lifetimes and sizes.
Smoke - Existing world-space particles remain when the actor moves.
Smoke - Before adding many fires, profile transparent overlap on the target device.
Change one variable, then remeasure
Compare the Unity version and continue
Re-enter Unity upward Y velocity as Niagara Z velocity in cm/s. Material color/alpha input changes from Vertex Color to Particle Color.
Compare with the Unity workflow while checking axes, units and execution order. Continue with another Niagara element.
References
- Epic: Niagara overview
- Epic: Emitter Update and life cycle
- Epic: Particle Spawn modules
- Epic: Particle Update modules and execution order
- Epic: Niagara renderers and bindings
- Epic: Sparks, smoke and CPU collision
- Epic: Material inputs
- Epic: Particle material expressions
- Epic: Texture properties
- Epic: Units of measurement