You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="Normal">You can light a scene with distant lights (which act like point-like lamps far from the scene) and/or local lights (point-like lamps near the scene, like the yellow light shown above). For a distant light you specify its direction from the origin. For a local light you specify its location in the scene.</p>
<pclass="Normal"><spanclass="attributes">There is a list of all distant and local light
objects, </span><spanclass="attribute">scene.lights</span><spanclass="attributes">. By default, </span><spanclass="attribute">scene.lights</span><spanclass="attributes"> is this list:<br/>
<pclass="Normal">You can get rid of these default lights by setting the list to empty with <spanclass="attribute">scene.lights
= []</span>.</p>
<pclass="Normal">You can turn a light on or off by setting <spanclass="attribute">visible</span> to True or False.</p>
<pclass="Normal">In addition to these default distant lights, there is default ambient lighting in the form of <fontcolor="#FF0000">scene.ambient=color.gray(0.2)</font>. The
color of light objects and the amount of <fontcolor="#FF0000">scene.ambient</font> must
be specified with some care, because if the total lighting intensity
exceeds 1 anywhere in the scene the results are unpredictable.</p>
<pclass="Normal">The following statement creates a local yellow light whose <em>position</em> is at
(x,y,z), and if you continually update lamp.pos, the light will move.
You may wish to place a sphere or box with <spanclass="attribute">emissive=True</span> at the same location so that the lamp looks like a glowing lamp.</p>