![]() |
|
Fire Before jumping right into the fire effect programming, we should take a short brake and think about the bitmap we will be using. Our fire should include the whole color palette from a dark transparent red at the edges to orange, yellow and bright yellow or even white tones at the 'hot' middle. Achieving this with only one bitmap seems like a hard task, since we are building up our flames by combining many particles. Using only a few bigger images would make the fire too rigid and would take away from the blazing effect. We want a fire that is smoothly 'breathing and living' and not only some predefined 'dia-show' animation frames.
But wait!
We just need a bitmap, that consists of red and
dark orange colors, these nicely add up to orange, yellow and even white
if we produce enough overlapping particles. Here are the main image and the alpha channel we will be using:
Note that the image has a flamelike form. The
reason for this is quite simple: Since we will include some randomness
into the behaviour of the particles, it is possible that some
particles near the edges will be visible without other overlapping
particles 'hiding' their real shape. |