Jump to content
  • Advertisement
Sign in to follow this  
arataj

OpenGL How to make reflections of close not planar objects

This topic is 4250 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

Hello. How to make reflections of close not planar objects? Cubic environment mapping is not enough, as it maps planar objects. I would want a small object of a few polygons to be accurately reflected by a mesh of triangles. Would it be efficient to do it by programming a few tenths of lights using GLSL, and approximating the object by a dense array of these lights? Using the method like in http://www.paulsprojects.net/opengl/manylights/manylights.html Or perhaps an area light could be defined using GLSL? I do not know GLSL, but I could learn it. Could you help me in, for example, programming a segment light? Or a textured segment light? Artur

Share this post


Link to post
Share on other sites
Advertisement
Hi Artur,

Quote:

How to make reflections of close not planar objects? Cubic environment mapping is not enough, as it maps planar objects.


For planar mirrors, use stencil mirrors or rendering to an offscreen buffer. Cubemapping works good on non-planar objects with the reflected objects being far away from the reflecting object.

To get correct reflections of nearby objects on a non-planar object, you have to use some sort of raytracing technique.

Quote:

Would it be efficient to do it by programming a few tenths of lights using GLSL, and approximating the object by a dense array of these lights?


I think that this would be inefficent, since you have to use a lot of lights, if the camera gets close to the reflecting object.

Cheers,

GuentherKrass

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!