Image bm797.GIF Shadow Range
Objects
 
The shadow range element serves to activate dynamic shadow of the active object. Dynamic shadows are shadows casted by moving objects. Dynamic shadow is created by main light of the scene, that is object having number 2. Dynamic shadow of an object is created using volume shadow method. At first, an outline curve of the object is created (profile from light view), and then a conic shadow is casted from the outline curve, which has its vertex on the oposite side than the light occurs. A shadow arises in places where conic shadow meets other object. A shadow arises on the object itself, too.
 
The shadow range element determines distance of conic shadow vertex from the object center. Dimension of shadow reduces with growing distance from object, shadow totally disappear in conic shadow vertex. Setting shadow range to 0 will switch off a shadow (default value).
 
To create dynamic shadow a stencil buffer of the graphics card is used. Stencil buffer is supported by most of graphics cards in 32-bit videomode only. If a videomode not supporting the stencil buffer is used (16-bit videomode usually), an alternative technique of shadow creating will be used, which uses overlapping of lightening and embrowning areas. This alternative technique has secondary effects on a dark background especially - supervening of colored veil stretched from the object to the shadow. For that reason, if shadows are not stringently required, it is recommended to switch them off in other then 32-bit videomodes. The stencil buffer is already supported in all videomodes with newest graphics cards.
 
If complexity of outline curve is too high in comparison to bit depth of the stencil buffer then effect of shadow segmentation can occur - light defects appear in a shadow. Therefore it is recommended to simplify the object (casting shadow) at most.
 
Another effect, on which it is important to remember when using dynamic shadow, is shadow inversion in a case when an observer occurs in place of shadow casting. Therewore, an observer (camera) should never get to shadow casted by an object.

Full Html Context Help of The Peter - Gemtree Software & Children Programming