Advertisement

Reflecting an object

Started by May 08, 2000 01:36 PM
2 comments, last by steve_bruce 24 years, 6 months ago
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???
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
Advertisement
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

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

That was the one I was talking about...

Check out my shadows page
and send me some feedback
Check out my shadows page and send me some feedback

This topic is closed to new replies.

Advertisement