|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Shader | Light Source
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Synopsis |
Simulates illumination by a hemisphere representing the sky.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Location | lishpro | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
\begin{SevenFourFeature} A simplified sky shader which models the illumination from a uniformly bright, single-colour, hemispherical dome representing the sky. It can be much quicker than the more complex "sky" shader, which attempts to model the uneven distribution of light across the across the sky, under varying cloud conditions. "simple sky" is therefore not as realistic as "sky", but it can be much quicker, and is certainly easier to use. Since the differences are quite subtle, "simple sky" will produce perfectly acceptable results in many situations. The "up" vector defines the orientation of the sky hemisphere with respect to the scene. Specifically, it is a vector that joins any point in your scene to the zenith (highest point) of the sky hemisphere. Note that even though the shader takes 15 parameters, we only need consider 4 of them here. The shader works by creating { "number of samples"} distant light source shaders, scattered uniformly about the hemisphere defined by the "up" vector. All of the following parameters are then passed directly to these child distant lights:
Readers who wish to understand how any of these parameters affect the "simple sky" shader, should refer to the documentation for the "distant" shader, bearing in mind that the former is simply a collection of the latter. Note: Bear in mind, however, that the default value for "shadow type" is LI_SHADOW_TYPE_HARD for "simple sky" (and "environment light"), wheras it is LI_SHADOW_TYPE_SOFT for "distant" (and most other lights). The "intensity" is not passed directly to the many { distant} lights; instead we first divide it by "number of samples", to ensure that varying "number of samples" does not change the brightness of surfaces lit by the "simple sky". The "noise factor" allows users to exchange sampling artefacts for noise, when using hard shadows. Its default value of 0.0 means that no jittering of visibility rays takes place. A value of 1.0 means that all visibility rays undergo jittering. Intermediate values result in some rays being jittered, and others not. Note that the range of acceptable values for "intensity units" does not match the range of acceptable values for the same parameter, in the "sky" light source shader. This is because "simple sky" passes the parameter straight to its child distant lights. Shadow maps are unusual for sky lights; most software that implements such a light will use ray tracing (HARD shadows) to calculate visibility. The advantage of having a shadow map at every sky sample is that you can get away with a small "number of samples" and still not suffer either sampling arteficts, or noise. However, calculating a large number of shadow maps can take some time, prior to rendering (and quickly use up memory); for this reason hard shadows are the default setting. In most cases, hard shadows with a relatively small "number of samples" and fairly high "noise factor" will produce quite acceptable results. One final reminder: the "simple sky" shader (like the more complex "sky" shader) only simulates the illumination from the sky hemisphere, and does not account for the direct contribution of the sun, as might be seen on a clear day.
\end{SevenFourFeature}
Previous page alphabetically (simpleshaded) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1990-2004, 2005 LightWork Design Limited. All rights reserved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||