It seems that the "local light source" feature added to a recent orbiter beta version has caused quite a bit of excitement - excellent! To avoid misunderstandings, I repeat here my original message in the beta forum:
Also, I am not sure if there is a limit imposed by DX7 on the maximum number of sources. I haven't found a reference to that.
In addition, please note that multiple light sources are a computationally expensive effect. Vertex lighting calculations must add the effects from each light source, so frame rate will suffer if there are lots of sources within visual range. Please don't go overboard with it! As with mesh complexity, less is often more. Even if your top-of-the-range graphics card takes it in its stride, spare a thought for the rest of us with obsolete cards. Or allow users to select a version of your vessel addon with reduced lighting effects.I've just uploaded a new beta (100812). I've implemented "localised light sources" (spot lights and isotropic point lights with limited range). Has some nice effects (to get an impression, enable "local light sources" on the visual effects tab, and run the "2010 Edition | visual improvements | spotlights" scenario.
Before you get too excited: this works ok for illuminating other vessels, but not for planet surfaces. There are two reasons:
Even so, the new feature offers some nice effects. It provides a framework for addons and other graphics clients to implement localised lighting effects in a consistent manner (and I'm confident that the OGLA client can do a better job at lighting the ground).
- planet surfaces are currently rendered without z-buffer, so the illumination from the point sources can't be calculated
- even if that were changed, DX7 is limited to per-vertex lighting. Since the vertices for surface meshes are far between, they wouldn't work very well.
The implementation is fairly complete (including full control of all features via script). Let me know if you find bugs with it.
Also, I am not sure if there is a limit imposed by DX7 on the maximum number of sources. I haven't found a reference to that.