As of 1.10
, the lighting model has been changed completely, moving from software rendering that further taxed the already-overworked CPU to hardware-based lighting that uses the GPU instead.
Under the current lighting system, the world is lit by the sun and moon and up to 6 object-based lights. It's important to design lighting systems in such a way as to reduce the chances of other users' lights turning off and on due to their distance from the camera
The following needs to be changed:
light is used in various things and can be changed in different ways. Sims
emit a light source (and cast shadow
) based on the day-night light cycle (see llGetSunDirection
--this is a "directional" light source, meaning it is equally bright all over the sim).
Light affects things in different ways. Because SL lighting is vertex
-based, lights will only appear to be working if the light source is near a vertex, where it is brightest, fading away uniformly towards other vertices. Untextured prims
appear much brighter than textured ones due to the nature of hardware-based transform and lighting (T&L). Avatars
remain very dark even when large, fully bright (not "full bright") white lights are shining directly on them. Hopefully this bug
will be fixed soon. Particles
also reflect light except when prelit due to being set to "glow" in their options.
A "Light" material
-type prim/object acts as and uses a "point" light source.
Prelighting ("full bright" in SL) is where a prim/object is lit but does not actually emit a light source. However, SL's lit objects automatically become prelit yet also emit light. SL can fake full prelighting (but still emit an "invisible" light source that counts against framerate) by changing the color of side
"0" (positive z-axis
--"top") of a prim to black
. (SL 1.9- only)
| llSetPrimitiveParams Flags || Effects |
| PRIM_FULLBRIGHT || Makes all faces light up as if the object were a light |
| PRIM_MATERIAL, PRIM_MATERIAL_LIGHT || Sets object material to light |
| PRIM_COLOR || When used on side 0 (zero), changes color of light |
| PRIM_POINT_LIGHT || Toggles light property and attributes: color, intensity, radius, and falloff. |
There is no Example for Light Scripts available at this time.
Q: Why are we limited to only 6 lights at a time?
A: 8 lights is a common OpenGL/hardware limit, but it appears that the Lindens may have a system for dealing with more in the works.