What is a particle explosion effect? When most people see a particle explosion effect in a video game, often times they believe that what they're seeing is a simulation - some sort of next-generation fluid mechanics, calculated in real-time by a high-powered video card. However, what they're actually seeing in an explosion effect could be compared to throwing a bunch of photos of flames, sparks and clouds at a movie camera.
Whether you're an experienced video game developer or an avid player interested in game mechanics, we've broken down the process of developing an in-game particle effect into the following bite sized steps.
NOTE: Many images link to videos.
Intro to Sprites and EmittersThe beginning of the design for any in-game effect starts with sprites. Sprites are flat, two-dimensional images or movies that are integrated into a larger effect. We can better illustrate the idea of sprites by demonstrating how to make a simple mist particle effect using only one type of sprite.
How to Create SpritesStep 1:
Create an image of mist in Adobe Photoshop or other photo editing software program. You can also scan a photograph of mist or use footage from a short movie, just as long as the image has transparency on the edges.
Using your game engine software, create a sprite emitter, which will generate sprites, or particles. These particles will appear as plain squares until the image texture is applied. Figure 2 shows the beginning of a mist particle effect before the actual image has been applied to the sprites. This may not look much like mist at first, but these squares are what the Effects Artist is usually working with behind the scenes. In this case, the sprites all line up to face the camera so you can never see them edge on.
Apply the mist image, or texture, to the individual particle sprites. In figure 3, you can see how one texture or a series of textures is applied to the sprites.
Figure 4 shows the sprites with the mist texture applied and the image transparency turned on. The transparency is added to the mist texture in Adobe Photoshop using the image's Alpha Channel. The yellow wireframe box and arrows in the middle represent the emitter, which is the point of origin and the control mechanism for a single set of sprites. All sprites generated by a single emitter use the same texture and move in roughly the same way.
To create movement in the sprites, go into the sprite emitter settings and determine the timing, motion, scale, and orientation of the sprites. A sprite emitter can be set to send sprites in a wide range of directions from 0-360 degrees, much like a lawn sprinkler. In most effects, the Effects Artist uses the motion of overlapping sprites to try to hide the fact that they are using individual sprites. As you can see in Figure 4, this gives the overall effect a more natural feel. Note that color and transparency can also be controlled.
Figure 5 shows how some of these settings can be adjusted. Motion controls that were used to make the sprites move like mist can be adjusted to make them behave like a fountain. Sprites can also have a constant downward acceleration based on in-game "gravity." The sprites in Figure 5 are moving in only one direction, while being pulled by gravity. They also increase in size over their lifetime.