Shadows

In order to determine the color of a point on the surface of any object, it is necessary to determine if that point is in shadow with respect to each defined light source. If the point is totally in shadow with respect to a light source, then the light source makes no contribution to the point's final color.

This shadowing determination is made by tracing rays from the point of intersection to each light source. These ``shadow feeler'' rays can add substantially to the overall rendering time. This is especially true if extended or area light sources are used. If at any point you wish to disable shadow determination on a global scale, there is a command-line option (<#335#>-n<#335#>) that allows you to do so. It is also possible to disable the casting of shadows onto given objects through the use of the <#336#>noshadow<#336#> keyword in surface descriptions. In addition, the <#337#>noshadow<#337#> keyword may be given following the definition of a light source, causing the light source to cast no shadows onto any surface.

Determining if a point is in shadow with respect to a light source is relatively simple if all the objects in a scene are opaque. In this case, one simply traces a ray from the point to the light source. If the ray hits an object before it reaches the light source, then the point is in shadow.

Shadow determination becomes more complicated if there are one or more objects with non-zero transparency between the point and the light source. Transparent objects may not completely block the light from a source, but merely attenuate it. In such cases, it is necessary to compute the amount of attenuation at each intersection and to continue the shadow ray until it either reaches the light source or until the light is completely attenuated.

By default, <#338#><#1841#>rayshade<#1841#><#338#> computes shadow attenuation by assuming that the index of refraction of the transparent object is the same as that of the medium through which the ray is traveling. To disable partial shadowing due to transparent objects, the <#339#>shadowtransp<#339#> keyword should be given somewhere in the input file.

<#4712#><#4712#>
<#1274#>shadowtransp<#1274#>
The intensity of light striking a point is <#343#>not<#343#> affected by intervening transparent objects.
If you enclose an object behind a transparent surface, and you wish the inner object to be illuminated, you must not use the <#345#>shadowtransp<#345#> keyword or the <#346#>-o<#346#> option.