Graphics Reference
In-Depth Information
Procedurally generated image
A particularly simple way to generate the appearance of fire is to procedurally generate a two-
dimensional image by coloring pixels suggestive of flames and smoke. The procedure iterates through
pixels of an image buffer and sets the palette indices based on the indices of the surrounding pixels [ 14 ].
Modifying the pixels top to bottom allows the imagery to progress up the buffer. By using multiple
buffers and the alpha (transparency) channel, a limited three-dimensional effect can be achieved. In
Figure 8.14 (Color Plate 3), a color palette filled with hues from red to yellow is used to hold RGB
values. The bottom row of the image buffer is randomly initialized with color indices.
Particle system approach
One of the first and most popularly viewed examples of computer-generated fire appears in the movie
Star Trek II: The Wrath of Khan [ 13 ]. In the sequence referred to as the genesis effect , an expanding
wall of fire spreads out over the surface of the planet from a single point of impact. The simulation is not
a completely convincing model of fire, although the sequence is effective in the movie. The model uses
a two-level hierarchy of particles. The first level of particles is located at the point of impact to simulate
the initial blast ( Figure 8.15 ); the second level consists of concentric rings of particles, timed to pro-
gress from the central point outward, forming the wall of fire and explosions.
Each ring of second-level hierarchy consists of a number of individual particle systems that are
positioned on the ring and overlap to form a continuous ring. The individual particle systems are
FIGURE 8.14
Image representing fire generated using pixel averaging operations.
Surface normal
α
Ejection angle
R
FIGURE 8.15
Explosion-like particle system.
 
Search WWH ::




Custom Search