Adding Light Objects
The Palette
provides three sample Light objects:
- DirLight – a directional light
source of unlimited range
- BoxLight – a directional light source
that is limited in range to a box boundary
- PointLight – an omnidirectional light
source that is limited in range to a spherical boundary
You can place each of these light sources anywhere in the world, as
needed. After you specify the properties for the light source, you typically
deselect its Visibility property;
the light remains in the world even if the Light object itself is not
visible.
All of the Light objects have the following properties to specify the
color of the light:
- Ambient – specifies the ambient color for the light from the source
- Diffuse – specifies the color of light that reflects off other
game objects; diffuse reflections are multidirectional
- Specular – specifies the color of light that reflects off other
game objects; specular reflections are monodirectional, directly in
line with the viewer
Recommendations:
- For natural light effects, specify a grey color, such as RGB 75,75,75
for the Ambient property.
- To use a Light object as a source of darkness, specify a dark color,
such as RBG 0,0,0 for the Diffuse
property.
- When you place a Light object in the world, consider turning on
the Render shadow option.
For a demonstration of how to use Light objects, view the “Using Lights
in a Game Level” video, either on the GitHub
site or on SHIP.