In this tutorial we’ll see how to create special effects in
our games, we gonna split the tutorial in two parts, starting in how to create
fire with the particle system, creating a fire effect which you can use for
torches or so, and the second part will be how to create smoke effect using
particles as well.
To start what you have to know is that the most important
thing or fact in an effect like fire using the particle system (Shuriken) in
Unity, is the texture, we can change parameters in our effects and make it look
as we like, but if we don’t have a good texture which define the effect’s
design, it won’t look very good.
Said this, let’s move forward, first and very important as
we said is get a good texture. We’ll use this one in this tutorial and you can
download it to use it and follow the tutorial
Or you can créate one by yourself, in other tutorial I’ll
teach how to créate a good texture for particles in Unity.
Now let’s créate a new material for particles which we will
use to create our fire, head toward the project window and hit Create >
Material and we are going to name it Fire, next in the inspecto we’ll change
the shader from Diffuse to Particle > Additive and the main texture place
our texture.
Now that we have the material ready to use, hit GameObject
> Create Other > Particle System and in the scene you can see a buch of
white dots as particles.
Now in the inspector we can notice the particle system
(Shuriken) all the settings that we can modify in the particles, let’s begin
and head toward the bottom side of the settings in the inspector to reach at
the Renderer window, change the default material with the material we made
before, we can see how the white dots have changed to out texture’s shape, but it
doesn’t look like fire yet, right? Ok, even if our texture is the most
important, is not enough to reach at the effect we want to get, to get there we
have to change the settings in our particles.
Let’s change the settings for our fire particles.
Particle System
Emision and Shape
Color over Lifetime
1 = Color (White), Alpha (0).
2 = Color (R: 255 - G: 202 - B: 25), Alpha (255).
3 = Color (R: 111 - G: 0 - B: 0), Alpha (255).
4 = Color (Black), Alpha (0).
Size over Lifetime
Renderer
IMPORTANT: if we want to know what is an option for, just
place the cursor over it without move it and a tooltip will appear with the
explanation.
You can change it as you like, but that is the configuration
that worked for me, but you can modify it as you want to, color, size, texture,
imagination is the limit!
~ Sycmasters