User Guide
Chapter 19512
Light properties
Use these properties to work with lights:
Property Name Access Description Default
name Get Unique name of this light.
If the light was exported from a 3D modeling
package, the name is the name assigned there.
None
parent Get and set The model, light, camera, or group that is this
light’s parent.
If the light has no parent, it cannot contribute
light.
Group
("World")
child.count
Get Number of immediate children (no
grandchildren) that the light has.
0
transform Get and set Lingo transform object representing light’s
position relative to its parent’s transform.
The
transform.position gives the
relative position;
transform.rotation
gives the relative rotation.
Identity transform
userData Get and set A property list associated with this light. The list
defaults to the properties assigned in the 3D
modeling tool, but users can add or delete
properties at any time.
Properties
assigned in 3D
modeling tool
type Get and set The kind of light this is. Must be one of the
following:
#ambient: applied to all sides of the model
#directional: applied to those parts of the
light facing the light’s direction. Distance to the
light isn’t important.
#point: Like a bare light bulb,
omnidirectional and illuminating all parts of the
model facing the light
#spot: Like a spotlight, casting light on model
parts that face it, with brighter illumination the
closer the model is. Similar to
#directional, except that the apparent
distance from the light is taken into account.
None
color Get and set Lingo color object defining color and intensity.
Ranges from rgb(255,255,255), which is pure
white to rgb(0,0,0), which is no light at all.
rgb(191,191,
191)
spotAngle
Get and set Angle of the light’s projection cone.
If type equals
#spot, setting a value less than
the umbra causes a Lingo “property not found”
error.
90.0
attenuation
Get and set A three-value vector controlling the constant,
linear, and quadratic attenuation factors for
spotlights.
vector
(1.0,0.0,0.0
)
specular
Get and set TRUE (1)/FALSE (0) value that controls
whether or not the light produces specular
effects on surfaces. The property is ignored for
ambient lights.
Although
TRUE (1) is the default, switching
to
FALSE (0) may improve performance.
TRUE (1)