|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Class | Light | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Synopsis |
Uses environment map to light scene (for Image Based Lighting).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Arguments |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Location | lishpro | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
A light shader that uses an environment map to light a scene. By default the environment map used is the one set as the current scene's environment map (i.e., set using LiEnvironmentSet when using core~LightWorks or the environment entity attached to the current scene entity when using Session Manager)---in other words the same one which would be used by the "environment" reflectance shader. This environment map (when "use global environment" is TRUE) or the local environment described via the "environment" argument (when "use global environment" is FALSE) is used to produce a temporary environment map with panorama layout used to light the scene. This shader is designed to be used mainly with HDRI (High Dynamic Range Image) images ( .exr, .hdr), but will also work with standard (low dynamic range) images (such as .jpg, .tif, .lwi, etc.). The brightness of images used as environment map may vary. To adjust the brightness of the scene being rendered, use the argument "intensity". By default this has the value 1.0; the best value for this parameter should be found empirically. The same "intensity" for different environment maps may vary from correct to completely inappropriate. Larger values make rendered images brighter, lower make them dimmer. The default value should give more of less correct results and it is a good starting point for adjusting. When a rendered image is too dark (even black) or too bright (almost white) this is the first place which should be checked. Changing "number of samples" makes the lighting more accurate but doesn't change an overall image brightness.
Note that when using regular (low dynamic range) images, setting inappropriate values of "intensity" (too small or too big) can result in the loss of certain subtle lighting effects. The brightness of the scene can be specified in either non-physical, `empirical' units , or by physically accurate units of light intensity (such as lux or candela) as used by the lighting industry (this is especially useful when using HDRI images prepared using such units; for example some lighting manufacturers may provide physically accurate HDRI images). The "noise factor" allows users to exchange sampling artifacts for noise, when using hard shadows. This parameter gives the possibility to make shadow boundaries less visible. 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. 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:
The "shadows" argument specifies whether or not the sky will cast shadows on the scene.
The argument "shadow type" is used to specify whether hard-edged shadows or soft-edged shadows are created. By default the value of this parameter is LI_SHADOW_TYPE_HARD for this shader (and also for "simple sky"), whereas it is LI_SHADOW_TYPE_SOFT for "distant" (and most other lights). The reason for this is that calculating a large number of shadow maps can take some time, prior to rendering (and quickly use up memory).
If transparent objects make up part of the scene, then the "shadow transparency" argument can be utilized to ensure that appropriate shadows result. A value of 0 means that the light will not cast transparent shadows. The default "shadow transparency" value is LI_TRANS_SHADOW_GLOBAL, which means that the shader will look at the value of LI_CONTROL_TRANSPARENT_SHADOW when deciding whether to cast transparent shadows. Three other "shadow transparency" values are possible:
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 "number of samples" argument provides an easy to understand and predictable trade-off between accuracy and speed. The actual number of generated lights can be a bit smaller than requested by this parameter. It is a consequence of used algorithm which skips insignificant light sources. Important fact is that setting the very small "number of samples" (below 10) in some cases may cause all light sources from an environment map to be treated as insignificant. In consequence an image appears unlit. This can be corrected by increasing the number of samples. By default the whole environment is sampled, thus, the scene is lit from all directions. This may be changed by setting "use upper hemisphere only" argument to TRUE resulting in sampling of only the upper hemisphere of the environment. This option may be useful if you don't want geometry of your scene to be lit from below by the environemnt e.g. you may have an environment map depicting a meadow applied to a geometry of a car on a road in which case you wouldn't like the car to be lit by the green grass. However, in most cases that shouldn't be a problem because usually environment maps contain only a few dominating light sources like the sun or lamps and illumination from other parts is quite weak contributing mostly to the amibient light and such places are not creating shadows. Additionally, in the described example you could set geometry of the road to be double sided which would make is block the lights which are below the car. If the "use global environment" is TRUE then the shader uses the global environment (returned by LiEnvironmentGet) to create a panoramic image, otherwise the local environment (described by the "environment" argument) is used to create a panoramic image. The "environment" argument is an LtInterface. It is used to produce an environment map when "use global environment" is FALSE.
New! The "lighting components" argument is a bitfield which allows the end user to specify how the contribution of a `dome' light (i.e., a "sky", "simple sky", "environment" or "simple environment" light) should be modelled, during any final gather processing:
Previous page alphabetically (environment) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1990-2005, 2006 LightWork Design Limited. All rights reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||