Steam effect

If you take a look at the following screenshot, can you tell me how to achieve a similar steam effect in opengl ?

Refraction. Humus has a nice demo of this effect.


The site appears to be down ?

[This message has been edited by PH (edited 09-11-2002).]

I’ve checked googles cache and even that’s blank.

Seemed like quite a popular site though with links from ati developer.

Really hope there’s somewhere else that shows a nice way to create that jet engine haze effect!

i would do it first in software with glReadPixels in then find out a way to do that in hardware (though in such a case as the screenshot performance should be ok with doing it in software

Render all that should be affected to a Texture ( or the whole sceen) make billboarded polygons, map with teh texture, and apply a texture-shader ( an texture offset texture for example)

Texture shaders are good except the fact that it’s not available on all hardware.

And instead of glReadPixels, I would rather use glCopyTexImage or glCopyTexSubImage as they have the ability to read pixels AND to write them in a ready-to-use texture AND is much faster AND uses less memory.

Is it possible to achieve a similar effect with this method but the refracting fluid needs to be modeled (ok it’s wrong but) :

  1. Set a small viewport
  2. Render the scene in that viewport
  3. Get the scene back to a texture
  4. Set the rendering viewport
  5. Render the scene
  6. Fill the stencil with the refracting object
  7. Render a tesselated quad over the scne using stencil test and the previous render to texture result

Perturb the texture coords…

I did it once, the only problem is that the borders of the refracting fluid are too much sharp…

Anyway, just my 2 cents

Also you could render the refraction with polygon stippling over the stencil buffer :
1, 2, 3, 4, 5) idem rIO
6) Render the steam polygon into the stencil buffer, with polygon stipple enabled
7) Translate the small “background” texture and render it where stencil test succeeds

The trick is to set at each frame a different stipple in 6 and/or a different translation in 7 so that you have the feeling that the steam displaces the background.

There’s a doubt, though, that polygon stippling is hardwired on all cards. Otherwise there’s a similar trick with a noise black&white texture. It’s just a bit slower.

Originally posted by PH:
[b]Refraction. Humus has a nice demo of this effect.


The site appears to be down ?

[This message has been edited by PH (edited 09-11-2002).][/b]

Yes, it’s currently down due to hardware rearrangements and software upgrades. There are still some tweaking left to be done before it’ll go online again, we are also waiting on getting another stick of RAM delivered. I can post a temporary url later tonight, I’ll just have to fix the database.


Yes, me and my roommate. I use our server mainly for my website, he uses the server for other purposes. The server also hosts my brothers website.

Anyway, the database has been fixed now.
It’s up at for the time being.

The tecnique of rendering the scene to a texture is interesting, but it would drop fps severely i suppose …

It’s not that much time-consuming if you’re rendering a small viewport and if you’re using glCopyTexSubImage2D (it’s faster than glCopyTexImage2D … see the red book that explains it very well somewhere like there . please read the explanation of glTexSubImage2D before all since it explains why and how it is faster than glTexImage2D)

[This message has been edited by vincoof (edited 09-12-2002).]