Jump to content
  • Advertisement
Sign in to follow this  
m3t4lukas

Reflection on Uneven Planes

This topic is 1945 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

Hey guys,

 

I have searched through the internet the wole day now but I could not find an answer to that big question.

What about reflection on uneven planes?

 

Of course for reflection on even planes like a standard mirror you can mirror along the plane, turn on stencilbuffer, turn off depthbuffering and draw all again, but what about convex or concave surfaces (e.g. a car chasey)?

 

Thanks in advance

Lukas

Share this post


Link to post
Share on other sites
Advertisement

It is fairly hard to do these accurately. Basically, you would need ray-tracing. However, there are techniques that can provide a good visual approximation. In particular, you should have a look at environment mapping (or cube mapping).

Share this post


Link to post
Share on other sites

Yes, environment maps are usually static and pre-calculated offline. For example, in a simple demo you might just reflect the skybox.

 

If you want to create the cube map yourself, you can use FBOs to generate textures for all six cube sides. For dynamic environments, you might have to do this every frame, as described here:

 

http://www.mbroecker.com/page2/page12/page12.html

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!