Light World
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是将正交投影的光束投射到场景上的无限远程光源。该光线投射的阴影是平行的,从而提供了对太阳光的逼真的模拟。
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.Light World阴影具有自适应偏差,该偏差会在阴影贴图上自动调整,应用如下:根据Light World的倾斜角度及其分辨率,计算存储在阴影贴图中的深度值的偏移量。
See Also也可以看看#
- The LightWorld class to manage Light World via API通过API管理Light World的LightWorld类
- The part of the Lighting video tutorial dedicated to working with Light World照明视频教程的一部分专门用于使用Light World
- The article on Light World scatteringLight World上的文章散射
Adding World Light添加世界之光#
To add Light World to the scene via UnigineEditor, do the following:要通过UnigineEditor将Light World添加到场景中,请执行以下操作:
- Run the project with UnigineEditor.跑步UnigineEditor的项目。
-
On the Menu bar, click Create -> Light -> World.在菜单栏上,单击Create -> Light -> World。
-
Place Light World somewhere in the world.将Light 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.调整Light World设定。
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.以下选项集可用于Parameters窗口的Node选项卡中的Light World。它既包括常用参数以及特定于Light World的参数。具体描述如下。
Light Settings灯光设置#
Disable Angle | The angle between the light source and the zenith at which the light source is disabled (shadows and the diffuse component is disabled). However, the light source still affects scattering.光源和禁用光源的天顶之间的角度(阴影和漫反射分量禁用)。但是,光源仍然会影响散射。 | ||||
---|---|---|---|---|---|
Scattering |
A lighting type:照明类型:
Light scattering is defined by a combination of environment scattering LUTs (Look-Up Textures) describing different states of the sky during the day. The atmosphere is rendered based on interpolation between these LUTs.光散射由以下各项的组合定义环境散射LUT(查找纹理)描述白天的不同天空状态。根据这些LUT之间的插值渲染气氛。
|
Shadow Settings阴影设置#
Shadows | Enables or disables the PSSM technique.启用或禁用PSSM技术。 | ||||
---|---|---|---|---|---|
Cascade Mode |
Shadow cascade generation mode to be used (available for the Static light mode only):要使用的阴影级联生成模式(适用于Static灯光模式只要):
|
||||
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.许多具有不同阴影贴图的级联。每个级联都需要单独的渲染过程。所有阴影贴图具有相同的分辨率(参数Shadow Resolution的值),但应用于不同的级联。因此,近距离阴影的质量较高,远距离阴影的质量较低。级联的最小数量为1,最大为4。级联数的增加可增强渲染图像的质量。但是,那样会降低性能效率。 In Static cascade mode, shadow cascades are additionally visualized by the boxes that define the shadow area.在静态级联模式下,阴影级联还通过定义阴影区域的框可视化。
|
||||
Cascade border |
A multiplier for the distance to the border of the cascade in range [0;1].到级联边界的距离的乘数,范围为[0;1]。 Distance to the border depends on the Cascade Mode and is set as follows:到边界的距离取决于Cascade Mode,其设置如下:
The number of cascade borders depends on the number of cascades:级联边界的数量取决于级联的数量:
For the last cascade, the multiplier is always 1.对于最后一个级联,乘数始终为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:启用Static Cascade Mode可使用其他参数。除了所有光源通用的静态阴影参数,有一些参数定义了在其中渲染静态阴影的框的大小:
Height | Size of the shadow area box along the X axis.阴影区域框沿X轴的大小。 |
---|---|
Width | Size of the shadow area box along the Y axis.阴影区域框沿Y轴的大小。 |
ZFar |
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.确保ZFar距离足够大,以使对象和曲面都在阴影区域框中包含阴影。 |