How to Create a Particle Light

How to create a particle light within your Niagara system.

Windows
MacOS
Linux
Prerequisite Topics

This page assumes you have prior knowledge of the following topics. Please read them before proceeding.

When you give particles the ability to illuminate the world around them, it can add an extra layer of realism to any of your project's visual effects. In the following how-to, we will take a look at setting up a Niagara emitter so that particles and lights are spawned at the same time.

Prerequisite step: This how-to uses the M_Radial_Gradient Material, which is found with the Starter Content. You should create a new project that includes the Starter Content, or use a project that was created with Starter Content included.

Create the System and Emitter

Unlike in Cascade, Niagara emitters and systems are independent. The current recommended workflow is to create a system from existing emitters or emitter templates.

  1. First, create a Niagara System by right-clicking in the Content Browser, and from the displayed menu select FX > Niagara System. The Niagara Emitter wizard displays.

    Click image for full size.

  2. Select New system from selected emitters, then click Next.

    Click image for full size.

  3. Under Templates, select Fountain.

    Click image for full size.

  4. Click the Plus sign (+) icon to add the emitter to the list of emitters to add to the system, then click Finish.

    Click image for full size.

  5. Name the new system ParticleLight. Double-click to open it in the Niagara Editor.

    Name System

  6. The emitter instance in your new system has the default name of Fountain. You can rename it, however. Click the name of the emitter instance in the System Overview, and the field will become editable. Name the emitter FX_ParticleLight.

    Click image for full size.

  7. Drag your ParticleLight system into your Level.

When you make a particle effect, it is always a good idea to drag your system into a Level. This gives you a chance to see every change and edit in context. Any changes you make to the system automatically propagate to the instance of the system in your level.

Edit the Emitter Update Group Settings

First, you will edit the modules in the Emitter Update group. These are behaviors that apply to the emitter, and that update each frame.

  1. In the System Overview, click the Emitter Update group to open it in the Selection panel.

    Click image for full size.

  2. Expand the Emitter State module. Because you used the Fountain template, the Life Cycle Mode is set to Self. Click the dropdown and set the Life Cycle Mode to System. This enables your system to calculate the lifecycle settings, which usually optimizes performance.

    Click image for full size.

  3. The Spawn Rate module creates a continuous stream of particles while the emitter is active. This module is already present in the Fountain template. Set the Spawn Rate to 500.

    Click image for full size.

Edit the Particle Spawn Group Settings

Next, you will edit the modules in the Particle Spawn group. These are behaviors that apply to particles when they first spawn.

  1. In the System Overview, click the Particle Spawn group to open it in the Selection panel.

    Click image for full size.

  2. Expand the Initialize Particle module. This module collects several related parameters together in one module, minimizing clutter in your stack. Under Point Attributes, locate the Lifetime parameter. This parameter determines how long particles will display before they disappear. For this effect, you will use a dynamic input called Uniform Ranged Float to randomize how long the particles display. Uniform Ranged Float is already applied to the Lifetime parameter in the Fountain template. Set the Minimum and Maximum values to the following.

    Click image for full size.

    Setting

    Value

    Minimum

    1.75

    Maximum

    2.5

  3. Also under Point Attributes, locate the Color parameter. This sets the initial color of the particles when they spawn. Set the RGB fields to the following values.

    The Unreal Engine Color Picker normalizes RGB color values to an integer between 0 and 1. However if you set a color value greater than 1, it becomes emissive color. The particles will glow that color when the system is placed in the Level.

    Click image for full size.

    Setting

    Value

    Red

    .1

    Green

    .3

    Blue

    50

  4. Under Sprite Attributes, locate the Sprite Size parameter and check the box to enable it. To add some randomness to the size of the fountain particles, you can add dynamic inputs. The first one to add is the Vector 2D from Float. Click the downward arrow next to Sprite Size, and select Dynamic Inputs > Vector 2D from Float. This replaces the Sprite Size X and Y fields with a single Value field.

    Click image for full size.

  5. Now click the downward arrow next to Value, and select Uniform Ranged Float. This adds Minimum and Maximum fields to the Value.

    Click image for full size.

  6. Set the Sprite Size Minimum and Maximum values to the following.

    Click image for full size.

    Setting

    Value

    Minimum

    2.5

    Maximum

    8.0

  7. Sphere location controls the shape and origin of where sprites spawn. You can set the size of the sphere shape by indicating a radius. The Sphere Location module is included in the Fountain template. Set the Sphere Radius to 15.

    Click image for full size.

  8. The Fountain template also contains the Add Velocity in Cone module. This adds movement to the particles when they spawn. The point of the cone is at the particle spawn point, and you can set X, Y, and Z values to determine in which direction the cone expands. The Velocity Strength has a dynamic input called Uniform Ranged Float applied. Set the Minimum and Maximum values to the following. Leave the other settings at their default values.

    Click image for full size.

    Setting

    Value

    Minimum

    300

    Maximum

    600

Edit the Particle Update Group Settings

Now you will edit the modules in the Particle Update group. These behaviors apply to an emitter's particles and update each frame.

  1. In the System Overview, click the Particle Update group to open it in the Selection panel.

    Click image for full size.

  2. The Gravity Force module simulates how gravity affects objects. The Drag module applies drag to the particles, which slows them down. The default settings for Gravity Force and Drag work for this effect, so you can leave them that way.

  3. Without setting up collision, the particles in your effect will just fall through the floor or any other solid objects in the level. To add a Collision module, click the Plus sign (+) icon for Particle Update and select Collision > Collision.

    Click image for full size.

  4. The Collision module is inserted at the bottom of the stack, after the Solve Forces and Velocity module. This causes an error. Click Fix Issue to move the Collision module and resolve the error.

    Click image for full size.

  5. Leave the default settings for the Collision module in place.

Add the Light Renderer

Now you will add the Light Renderer to the fountain effect.

  1. In the System Overview, click the Render group to open it in the Selection panel.

    Click image for full size.

  2. Click the Plus sign (+) icon for Render, and select Light Renderer.

    Click image for full size.

  3. Set the Radius Scale to 5.0. This determines how far from the particle spawn point the light spreads.

    Click image for full size.

  4. The Color Add values enable you to change the color of the light emitted by the effect. These values are labeled with X, Y, and Z; however they correspond to RGB values, with X=Red, Y=Green, and Z=Blue. To match the light color with the particle color, set the values to the following.

    Setting

    Value

    Red

    0

    Green

    0

    Blue

    15

End Result

Congratulations! You have created an effect that includes a particle light, and that emits light in your scene.

Tags
Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback