Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

steve_bruce

Reflecting an object

This topic is 6925 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''m trying to reflect an object from a floor surface using the blending technique. However the problem I''m having is displaying the actual reflection over the top of the floor. How exactly do you do this. I thought it was something to do with the order you draw your objects but it doesn''t seem to work. Is it something to do with the depth testing???

Share this post


Link to post
Share on other sites
Advertisement
Mark Kilgard from Nvidia is an excellent person to contact about this.
He has a pdf file (or he did), about stencil buffering and it tells you how to do planar reflections,
up on Nvidia''s website. If you can''t find it drop me an e-mail and I''ll e-mail it to you (it''s about 1meg)

Check out my shadows page
and send me some feedback

Share this post


Link to post
Share on other sites
You don''t draw the object over the floor. You draw it under the floor, using the stencil buffer to ensure the reflection is only displayed on the floor.

Mark Kilgard wrote an excellent tutorial on this complete with openGL/GLUT source code. You can find it here:

http://toolbox.sgi.com/TasteOfDT/documents/OpenGL/tips/Reflect.html

Another example of this technique can be found in my 3D breakout game, which can be found here:

http://www.geocities.com/ben32768

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!