阴影

Eevee使用阴影贴图技术产生直接来自灯光物体的光线的正确的阴影。

阴影贴图是一种纹理,用于存储距光照位置最近的遮挡。 Eevee还会过滤阴影贴图,以平滑像素化的外观。

全局设置

参考

面板:渲染 ‣ 阴影
模式

选择阴影贴图类型。它改变了阴影的存储和过滤方式。

ESM
They are fast to filter but light leaking may occur near an occluder. This can be minimized by increasing the Exponent parameter. Another issue is the artifacts present at depth discontinuity. Unfortunately, there is no workaround for this issue and the only way to minimize it is to reduce the Soft parameter.
VSM
过滤效果很好,可在整个阴影范围内提供平滑的阴影贴图。然而,当使用低位深度时,它会受到可见的颗粒状伪影的影响。当两个遮挡物重叠时,它也容易发生漏光。在这种情况下,可以通过使用 Bleed Bias 参数来遮蔽阴影以减少泄漏。 VSM使用的内存是ESM的两倍,并且速度较慢。
立方体大小
用于点光,区域光和聚光灯的阴影立方体贴图的大小。较高的阴影贴图大小将提供更高的精度和更清晰的阴影。
级联大小
Size of one cascade used by Cascaded Shadow Maps. This is only for Sun lights.
高色彩深度
此选项可以帮助减少由于阴影贴图内的浮动不精确而导致的一些瑕疵。此选项会使阴影贴图的内存使用量加倍,并且会降低其更新速度。
柔和阴影(软阴影)
随机化阴影贴图原点以创建柔和阴影。它需要大量的样品来去除带状物。
灯光阈值

为了避免花费昂贵的设置时间,首先根据光阈值自动计算该距离。该距离在光源原点处计算,并使用平方反比衰减。该设置可以在 渲染设置面板 ‣ 阴影栏 中找到。

This light threshold does not take the light shape into account and may not suit every case. That is why we provide a per-light override where you can just set the cut off distance (Light Properties Panel ‣ Light ‣ Custom Distance).

影响距离也用作阴影远距剪辑距离,这可能会影响阴影的外观。这种影响距离不涉及仍然具有远距剪辑距离的阳光。

See also

Custom Limit.

Note

The Soft Shadows method is not physically based and will not match Cycles for very large lights.

Tip

A 512 px cubemap has 6 x 512 x 512 pixels in it. Tweaking the Size parameters can have a big impact on memory consumption and performance.

Light Settings

常用参数

剪辑
Distance from the light object at which the shadow map starts and ends. Any object before this distance will not appear to cast shadows. Clip End will only appear for sun lights.
柔和
Size of the filter applied to the shadow map. This filter size is independent of the shadow map resolution. Higher filter size can have a big impact on performance. There is a maximum cap to filter size (in pixels) that depends on shadow resolution.
偏差
偏差应用于深度测试以减少自阴影瑕疵。
指数
指数应用于ESM以减少漏光。
出血偏差
偏差应用于VSM以减少漏光。

接触阴影

This type of shadow exists to fix light leaking caused by bias or shadow map undersampling. It uses the depth buffer to find occluders (just like Screen Space Reflections). However, just like Screen Space Reflections it suffers from the same limitations, namely, unknown object thickness and effect disappearing at screen edges.

Tip

接触阴影的作用距离应该保持很小。它们不够精确,无法覆盖整个场景。

距离
世界空间中搜索屏幕空间遮挡的距离。
柔软性
Controls how soft the contact shadows will be. Contact shadow blurring does not match a light's physical size.
偏差
Bias applied to the ray tracing to reduce self-shadowing artifacts.
厚度
Pixel thickness used to detect occlusion, treating any potential occluder as this thick.

级联(层叠)阴影贴图

These special kind of shadow maps are used by Sun lights. This is because they can shadow large scenes by distributing multiple shadow maps over the frustum range. Each cascade covers a different portion of the view frustum. Do note that cascade shadow maps are always updated because they are view dependent. This means they have a high performance impact.

Note

In orthographic view the cascades cover the whole depth range of the camera with an evenly distributed shadow precision.

计数
Number of cascades to use. More cascades means better precision but a lower update rate.
淡化
淡化两个级联之间的过渡区域。值越高意味着整体分辨率越低,因为级联需要重叠。
最大距离
Distance away from the view origin (or camera origin if in camera view) to cover by the cascade. If the view far clip distance is lower than Max Distance, the lowest of the two will be used. Only works in perspective view.
分布
使更多分辨率朝向近剪裁平面。仅适用于透视图。

See also

Limitations.