Lights

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

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.

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.

Have a look about light maps.

Aren’t lightmaps just textures with a light effect?
If so, how can I ‘generate’ one?
Thanx in advance,
Hylke

you can generate lightmaps with model editors&renderers like 3dsmax.

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.

Hi,
I found this example of shader program that produces a multi-light demo. Maybe it helps:

Many Lights

Thx y’all for your help.
Hylke