Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.
No language code for this page. You can select other language.
No language code for this page,
shown in other instead.
shown in other instead.
World Light Source
A world light is an infinitely remote light source casting orthographically projected beams onto the scene. The shadows cast by this light are parallel, which provides a realistic simulation of the sunlight.
World light shadows has an adaptive bias that is adjusted automatically on shadow maps applying: depending on the slope angle of the world light and its resolution, an offset of the depth value stored in the shadow map is calculated.
- The LightWorld class
- Article on the WorldLight scattering
Adding World Light
To add a world light to the scene via UnigineEditor, do the following:
- Run UnigineEditor.
- On the Menu bar, click Create -> Light -> World.
- Place the world light somewhere in the world.
The physical position of the source is not important, only the direction matters, as it defines the shadow casting orientation. To change the light's direction use the rotation manipulator.
- Adjust the world light's settings.
World Light Settings
The following set of options is available for the world light. Detailed information on the parameters can be found in the Light Sources article.
|Light||A shadow mask.|
|Viewport||A viewport mask.|
|Color||A light RGBA color.|
|Intensity||A light color multiplier.|
|Disable angle||A critical angle above the horizon, where the light source is still enabled. If the light becomes disabled, it still affects scattering.|
|Scattering||A lighting type:
|Shadows||Enables or disables the PSSM technique.|
|Shadow resolution||Size of the shadow map that defines shadow quality.|
|Number of cascades||A number of cascades with different shadow maps. Each cascade requires a separate rendering pass. All the shadow maps have the same resolution (the Shadow resolution parameter value), but are applied to different cascades. Thus, close-range shadows are of higher quality and distant ones of lower. The minimum number of cascades is 1, the maximum is 4. Increasing the number of cascades enhances the rendered image quality. However, at that, performance efficiency drops.
To visualize the cascades, enable Helpers -> Shadow cascades.
|Cascade border||A multiplier for the distance to the border of the cascade in range [0;1]. The number of cascade borders depends on the number of cascades:
|Cascade offset||Offset of the shadow cascades relative to the camera. The cascades will be shifted away from the camera.|
|Sharpness||Sharpness of the shadow edges.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)