PDA

View Full Version : Lights



Hylke Donker
11-06-2005, 03:00 AM
Hello,
Since OpenGL doesn't support many lights(something like the minimum of 11 or so), what's the best way to simulate of having multiple/reuse lights?
In example, imagine that you have a street with like 20 streetlights(with all the same diffuse color and stuff), and you have a maximum of 10 OpenGL lights avaible, can you use like 1 light, to light the hall street?
If so, how?
Thanx in advance,
Hylke

H.Stony
11-06-2005, 06:09 AM
dont use so many lights but if you have to do use a own shader.

are you talking about spotlights? keep in mind the standard lighting is vertexbased - so many lights on the street won't look so much better.

Hylke Donker
11-06-2005, 06:18 AM
Yes, i'm talking about spotlights.
In example, if you're driving on a lit highway, you see that when you're going further away from the light, you will see that the way is much less lit than exactly under the light, untill you come to the point lightb - lighta / 2 + lighta.Then it becomes brighter untill you come to lightb.

jide
11-06-2005, 10:16 AM
Have a look about light maps.

Hylke Donker
11-06-2005, 10:35 AM
Aren't lightmaps just textures with a light effect?
If so, how can I 'generate' one?
Thanx in advance,
Hylke

Stroma
11-06-2005, 12:13 PM
you can generate lightmaps with model editors&renderers like 3dsmax.

jide
11-07-2005, 03:18 AM
You can try to get some on the internet, also try to draw them yourself. Make a search on a search engine there are several examples that can help you.

hernan
11-09-2005, 11:03 AM
Hi,
I found this example of shader program that produces a multi-light demo. Maybe it helps:

Many Lights (http://www.paulsprojects.net/opengl/manylights/manylights.html)

Hylke Donker
11-13-2005, 08:41 AM
Thx y'all for your help.
Hylke