The only major differences in rendering a fire particle effect compared to the previous smoke particle effect was in the colour and density of the particles. Fire particles are smaller and more dense than smoke particles and vary in colour from yellow towards red at the end of their lifespan. The change in colour at each step is calculated as follows:
particle[i].r *= 1.1;
particle[i].g *= (particle[i].life/2);
particle[i].b += (1/particle[i].life);
This makes the particles become more red as they age - starting from yellow moving through orange. The best results visually are when the fade time of particles are set very low so they disappear quickly.
A screenshot of fire and smoke side by side:
No comments:
Post a Comment