View Full Version : Lights
11-06-2005, 03:00 AM
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,
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.
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.
Have a look about light maps.
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,
11-06-2005, 12:13 PM
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.
11-09-2005, 11:03 AM
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)
11-13-2005, 08:41 AM
Thx y'all for your help.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.