Compare all eight elements / Unity version of this element

What you will build

Build one lightning bolt named Bolt. Arrange 24 particles as points and join them with a Ribbon, a strip connecting the points. Offset the points to make the lightning zigzag. This is one bolt made from 24 points, not 24 separate bolts. Start with a straight line, then add the bends and brightness.

Join 24 points to make one Bolt. Offsetting the points turns the straight strip into zigzag lightning.
Join 24 points to make one Bolt. Offsetting the points turns the straight strip into zigzag lightning.

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.

  1. 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/Lightning folder. If Niagara is missing, open Edit → Plugins and check that Niagara is enabled.
    Keep the practice scene and its assets together
    Keep the practice scene and its assets together
  2. 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
    Scale reference
  3. Right-click an empty area in the Content Browser and choose FX → Niagara System. Create a system containing the Static Beam emitter template and name it NS_Lightning. If your Unreal Engine version first creates an empty system, choose Add Emitter and add Static Beam.
    Inspect the parent and child roles separately
    Inspect the parent and child roles separately
  4. Drag NS_Lightning 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_Lightning to open it, rename the first emitter Bolt (the main lightning bolt), and set Emitter Properties → Sim Target to CPUSim so the CPU calculates its particles.
    Inspect the parent and child roles separately
    Inspect the parent and child roles separately
  5. 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
    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.

Build the bolt shape, then set its visible duration and endpoints.
Build the bolt shape, then set its visible duration and endpoints.

1. Make and import a grayscale mask

  1. Create a 512×512 RGB, 8-bit Photoshop image on black and draw coverage in white on a separate layer.
    RGB / 8 bit
    RGB / 8 bit
  2. Draw a full-width horizontal white band with an approximately 80-pixel core and soft falloff across about 160 pixels. Keep top/bottom black and the band continuous left/right.
    Black at top/bottom; the white band reaches both side edges
    Black at top/bottom; the white band reaches both side edges
  3. Keep the PSD, export T_BoltBand.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
    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

  1. Create a Material in the Content Browser, name it M_Bolt, 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 Ribbons for this renderer.
    Used with Niagara Ribbons
    Used with Niagara Ribbons
  2. 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
    MaskTex: PNG / Sampler Type = Masks
  3. 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
    Top: color path Bottom: opacity clamped to 0–1
  4. Click Apply, then Save. Right-click M_Bolt in the Content Browser and choose Create Material Instance. Name it MI_Bolt, open it and set Tint to near-white blue. An instance reuses the original wiring while letting you adjust values such as color. Assign MI_Bolt to the Niagara renderer’s Material input.
    Save, then assign it to the renderer that draws the effect
    Save, then assign it to the renderer that draws the effect
Connect the color calculation to Emissive Color, and the mask multiplied by particle alpha to Opacity.
Connect the color calculation to Emissive Color, and the mask multiplied by particle alpha to Opacity.

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 Bolt

Select Bolt. A Beam connects a start and end position. Use the Actor’s position for the start and a fixed Level position for the end, then join 24 points into one Ribbon.

SettingValuePurpose / check
Level / NS_Lightning Location(0,0,5) cmStart just above the floor.
Emitter Properties / Local SpaceOffOff: use Level/world coordinates; moving the Actor does not carry already-emitted particles with it.
Emitter StateSelf; Once; 0.2 s; CompleteA single short effect.
Beam Emitter Setup / Absolute Start; EndOn; OnInterpret both endpoints in world space.
Beam Emitter Setup / StartEngine.Owner.PositionLink the existing owner position parameter.
Beam Emitter Setup / End(0,0,205) cmA fixed world endpoint.
Beam Emitter Setup / Use Beam TangentsOffBegin with a straight baseline.
Spawn Burst Instantaneous / Time; Count0 s; 24Emit 24 particles together 0 seconds after the effect starts. Disable continuous Spawn Rate.
Initialize Particle / Lifetime; Color0.08 s; White A=1Expire all points together.
Beam Width5 cm (constant)Mask coverage also shapes visible width.
Ribbon Renderer / MaterialMI_BoltDo not add a sprite renderer.
Create the beam at spawn, then update its positions before adding the jitter offsets.
Create the beam at spawn, then update its positions before adding the jitter offsets.
Separate polyline positions from the visible duration
Separate polyline positions from the visible duration

4. Update the beam before adding bends

  1. In Particle Spawn, keep Initialize Particle → Spawn Beam → Beam Width in this order. Spawn Beam arranges the points along the line, and Beam Width controls the strip’s width. Keep these template modules; do not replace them with ordinary Shape Location.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  2. In Particle Update, use Particle State → Update Beam → Jitter Position. Update Beam first places the points along the line; Jitter Position then offsets them to create bends. Do not add Gravity, Add Velocity or a position-integrating solver for this setup.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  3. Disable Jitter Position first. Check for one straight line from Z=5 to Z=205. If it disappears too quickly to inspect, temporarily set Lifetime to 0.3 s.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  4. Enable Jitter Position. Begin with Amount 15 cm and Delay -0.01. Amount controls the size of the offsets. Compare Ribbon Tessellation / Curve Tension starting at 0.5 and keep the bends sharp enough to read as lightning. Restore Lifetime to 0.08 s.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
Update Beam places the points along the line, then Jitter Position offsets them. All points disappear after 0.08 seconds.
Update Beam places the points along the line, then Jitter Position offsets them. All points disappear after 0.08 seconds.

The 0.08-second lifetime is a starting point; visible frame count depends on frame rate. The band mask supplies a narrow core and weaker outer coverage. Compare bloom later.

5. Check endpoint and reuse behavior

End is fixed in world space here: moving the Niagara actor moves only Start. To move both, expose End as a user Position parameter and update it externally. Resolve coordinate-space choices before tuning apparent offsets.

For a branch add a separate beam starting near the main bolt’s middle and keep it shorter/thinner. Complete the primary bolt before increasing glow.

Separate polyline positions from the visible duration
Separate polyline positions from the visible duration

Separate width, sample count and timing

Count 24 describes points in one beam, not 24 bolts. Width five is centimeters. For a spatial width profile use the beam’s RibbonLinkOrder, distinct from lifetime NormalizedAge.

Both Absolute endpoints use world Position values here: owner position for Start and a constant for End. A local offset is not a world endpoint.

First playback, restarting and saving

Temporarily use life 0.3 s and Jitter off to inspect endpoints/width. Enable Jitter, restore 0.08 and restart, keeping preview repetition separate from emitter looping.

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

SymptomFirst checkComparison
One endpoint does not followAbsolute/world endpointsRemember the fixed world End and choose a consistent endpoint design.
Jitter disappearsUpdate Beam orderPlace Jitter after Update Beam.
Pulse is easy to missLifetime and previewInspect at 0.3 s, then restore 0.08 s.

Completion checks

  1. Jitter off produces the endpoint baseline.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  2. Jitter on gives a thin angular ribbon.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  3. All points expire after the short lifetime without continuous spawning.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration
  4. The main shape remains readable without bloom.
    Separate polyline positions from the visible duration
    Separate polyline positions from the visible duration

Compare the Unity version and continue

Niagara beam modules, a ribbon and particle lifetime replace Unity line renderers and a C# visibility switch. Point count and width need not match numerically.

Compare with the Unity workflow while checking axes, units and execution order. Continue with another Niagara element.

References