Reflections based on distance from plane

Posted by Andrea Benedetti on Game Development See other posts from Game Development or by Andrea Benedetti
Published on 2012-02-27T20:49:37Z Indexed on 2012/03/29 11:44 UTC
Read the original article Hit count: 409

Let's consider, for example, a surface like the volleyball court, we can see that legs and shoes of the players are reflected, with a blur effect, but body and stadium don't (as each object not near to the court).

I've already made a reflection effect, but it works as a specular reflection, and I need to achieve an effect like the photo above. So, I would like to make a reflection that is based on the distance between the object and the plane, in this manner a close object would reflect more than an object that is positioned far away from the plane.

What is the best way to achieve this effect? My first idea was to use the depth value (taken from the reflected camera), and use that value to blend between reflection and court. But I don't know if it's a correct way.

Edit: as rendering engine I use Ogre that already provides a reflections system: reflecting the camera through a plane (obviously I can select the models to draw from the reflected camera). After a render to texture pass I can blend the reflected texture with the original plane. So, if possible, I'm looking for a way that best suits my system.

© Game Development or respective owner

Related posts about shaders

Related posts about graphics-programming