PDA

View Full Version : heat effect



Alessandro_dup1
02-27-2003, 08:11 AM
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 ?

PM
02-27-2003, 08:20 AM
accumulation buffer :-)
(a BIT too slow)

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

tellaman
02-27-2003, 08:21 AM
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

Alessandro_dup1
02-27-2003, 08:27 AM
thx, where can i find some info's or tutorials about frag shaders or nv texture offset ? I searched on google and found nothing ...

tellaman
02-27-2003, 09:08 AM
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

rgpc
02-27-2003, 06:34 PM
Originally posted by PM:
accumulation buffer :-)
(a BIT too slow)


Yikes! http://www.opengl.org/discussion_boards/ubb/eek.gif Have a look at the refraction demos on the nvidia web site and just think "animated mesh".

rIO
02-27-2003, 11:23 PM
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....

V-man
02-28-2003, 04:18 AM
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.

dorbie
02-28-2003, 08:06 AM
One way to do this is render to texture and warp the texture around the exhaust.

fresh
02-28-2003, 11:58 AM
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.

Humus
02-28-2003, 02:16 PM
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.

Alessandro_dup1
03-01-2003, 01:22 AM
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 ...

PM
03-01-2003, 03:20 AM
Originally posted by rgpc:
Yikes! http://www.opengl.org/discussion_boards/ubb/eek.gif Have a look at the refraction demos on the nvidia web site and just think "animated mesh".

I'll have a look http://www.opengl.org/discussion_boards/ubb/smile.gif

EDIT: Eh, I cant find them http://www.opengl.org/discussion_boards/ubb/frown.gif... Could you give me a link??

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

rgpc
03-01-2003, 04:30 PM
With Vertex Programs (http://developer.nvidia.com/view.asp?IO=vertexprogram_refraction)

Maybe without? (http://developer.nvidia.com/view.asp?IO=Waves)

And some courseware on Chromatic Aberation (which isn't terribly useful in heat haze but it might contain some usefull info) (http://developer.nvidia.com/view.asp?IO=chromatic_aberration)

Edit Stupid URL's... http://www.opengl.org/discussion_boards/ubb/smile.gif

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

Humus
03-03-2003, 03:42 PM
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%.

rgpc
03-03-2003, 07:05 PM
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.

M/\dm/\n
03-04-2003, 01:47 AM
And what about GTA3 trails, are they from accu buffer? BTW, they arn't adding any preformance penalty.

rgpc
03-04-2003, 01:55 AM
What do GTA3 trails look like?