PDA

View Full Version : How to apply reflection effect to a simple cube?



powervr
11-19-2004, 01:59 AM
It is something like the surface is coated with plastic material, so the surface is shinnny.

e.g., see this:

http://www.mocap.com/grafx/square-plastic-caps.jpg

Is it lighting will do the job? Or need something called environmental mapping?

Thanks! :)

Silkut
11-19-2004, 03:07 AM
There is many ways to render shiny material
You can use different material properties with your object, you can use multitexturing to apply a transparent texture such as in NeHeGL page (http://nehe.gamedev.net) (how cheat with the rendering :) )

Lighting is also very important, you can use advanced "per-xxx lighting" techniques using latest graphic card possibilites, and of course 'classical' lighting

So, in theory: 1/ using special material 2/ using special lighting

hope that helps-

powervr
11-19-2004, 06:40 AM
Thanks. :)

Silkut
11-19-2004, 12:58 PM
To learn more about different material and lighting you can check the OpenGL RedBook on this website

Me6
11-19-2004, 08:34 PM
I think taht I also read something about the astencil buffer for reflections.... Search around... Try google for "opengl stencil buffer reflections" or somthing like that... Hope This Helps...