Game Development Reference
In-Depth Information
Step 3. Rename the particle system Smoke and reposition it in the top
of the chimney of the log cabin.
Step 4. Select Smoke in the Hierarchy and locate the Ellipsoid Particle
Emitter component in the inspector. This is the object spawning the
particles.
Step 5. Set the World Velocity y value to 2. Note how the particles
start to move upward.
Step 6. Change the Min Size to 3 and the Max Size to 4. This is the
range of sizes between which particles will be scaled.
Step 7. Modify the Min Energy to 5 and the Max Energy to 15. This
is the range of lifetime given to individual particles. Note how the
particles go farther up. This is because they are living longer than
before.
Step 8. Change the x and z values for Rnd Velocity to 0.5. This will
give each particle a random x and z value added on top of any world
or local velocity. In this case it will make the particles go up and
slightly out.
Step 9. Below in the Particle Animator component set the x value for
force to 0.5. This will apply a constant force in the x direction to each
particle. It will cause them to rise up out of the chimney and start to
move off at an angle as if blown by a slight wind.
Step 10. Set the Rnd Force's x and y values to 1. This will add an extra
force to the particles between - 0.5 and 0.5 in the x and y directions.
In some cases it will add to the constant force and other times
counteract it. This will make for more random smoke movement while
still keeping it blowing away into the distance.
Step 11. Change the Animate Colors to alternate colors of white
and gray. This will give the smoke more character and depth. These
colors are the colors the particle will cycle through during its lifetime,
starting at color 0 and finishing at color 4.
Step 12. Play. By now you should have a nice smoking particle effect
coming from the chimney as shown in Figure 7.43 .
Step 13. Next we are going to make it snow. Add a new particle
system to the scene and call it Snow. Position it above the cabin.
Step 14. Set the World Velocity y value to - 5. This will make the
particles fall.
Step 15. Change the Min and Max Energy to 20 and 50, respectively.
The particles need enough time to fall to the ground before being
destroyed.
Step 16. Increase the Min and Max Emission to 200 and 500,
respectively, to create more particles. For denser snow you can
increase these values later.
Step 17. Set the Particle Emitter's Ellipsoid size to (50,1,50). This will
increase the area in which particles are created in the x and z directions,
meaning that they will be created at the same y position but cover a
larger area. By now the particles should be looking like snow.