POV-Ray : Documentation : 2.4.7.9 Light Fading
  POV-Ray 3.6 Documentation Online View  
2.4.7.8 Projected_Through   2.4.7.10 Atmospheric Media Interaction

2.4.7.9 Light Fading

By default POV-Ray does not diminish light from any light source as it travels through space. In order to get a more realistic effect fade_distance and fade_power keywords followed by float values can be used to model the distance based falloff in light intensity.

The fade_distance is used to specify the distance at which the full light intensity arrives, i. e. the intensity which was given by the COLOR specification. The actual attenuation is described by the fade_power Fade_Power, which determines the falloff rate. For example linear or quadratic falloff can be used by setting fade_power to 1 or 2 respectively. The complete formula to calculate the factor by which the light is attenuated is

with d being the distance the light has traveled.

Light fading functions for different fading powers.

You should note two important facts: First, for Fade_Distance larger than one the light intensity at distances smaller than Fade_Distance actually increases. This is necessary to get the light source color if the distance traveled equals the Fade_Distance. Second, only light coming directly from light sources is attenuated. Reflected or refracted light is not attenuated by distance.

2.4.7.8 Projected_Through   2.4.7.10 Atmospheric Media Interaction


Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.