Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Reflection on Uneven Planes

  • You cannot reply to this topic
4 replies to this topic

#1 m3t4lukas   Members   -  Reputation: 102

Like
0Likes
Like

Posted Yesterday, 01:32 PM

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



Sponsor:

#2 kloffy   Members   -  Reputation: 626

Like
2Likes
Like

Posted Yesterday, 04:18 PM

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).



#3 m3t4lukas   Members   -  Reputation: 102

Like
0Likes
Like

Posted Today, 02:42 AM

So I will first have to create an environment Map of the Environment?



#4 kloffy   Members   -  Reputation: 626

Like
0Likes
Like

Posted Today, 06:41 AM

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



#5 m3t4lukas   Members   -  Reputation: 102

Like
0Likes
Like

Posted Today, 03:11 PM

Thanks a lot :)

Sounds to me to be runtime intensive especially for objects reflecting each other...







PARTNERS