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

Heat blurring

Started by TechnoGoth Jul 20, 2003 at 8:47 PM 2 replies 550+ views
Original Post
TechnoGoth
TechnoGoth
Has anyone played Zelda:Windwaker? well in that game fires create a heat blurring, or smoke distortion depending on what you want to call if you ever seen a camp fire or field on a hot summer day you''ll know what I mean. My question is does anyone know how they achived this, or how to do a similar effect using openGL?
c t o a n
c t o a n
Well, I''d say to use vertex/pixel shaders (fragments). I don''t know how to do it exactly, but I can just shoot off some ideas. Try doing an image space blur by rendering the scenery behind the fire into a texture (I leave this as an exercise to you, maybe the stencil buffer can help?) and perform a simple sine wave blur on the texture (using a fragment shader, and a sine texture, perhaps) by passing in a random # (using a constant) and ''shifting'' the blur by some function of this # (cause the heat wave isn''t an even blur, it''s just all scrambled). There is an effect like this in the newest ATI Lava demo for the 9800 if you just want to see how they did it.

Chris Pergrossi
< ctoan >
My Realm
Chris PergrossiMy Realm | "Good Morning, Dave"
aboeing
aboeing
i havent seen that game, but you can do it without using vertex&pixel shaders by rendering to a surface and then rendering a 2d mesh with the vertices near the fire distorted to make it "wobble"..
S1CA
S1CA
Dependent Texture Reads. You can do those via pixel/fragment shaders too. i.e. the colour values in pixels of one texture are used as offsets to the texture coordinates used to sample a second texture. In pre-shader hardware this was also known as EMBM (Environment Mapped Bump Mapping).

The GameCube''s indirect texture feature allows essentially that except with extra flexibility & power.


The general idea for heat haze & ''Predator'' type effects is pretty simple as ctoan mentioned.

Even applying the target texture to a few small billboards on hardware that doesn''t do EMBM/dependent reads looks pretty good, and you can combine it with an alpha channel in another texture to hide the polygon edges. You can even use the positions and sizes of smoke/flame/spark particles as the positions and sizes for the haze billboards.

It can look pretty good if you merge your smoke and haze system into the same thing. Display smoke particles as usual, and as they''re about to fade out, instead of fading them out change their texture to the haze target texture.



--
Simon O''Connor
ex -Creative Asylum
Programmer &
Microsoft MVP
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

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

Sign in to reply to this topic.