Creating the Flame

The “Looping” setting makes the system loop after its full duration, so for the purpose of creating a dynamic flame that never goes out, we want to check this box.

“Start Speed” sets the particle’s speed once it is created. Let’s set it at 1 to slow down the particles.

Start rotation rotates the object itself, so let’s set this to 60 degress.

The “Start Color” setting sets the particle’s color. In order to make a realistic flame, we want our particle to be a deep orange color, similar to the one you see in the following image:

Make sure the Play On Awake box is also checked off so that the system begins generating particles as soon as the particle system object comes into the scene at the start of the game.

Next, find the Shape panel and click on it to open up an extensive list of options. These will all be used to alter the exact shape of the particle-emitter system.

Selecting a different shape will change the way your particles are distributed in the space. Sphere for instance, distributes particles out in every direction. Experiment with these to your heart’s content, but for the purposes of this tutorial please select Cone.

Change the Angle setting to 0, which makes the particles shoot straight up.

Next change the Radius to 0.1, to make the particle distribution cone relatively narrow. The smaller the radius, the narrower the distribution cone will be.

Next open the Size over Lifetime panel.

Tick the small white box to activate the panel. Then click on the grey box next to Size to make the Particle Systems Curves graph appear. Select the leftmost curve.

This graph charts the size of a particle over its lifetime. To edit the graph, click and drag the small red point indicated in the picture below:

To make the flame look more realistic, set it roughly to where the point has been dragged to in the following image:

Next, open and activate the Rotation over Lifetime panel.

The higher the Angular Velocity of the particles, the more they will swirl around as they rise. Let’s set this to 60.

Now create a new Material and name it “Flame”.

Then drag the image of the fire from the link at the start of this tutorial into Unity.

Then select your flame material and switch to debug mode.

Then go to Save Properties, Text Env, _Main Tex and drag the fire image into the Texture field.

Now drag the flame material onto your Particle System to make it a child. It will look weird at the moment but don’t worry as we will be changing it soon.

Now set the Flame Image’s inspector back to normal mode.

With Particle System selected, click on the Shader drop-down menu.

Select Particles and then Additive. This shader gets rid of the black areas of the image.

If you want to give your flame a softer look, you can also click Additive (Soft), also under the Particle menu.

Now create a new Point Light by going to the GameObject tab in the top bar and then clicking Light and then Point Light. This will produce a glow on any surrounding in-game objects, which is what we want to make our flame realistic in the way it lights up its surroundings.

With Point light selected, Reset the Transform position.

Now drag the object’s Y position so that it’s a little lower than mid-way up the flame.

Change the light’s color to a yellowy-orange.

Now increase the light’s intensity. Let’s set it to 2.3.