Previous:Assigning an Object to a Light Source   Main Index   Next:Simple Texture Options



Using Light Fading

If it is realism we want, it is not realistic for the plane to be evenly illuminated off into the distance. In real life, light gets scattered as it travels so it diminishes its ability to illuminate objects the farther it gets from its source. To simulate this, POV-Ray allows us to use two keywords: fade_distance, which specifies the distance at which full illumination is achieved, and fade_power, an exponential value which determines the actual rate of attenuation. Let's apply these keywords to our fill light.

First, we make the fill light a little brighter by changing Gray50 to Gray75. Now we change that fill light as follows:

  light_source {

    <0, 20, 0>

    color Gray75

    fade_distance 5

    fade_power 1

    shadowless

  }

This means that the full value of the fill light will be achieved at a distance of 5 units away from the light source. The fade power of 1 means that the falloff will be linear (the light falls of at a constant rate). We render this to see the result.

That definitely worked! Now let's try a fade power of 2 and a fade distance of 10. Again, this works well. The falloff is much faster with a fade power of 2 so we had to raise the fade distance to 10.



Previous:Assigning an Object to a Light Source   Main Index   Next:Simple Texture Options