Making a mirror

Started by
5 comments, last by Tree Penguin 19 years, 8 months ago
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
Advertisement
You could try a render-to-texture technique. And what do you mean by warping?
You might want to render the reflected scene into a texture and projectively texture onto your surface warping the coordinates as needed.
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
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
Lol, same advice 3 times in a row :P... and all with about 1 minute and 6 seconds intervals...
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.

I know only that which I know, but I do not know what I know.
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).

This topic is closed to new replies.

Advertisement