Reflection on Uneven Planes

Started by
3 comments, last by m3t4lukas 10 years, 11 months ago

Hey guys,

I have searched through the internet the wole day now but I could not find an answer to that big question.

What about reflection on uneven planes?

Of course for reflection on even planes like a standard mirror you can mirror along the plane, turn on stencilbuffer, turn off depthbuffering and draw all again, but what about convex or concave surfaces (e.g. a car chasey)?

Thanks in advance

Lukas

Advertisement

It is fairly hard to do these accurately. Basically, you would need ray-tracing. However, there are techniques that can provide a good visual approximation. In particular, you should have a look at environment mapping (or cube mapping).

So I will first have to create an environment Map of the Environment?

Yes, environment maps are usually static and pre-calculated offline. For example, in a simple demo you might just reflect the skybox.

If you want to create the cube map yourself, you can use FBOs to generate textures for all six cube sides. For dynamic environments, you might have to do this every frame, as described here:

http://www.mbroecker.com/page2/page12/page12.html

Thanks a lot :)

Sounds to me to be runtime intensive especially for objects reflecting each other...

This topic is closed to new replies.

Advertisement