Archived

This topic is now archived and is closed to further replies.

Gammastrahler

Warped Reflections on Glass?

Recommended Posts

Hi, does anbody know how it is possible to create "warped" reflections on glass? I´m not completely sure whether this is refraction, since i´m not very familiar with reflection/refraction. The problem is, that, if i use OpenGL´s cubemapping support on a quad that should be a window, it only reflects the environment without any distortions/warpings/refractions. but you know the effect in real life, that even planar surfaces of glass (windows, mirrors etc) do that.... can someone give me a hint? thanks Gammastrahler

Share this post


Link to post
Share on other sites
Break your planar glass into more than a quad of vertices (make it a 4x4 or 8x8 patch), keep all the vertices planar, but slightly change the direction of the surface normal at each vertex.

This will work because the normal vectors at the vertices are used for both lighting and cubemapping. It might look better if you give a 5% to 10% random offset of each non-edge vertex, as well.

Share this post


Link to post
Share on other sites