Unlike your local Home Depot, which has thousands of different varieties of lights, Blitz3D offers you only three different light types. Take a look at the code used to create a light:
light = CreateLight()
The first part of the code, light=, is just the name that you give to your light. The next part of the code, CreateLight, actually creates the light, and, finally, the brackets, (), tell Blitz3D what type of light to create. You can specify one of three different types of lights:
Directional Light created by the code light = CreateLight() or light = CreateLight(1). Everything that faces the light will be equally lit (see Figure 7.17).
Point Light created by the code light = CreateLight(2). This type of light starts strong at a specific point and fades out the farther away you get from the light (see Figure 7.18).
Spot Light created by the code light = CreateLight(3). Think of spot light as holding a flashlight on an object (see Figure 7.19).
Note: Now You Try
Create a program with a cone or sphere. Try each variety of light to see how the light affects the object.
18.188.43.246