Ambient light

If you’ve been paying attention to the description of raytracing, you might be asking why the plane casts a shadow onto a visible sphere. The light source is above the plane. The plane goes on to infinity in the x and z directions. How does any light get below the plane? We shouldn’t be able to see the lower half of the sphere at all.

The reason it does show up is that POV-Ray assumes by default that there is “ambient light” throughout the scene. You can control this. There are two places to set the ambient light.

First, you have the global ambient. Add the following to the top of your scene:

global_settings {

ambient_light Black


This sets the general ambient light to zero. If you render the scene with the ambient light set to zero, the shadows will all become much sharper. If you change the camera’s location to below the plane, the whole scene will become black. That’s because there is no ambient light, and the one light source can’t illuminate below the plane.

By default, ambient_light is White. Often, you’ll set it to white, black, or some gray in-between. You can get some interesting effects by changing its color to something else, however. Go ahead and change it to Yellow in this scene and re-render it.

image 14

Notice how the shadows on the blue sphere have a yellowish tint? That’s from the ambient light.