View Full Version : how to create the optic lens

02-28-2002, 03:43 AM
I am implement an application about the optic lens.but I can't simulate the realism optic lens(such as convex lens). could you give me an example or some infomation about this?
Thank advanced.

03-01-2002, 02:14 AM
I suggest, that you must do this in following stages:

1. render the scene with eye, placed in lens focus.
2. load rendered scene as texture.
3. render scene from normal point of view
4. render lens with texture and proper texture coordinates.

I don't know exactly, is placing eye in lens focus is correct. Also, texture coordinates on lens depends from it

03-01-2002, 02:21 AM
Thank you for your suggestion.I will try.

03-01-2002, 05:46 AM
Originally posted by orientalxl:
Thank you for your suggestion.I will try.

Placing eye in lens focus is good, if you need to render a scene, which lies behind focus.
In this case lens reverts sides -
top become down, left become right, etc..

But if you need a case, when your scene needs to be "zoomed" (scene lies between lens and its focus) - you need other point of view. You must render the scene as if your lens is an eye itself.

P.S. Email me, if you get some results http://www.opengl.org/discussion_boards/ubb/smile.gif