|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Class | Light | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Synopsis |
Parallel light from a distant source.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Arguments |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Location | lishslte | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
A light source emitting light parallel to a given direction
vector as if from a very distant source, such as the sun.
The direction of the light is specified by means of two
arguments: "location" and "to", such that the
direction vector is taken as being from the "location"
point towards the "to" point.
The intensity of the light can be specified in either non-physical, `empirical' units (essentially an arbitrary value chosen by the user to produce an image which looks right), or by physically accurate units of light intensity (such as lux or candela) as used by the lighting industry. The argument "intensity units" is used to specify what units the argument "intensity" is given in. By default the units are assumed to be empirical (arbitrary) units. The full list of possible values for "intensity units" for this light shader is:
There are also two ways to specify the colour of the light. Either the more intuitive "colour" argument can be used (which is simply an LtColour value), or the "colour temperature" argument may be used instead if you are attempting to accurately model some real-world light (many lighting manufacturers publish the performance of their light fittings in such a way). Further details of what is meant by a colour temperature can be found in the LightWorks manual `Lighting'. The value itself is given as an LtFloat representing a temperature value in Kelvins. A number of standard values are defined as symbols, and the default value, 0.0, means that the standard "colour" argument is used instead. Similarly, if the "colour" argument is left at its default value of (1.0, 1.0, 1.0) (white) then it will be ignored and the "colour temperature argument" used to decide the light's colour. If non-default values are provided for both "colour" and "colour temperature" arguments, note that the final colour of the light will be calcalated by combining the two values. Shadows may be turned on for the light source by means of the flag passed as argument "shadows", a value of TRUE being used to turn shadows on. The resolution of the shadow map that is used in the preprocessing of shadows is passed in argument "shadow resolution". Shadows may be turned on for the light source by means of the flag passed as argument "shadows", a value of TRUE being used to turn shadows on. {Note that shadows can only be displayed if the "shadows" argument is set to TRUE and either ray cast shadows are being used or the shadow maps have been preprocessed.} The argument "shadow type" is used to specify whether hard-edged shadows (produced by ray casting) or soft-edged shadows (produced by shadow mapping) are created. Note that because hard-edged shadows require the ray tracer, they are only available to users of LightWorks~Classic or above. Therefore by default the value of this parameter is LI_SHADOW_TYPE_SOFT. If hard-edged shadows are required, and the ray tracer is available to you, then the value LI_SHADOW_TYPE_HARD should be used. If soft shadows are specified, then the resolution of the shadow map used is given by the argument "shadow resolution". Note: Soft shadows require a shadow map to be calculated. This step must be explicitly carried out by the application, by calling LiLightCreateShadow. It is possible now to control transparency of shadows on per light basis, using the "shadow transparency" argument. The default value, LI_TRANS_SHADOW_GLOBAL, means that the global setting from LI_CONTROL_TRANSPARENT_SHADOW is used for this light. However you can override the value of this global control variable by setting the light argument to one of the following values:
It is also possible to make use of a previously generated shadow map to speed up calculation of hard-edged (ray cast) shadows. In order to do this, the "shadow acceleration" argument should be set to LI_SHADOW_ACC_MAPS. By default this argument is set to LI_SHADOW_ACC_NONE, meaning no such acceleration is performed. The quality of the shadows is specified by "shadow quality": a value of 1 corresponds to low quality, and a larger value such as 9 gives higher quality. A value that determines how soft the boundaries of shadows appear is specified in argument "shadow softness". The "shadow tolerance" value is used to modify the shadow map sampling distance. It used to deal with self shadowing artifacts that can be apparent with low resolution, high softness shadows. They usually appear as either grid like patterns of smudges or moire patterns. A value of 0.0 specifies no effect, a value of 1.0 causes no shadows. Values of around 0.1 to 0.2 are usually sufficient to deal with most artifacts. The value of this parameter should be as small as possible. The reason for this is that large values can cause shadows to disappear from objects close to the object casting the shadow. A value of 1.0 will cause all shadows to vanish. For more details see the Lighting manual.
If the light is to be used in conjunction with the "scattering medium" shader to create the effect of light being scattered by a foggy atmosphere, then the parameter "scattering" must be set to TRUE (it is FALSE by default for efficiency reasons).
Previous page alphabetically (dielectric) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1990-2005, 2006 LightWork Design Limited. All rights reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||