Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reflecting an object

Started by steve_bruce May 8, 2000 at 1:36 PM 2 replies 1k views
Original Post
steve_bruce
steve_bruce
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???
RandomJon
RandomJon
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
Check out my shadows page and send me some feedback
benjamin bunny
benjamin bunny
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.