shown in other instead.
Light World 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.
Light World shadows have an adaptive bias that is adjusted automatically on shadow maps applying: depending on the slope angle of Light World and its resolution, an offset of the depth value stored in the shadow map is calculated.
Adding World Light#
To add Light World to the scene via UnigineEditor, do the following:
- Run the project with UnigineEditor.
On the Menu bar, click Create -> Light -> World.
Place Light World 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 Light World settings.
World Light Settings#
The following set of options is available for Light World in the Node tab of the Parameters window. It includes both the common parameters and the parameters specific for Light World. The specific ones are described below.
|Shadows||Enables or disables the PSSM technique.|
Shadow cascade generation mode to be used (available for the Static light mode only):
|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.
In Static cascade mode, shadow cascades are additionally visualized by the boxes that define the shadow area.
A multiplier for the distance to the border of the cascade in range [0;1].
Distance to the border depends on the Cascade Mode and is set as follows:
The number of cascade borders depends on the number of cascades:
For the last cascade, the multiplier is always 1.
Setting the cascade borders allows you to accurately adapt the quality of the shadows depending on their remoteness from the viewer.
Enabling Static Cascade Mode makes extra parameters available. In addition to the static shadow parameters common for all light sources, there are parameters that define the size of the box within which the static shadows are rendered:
|Height||Size of the shadow area box along the X axis.|
|Width||Size of the shadow area box along the Y axis.|
Distance from the light source position along the light direction vector.
Ensure that ZFar distance is big enough to have both objects and surfaces that take shadows within the shadow area box.