/cournia.com/dev/null - blurring fire home
blurring fire February 11, 2004

We have a touch screen in the VR lab. One day, I thought it would be cool to write a program that would allow you to "fling" particles using the touch screen, essentially throwing fire from your finger tips. So about a year and a half I go I wrote said program. It's pretty fun to play around with. Every particle attribute can be changed from a drop-down console.

Today, I decided to improve the old particle flinging code. In particular, I wanted to add better fire effects, and also more realistic smoke.

To improve the fire effects of the particle system I decided to add a glow effect. I wanted the glow to flicker like fire does. My first though was to render the particles to a small buffer, read the buffer, blur it, and then render the buffer to the screen. After writing code to render to a small texture (32x32), I was pleasantly surprised to find out that if I render the texture to the screen with linear filtering enabled, the HW will effectively blur the small texture for me! After playing around with the textures a little more, I eventually did decide to write a fragment program that would blur the small texture. On the left is an example of a blurred "glow" texture. On the right is the final image. Note that the two textures do not correspond to each other (they should but I was lazy in grabbing the screen shots).

 

Since the blur texture is so small, there are bad aliasing artifacts. While one may think that this is a bad thing, it actually turns out to be a good thing. The aliasing causes a nice flicker effect in the blur texture. Exactly what I wanted!

I haven't gotten around to writing a fluid solver to improve the smoke. Chances are I'll implement one of Jos Stam's papers. I just need more time.

  index