heat effect

This screenshot ( http://www.lo-mac.com/screens.php?id=395 ) shows a cool heat effect from Lo-Mac, an upcoming flight simulator. Can you suggest me how to get that effect with opengl ?

accumulation buffer :slight_smile:
(a BIT too slow)

[This message has been edited by PM (edited 02-27-2003).]

you must go for nv texture offset or ati embm, unless you want to do that in software (and believe me you dont want to)
ah, frag shaders is obviously another way

thx, where can i find some info’s or tutorials about frag shaders or nv texture offset ? I searched on google and found nothing …

nv texture offset:
http://developer.nvidia.com

you’ll have to deal with dsdt textures which are not so user-friendly

about frag shaders the specs are here:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/fragment_program.txt

but you’ll need a geforce fx or ati 9700 to hw accelerate that

Originally posted by PM:
accumulation buffer :slight_smile:
(a BIT too slow)

Yikes! Have a look at the refraction demos on the nvidia web site and just think “animated mesh”.

Is it possible IMHO to achieve a similar effect with stencil test and render to texture.

Fill the stencil with the heat mesh, render the scene (maybe at lower resolution).

Get the result to a texture and render it in front of your buffer disturbing the texture coords.

This SHOULD do the trick…

It looks to me like they are rendering some geometry for the hot air and texturing with some blending operation.
It doesn’t look like refraction from this perspective.

There are refraction demoes in the NV SDK using v_p but they aren’t using f_p at all.

One way to do this is render to texture and warp the texture around the exhaust.

This one’s easy, I’ve implemented it in a few games :

  • Copy backbuffer to Texture0
  • Draw particle system (or whatever) where the heat exhaust is supposed to be. Use Texture0 as source.
  • for each particle :
    particle->u_coordinate = particle->screen_x+some_offset;
    particle->v_coordinate = particle->screen_y+some_offset;

Works like a charm. You can mess with “some_offset” to make it shimmer more or less. some_offset of 0, would mean you dont see the exhaust at all.

Check out my refrection demo, it’s quite simple. http://esprit.campus.luth.se/~humus/

It’s quite old, so you’ll have to go back quite a few pages to find it.

Lot of input, thx everybody ! Humus, that’s exactly what i need, but is this tecnique very slow ? I mean, rendering the whole world to a texture and then to the screen …

Originally posted by rgpc:
Yikes! Have a look at the refraction demos on the nvidia web site and just think “animated mesh”.

I’ll have a look

EDIT: Eh, I cant find them … Could you give me a link??

[This message has been edited by PM (edited 03-01-2003).]

With Vertex Programs

Maybe without?

And some courseware on Chromatic Aberation (which isn’t terribly useful in heat haze but it might contain some usefull info)

Edit Stupid URL’s…

[This message has been edited by rgpc (edited 03-01-2003).]

Originally posted by penetrator:
Lot of input, thx everybody ! Humus, that’s exactly what i need, but is this tecnique very slow ? I mean, rendering the whole world to a texture and then to the screen …

It’s not terribly slow, at least not as long as you’re not geometry limited. The texture you render to doesn’t nessesarily need to be very large, a 256x256 or 512x512 may do. If your screen resolution is say 1024x768 then rendering the scene to a 512x512 texture will only increase the fillrate burden 33%.

In any case the reduction of the size of your texture that you are rendering to will have minimal impact as when you look through heat haze the background tends to be blurred anyway.

And what about GTA3 trails, are they from accu buffer? BTW, they arn’t adding any preformance penalty.

What do GTA3 trails look like?