Heat Haze Shader

Posted By: indiGLOW

Heat Haze Shader - 12/15/03 00:11

I would like to know if its possible to create a shader FX that creates a heat haze. Something that skews and warps the imagery seen thrrough the haze. I would think this would use some kind of reflect shader???

The main point is that the effect would need to wobble everything seen though it, i.e models, sprites and the rest of the world environment....

If there is another way to achieve this effect without shaders please point me at it and move this post......

FYI: This effect can be seen on PS2 version of GTA3-VC when using the flam-thrower.

Thanks
Posted By: Antitrone

Re: Heat Haze Shader - 12/15/03 00:49

if you've pro edition you can render to a "wobled" surface... thought i- i think i've read it on the mainpage
Posted By: slacker

Re: Heat Haze Shader - 12/15/03 01:40

Would displacement mapping be able to do this? Can you have a surface alter what appears behind it - like transparency effects, magnifying glasses, etc?
Posted By: mk_1

Re: Heat Haze Shader - 12/15/03 02:35

Displacement mapping displaces textures but not the whole screen. If you have the pro you can use render_to_surface (or something like this) which allows you to render a view on a models surface. So if you have a sphere you would have the effect called "fish eye" (magnifying glass). Ello uses these things in his demos...
Posted By: indiGLOW

Re: Heat Haze Shader - 12/16/03 00:25

Maybe, someone could point me at an example of this, maybe even Ello, it seems that shaders can't do this due to the way they work.....

To clarify the probable approach: Do you think it is a case of rendering a second view onto a model and then somehow distorting the model?

I presume that it will need further modification to get the view to 'bend'. A magnifying glass or fish eye would just be a different camera.arc? for a heat haze the entire view needs to be wobbled.....so this would not work......

YES!!!! - I have seen Ello demo and it does indeed warp and bend the environment!!! Great work Ello.......ok so where do I find how to do it......

Anyway I am going to track down the demos you mention, in the meantime please feel free to explore this further.....Other similiar view skewing FX would be awsome, shockwave-ripple, drugged up strangeness.....all sorts.
Posted By: bupaje

Re: Heat Haze Shader - 12/16/03 01:39

This is not shader related but in George's tutorials he released somewhere he disucssed (for get the exact words) a setting to grow / shrink /distort the the camera view i.e. stretch the x to double normal size. Maybe see what a settings these are and if some sort of 'wave' can be created by altering these settings? Maybe you can somehow use these with whatever else you are doing with shaders, camera etc...

I did a quick search and one old game mentioned "Bump mapped perturbance (heat haze) from engine heat" and made me wonder if some sort of transparent animated bump mapped entity might simulate the effect?
Posted By: indiGLOW

Re: Heat Haze Shader - 12/16/03 01:50

I was inspired last night, watching a movie (forget the name) but the weapons emmitted an almost invisible pulse, like ripples on a pond, this was abvoiusly a post production FX, but from what I have seen of Ello's FX demo this is possible......however from what I have read in the manual about mapping a view to another object, only reference I can see is view.bmp....anyway, it appears that although this is possible, only one extra view can be rendered at any one time correctly, so lots of these ripple FX would not be possible......

In Ello's demo the players view is completely skewed, i suspect this is a combination of a wide camera arc, to get the wrap effect and additionally some kind of doughnut bubble model that surrounds the player and skews the view further.....

I have searched through the manual and cant find much in the way of view rendering, though the main website DOES say fisheye lenses....... I can't seem to find any reference to it. I am sure I am being a noob and missing some key place that everyone knows about, but me, where all these questions are answered, so please fogive my ignorance......

I will now trawl through the AUM's and see what I can find, I may PM Ello and ask for a few pointers.....

Thanks again

I had a good belly laugh as you suggest bupaje, btw I have read many of your posts eleswhere, great work, I often read your very worthwhile comments, keep up the good work.....
Posted By: bupaje

Re: Heat Haze Shader - 12/16/03 02:27

Considering I often wonder how coherent I am being I appreciate that.
Posted By: ello

Re: Heat Haze Shader - 12/16/03 16:16

hi, maybe the view should be rendered to skin1 of the model and the second and third skin would be alphachanels like a differencecloud(second skin, shifted with u/v) and a plain alpha gradient which gets transparent to the top direction. but i am not good enough to code this shader. the model itself gets then transformed by meshdeformation.
Posted By: PoLaRiS69

Re: Heat Haze Shader - 12/16/03 16:56

just wanted to say...

the word you are looking for is quicksilver...I think,,,,

that is what makes mirages in the desert, and also is the name of the visual distortion caused by heat....

there are other words I am sure




Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/16/03 20:21

Thanks Polaris69......quicksilver effects...rolls of the tongue nicely....

Ello, could you tell me how you got the lense effect in your effects demo, Great work BTW . I would like to see it used as a localised effect, i.e not the complete view, just in one area......please could you point me in the right direction, I can't seem to find any tutorials for this and its not obviously mentioned in the manual.

The real question is: can you create more than one instanse of this effect on the screen??? If not then I am stumped as to how to create these effects......

Thanks for all your comments.
Posted By: ello

