Sign in to follow this  
Gammastrahler

Making a mirror

Recommended Posts

Hi, i want to create a mirror effect, and i know that cube or sphere environment mapping is not a good choice since there are noticeable artifacts on planar surfaces. but i also dont want to use the stencil technique... what other methods are common / and ore available? second, and actually more important, i want to create a "warping" effect that slightly distorts the reflections in the mirror, like a real mirror. would be nice if someone coould give me some ideas! thanks Gammastrahler

Share this post


Link to post
Share on other sites
You could move the camera to the POV of the mirror, and render that shot to a texture. Place that texture on your mirror surface, and then use a pixel shader to create your 'warping' effect. This sounds kind of slow though.

Matt Hughson

Share this post


Link to post
Share on other sites
I think by warping he means the kind of warping that would happen with a not perfect mirror. Perhaps a bent one or like glass that is not even or equally dense. Like in Doom 3, some windows will seem to stretch and distort what you see through them... kind of like looking through a bent piece of glass. Perhaps there are some answers in Doom 3 or in the SDK, I haven't looked at it all, or even know if it's available yet... but I guess that wouldn't be a bad place to check. And there are mirrors in Doom 3 also... though I haven't noticed if they do the distortion like the windows.

Share this post


Link to post
Share on other sites
That would be possible by moving texture coordinates although that will ad some geometry to make the distortion look good (not like hey there's a quad in the mirror that's distorted more than others, that's bad).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this