Skip to main content
GameDev.net gamedev.net
🔒 Locked

Heat haze algorithm

Started by SlashOwnsU May 26, 2006 at 10:00 AM 4 replies 2.8k views
Original Post
SlashOwnsU
SlashOwnsU
hello. I'm working on a game in 2D, and I happen to have a screen with the sun all shining I'd like to modify this background by applying a rippling effect to it they call it a heat haze effect, the effect of looking at something through hot air or gaz I tried to move the pixels along a sinusoidal formula - if you can picture the effect... it's rippling allright, makes a cool effect, but not quite exactly like looking through hot air is there someone that can point me to some algorithm or pieces of algo I could use
Bob Janova
Bob Janova
Heat haze is caused by looking through turbulent air, and turbulent fliud flow is notoriously hard to model. You could try modelling the visual effect by creating random rising 'blobs' that deform the pixels you see, maybe.
Ravuya
Ravuya
I found this link after googling for a bit. It's GLSL + FBO, but you'll have to live with it.
SlashOwnsU
SlashOwnsU
yeah I found this one too...looked at the source a bit
but it seems he generates the effect with a particle system defined in some engine

I hoped I would find something about 2D pixel-by-pixel manipulation
oh well...in the worse case I'll try checking that code in depth
px
px
ATI did a screensaver that uses that effect although I'm not sure if they made the code available anywhere. You can find the screensaver @ http://www.ati.com/developer/screensavers.html
Humble people don't refer to themselves as humble (W.R.T. "IMHO".)
christian h
christian h
You could use perlin noise with (x,y,time) coordinates. I tried this with a fullscreen heat-haze, and to restrict it to an area, you could do it with a small quad and blend the edges to the original image.

ch.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.