views:

132

answers:

1

To make a scene street illuminated, i tried,

point source light, used glMaterial and used ambient light......

I get a scene fully illuminated, not exactly the way like street light, can anyone share resources or explain how exactly i can achieve this??

I went through many light resources in net, could not properly understand....

+2  A: 

You probably want to use what OpenGL considers a spot light -- this lets you "aim" the light, and specify how much the light falls off as you move away from where it's pointed.

Note that if you want the light itself to show up in the scene, you have to draw it in yourself -- when you specify the light position, OpenGL uses that in its calculations of lighting of other objects in the scene, but it does not attempt to draw any sort of bright area in that part of the scene to show the light itself.

Drawing a real-looking light source can be fairly tricky -- you not only have to show the light itself, but at least some amount of "glow" around it (if you want to get technical, the amount should vary depending on things like the humidity and dust in the air, but most people don't really try to compute that).

Jerry Coffin