By Zac Jackson
You might have noticed that when creating a new particle emitter in Unreal 4, that it spawns the particles in an instant, and they also instantly disappear. Below, we will be going through the basics of adding a particle system to your level, and playing with its emitter settings to achieve a fading in/out effect.
Note: This tutorial assumes that you already have very basic knowledge of the Unreal 4 Engine.
How to Fade Particles In Using “Scale Color/Life”
You can do this with a “Color Over Life” Module or a “Scale Color/Life” Module within the particle system settings. When choosing which module to use, you need to ask yourself a couple questions. Do you want to redefine your color? Or do you already have a color set already and you just want to modify your existing color?
Since I have a particle color and material in mind already I will be using the “Scale Color/Life” Module. We will go into more detail about this later in this tutorial.
Step 1: Add a Particle System To Your Level
Let’s start off by adding a particle system to our world. To do this, right click in the content browser and choose “Particle System” from the menu.
Once you’ve created and named your particle system (for the sake of this tutorial, I called this one P_tutorial), double-click on it to open up the particle systems emitter settings.
By default there is already an emitter setup, so we are going to edit its settings and add our own modules instead of starting from scratch.
Step 2: Add a Particle Material
Next, we need to change the material on the particle. This is what gives the particle its look. Click on “Required” on the particle emitter, and on the bottom left-hand side of the window, you’ll see things we can change in the “Details” panel.
Use whatever particle material you’d like. For this tutorial, I’ll be using a material that makes my particle look like a flair.
Step 3: Add A Scale Color/Life Module To The Emitter
By default, there is already a “Color Over Life” Module on the emitter that fades my particles out, so I’m going to add a “Scale Color/Life” module to help fade it in. To do this, right-click on the grey area within the emitter panel, scroll down to “Color”, and then choose “Scale Color/Life”.
Note: If you’d like to see how the “Color Over Life” Module fades the particle out, click on the module and look at the bottom right “Details” panel and to see how this is achieved, it will be fairly similar to using a “Scale Color/ Life” Module.
Step 4: Editing The Distribution Float
In the “Details” panel, change the default Distribution from “Distribution Float Constant” to “Distribution Float Constant Curve”.
Next, under the “Alpha Scale Over Life > Constant Curve” section, Add two array elements by clicking on the + sign next to “Points”. There will now be individual parameters that we can change for each point that helps us fade the particle in.
Now, there are two key properties we need to edit. The “In Val” and the “Out Val”. “In Val” is the point along the timeline, and “Out Val” is the value of the Alpha channel of the particle. At this point in the tutorial, your particle system should be invisible in the preview window because the “In Val” or timeline point of 0 is at an “Out Val” or alpha channel value of 0. An “Out val” value of 1 will make our particles visible again.
For point 0, keep both the “In Val” and “Out Val” at 0. For Point 1, change the “In Val” to 0.5” and the “Out Val” to 1.
In the preview window, you should be able to see your particle again and they should also be fading in fairly quickly, and fading out slowly. If you want your particles to fade in slower, change the “In Val” to a higher number like 1.
Your particles should now be fading in, and then fading out!
Fading Particles Out Using “Color Over Life”
I have included this part just to explain how the particles are already fading out by default. Click on the “Color Over Life” emitter, and look at the “Details” panel again.
Notice that the Distribution is also set to “Distribution float Constant Curve”. With this, there are already 2 Points set up for the curve. Point 0’s “In Val” is set to 0, meaning that’s the start of the timeline, and the “Out Val” is set to 1, so that we can see particle immediately as it spawns. Point 1’s “In Val” is set to 1, so that the color changes over time, and the “Out Val” is set to 0, so that farther down the timeline, the particles alpha channel changes to 0 and fades out.
More Particle Tutorials for Unreal Engine
What other particle tutorials would you like to see next? Or do you have a more efficient way of fading particles in and out? Comment below and help us improve this tutorial!