Heat Haze and render to texture

Hi all

Just some quick questions:

1: what (if any) is the best way to make a ‘heat haze’ effect? I am thinking of having particle spheres (or any curved surface) spawned with a refractive material… now, I assume the material nodes can sort this but do they (material nodes) work well with the GE?

2: How do you render the screen to a texture? And if I could, can I mess with this using the material node system to get new effects?

Cheers as always for your thoughts

Paul

2a. look for VideoTexture
2b. I have no idea

You could probably use a custom 2D filter, but I have no idea how to do that. I do know of another way, though.

Render to texture is the only other way to get heat distortion. However, the image would be slightly blurred, as render to texture only supports images with each dimension a power of 2, so it won’t match the output resolution.

Here’s how I would handle it:

The main camera renders it’s viewpoint to a texture. The active camera(the one that outputs to the screen) is elsewhere in the scene, or maybe in an overlay layer, and is looking directly at a plane that displays the image captured by the previous image(lining the camera frame up with the plane could be a pain, but oh well).

Now here’s how the actual effect is created: the plane that displays the image captured by the first camera should have a material nodes setup or glsl script that offsets the texture coordinates with an animated or scrolling normal map, giving the image a wavy, distorted look.

If you only wanted the distortion to affect objects a certain distance away, you would need to use a 2D filter.

As for how to use RenderToTexture, here’s a tutorial:

http://www.tutorialsforblender3d.com/Game_Engine/VideoTexture/VideoTexture_Render_1.html

Unfortunately, it doesn’t show how to set the size of the image, and I’ve forgotten how(it is possible, though). The default resolution is very low.

OK, cheers for the info guys!