Re: Heat Haze Shader (QuickSilver FX) - 12/16/03 20:32

look into the user-contributions section. i made my contest-entries available for public.
the ultimatecamerafx contains the render_to_texture thing. then it should get two alphachanels as mentioned above. it should work with more than one instance
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/17/03 00:14

Thanks again Ello, will do exactly that.
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/17/03 03:44

Ok Ello I must say I am stumped, goig through your WDL in the ultimatecameraFX I can't see exactly how you have got the wobble view. I think I understand this much: The Sphere's mesh is morphed to create the wobble effect, but I can't see how the view is mapped....is the ucfxview this normal camera or is this the bit that creates the image to map to the sphere???

I know it was some time ago you did this, so I'll understand if you can't help, but there does not appear to be any clear resource on how to do this...so I am sorry for badgering you about it......

I will continue to try and figure it out, any help is welcome.
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/17/03 05:08

I figured it out!

So the engine projects a new view onto a model, by captureing the screen and mapping it to the model, frame by frame....i see......

Thanks for all the help
Posted By: Marco_Grubert

Re: Heat Haze Shader (QuickSilver FX) - 12/17/03 05:42

You could use ello's method but project the rendered view onto a planar grid in front of the player instead. Then move some of the vertices of that grid around in x or y direction using a sine function. This way parts of the scene would wobble while others stay fixed.
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/17/03 19:01

Now that is an idea!!!!

I have managed to get the effect working on a disk tha ripples in a ring effect, combined with a view.arc that shifts about, it looks ok so far but I really need to work on it some more....I would like to get the edges of the texture fading out, but this is proving difficult....

To overlay a mesh infront of the camera, with sufficient vertexes will enable some pretty crazy cool effects I will play with this some more..... Although for a heat haze the wobble needs only bend the view above and behind the flames not anything infront of it.......

I have made a pretty good start for a QuickSilver weapon which will be gr8. Thanks for all your comments, I will post some shots when I get somewhere worth while.....
Posted By: bupaje

Re: Heat Haze Shader (QuickSilver FX) - 12/18/03 06:37

@indiglow -forgive my noob butting in again but I just noted you said 'flames' If this is going to be above the flames can't you use a particle effect for this? For instance maybe create an elongated 'S' like model (side view), alpha mask and create these as particles starting at the flame tip, smoke and bit beyond -hope this makes sense and assuming that models can be used as particles.
Posted By: Marco_Grubert

Re: Heat Haze Shader (QuickSilver FX) - 12/18/03 13:48

Quote:

Although for a heat haze the wobble needs only bend the view above and behind the flames not anything infront of it.......


You're right. A fake to fake this would be similar to a lensflare: trace to the center or extents of haze and see if is visible. Only if that's the case add wobble. Wouldn't work for say a fireplace, but should be alright for an outdoors campfire.
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 03:46

Heres a couple of shots of my progress so far...



I think that I need to look at combining the view shot thats mapped onto the model with some kind of alpha map so that I can fade the edges....any ideas on how to do this will be well received. I presume its a meterial shader thing?

More shots here: Just Click
Posted By: bupaje

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 03:55

Interesting. To me at least the effect on the ground reminds me of an underwater effect.
Posted By: ello

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 05:41

hi, i found something that may work for you. look here to see it work

this is the pixelshader i am using. the alpha-effect appeared after i placed the dp3 instruction.
just try it out

Code:
 
PixelShader =
asm {
ps.1.1 ; painter pixel shader
tex t0
texcoord t1
tex t2

add r0,t0,t1
add r1,r0,t2
add r0,r0,r1
mad r0,r0,r0,t2
dp3 r0,r0,t0
//add r0,r0,r2

};





Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 07:14

The effect could just as easily be used to create a nice water effect, and if I set the bright flag on you get some real cool wierd effects as they layer up.

Is the stuff I am doing here a different way of achieving whats going on in this thread

What are the differences? I am using a view and mapping it to a model, where as this material is only reflection of the env_cube? or am I way off. Could someone explain.. I think I might need to combine a little of both....

I will take a look at ello's post now
Posted By: ello

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 17:51

i think its the calculation of the viewing angle for the mirror. i didnt work it out properly in the ultimate camera fx. so it wont look like real water. there lies the problem i think. using environment mapping should work better.
Posted By: indiGLOW

Re: Heat Haze Shader (QuickSilver FX) - 12/23/03 18:31

Thats only if you use the view based on the camera position. I create a view using the models position, and by altering the camera's arc to get a wider reflection.... Im I right in thinking the mapping you talk about is the thread I posted, and can you tell me, does this material mapping reflect everything? sprites, MDLs etc? or just the env_cube?
Posted By: Villainsoft

Re: Heat Haze Shader (QuickSilver FX) - 04/26/04 08:12

This is all well and good if you want displacement effects for the entire camera view, but think about effects like exhaust heat distortion or a Predators cloaking armor which has a refractive property.
These can be done using a nice little shader effect called Dispersion.

The script is quite long, but I can post the source (NOT GS compatible...) if people want to try to convert to GS.
© 2024 lite-C Forums