Jump to content
  • Advertisement
Sign in to follow this  
Gammastrahler

Making a mirror

This topic is 5057 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!