Version: 2022.3
GI 缓存
模型

Scene 视图光照绘制模式

The Scene view has a number of Draw Modes to help you understand and debug the lighting in your Scene.

使用 Scene 视图控制栏选择所需的绘制模式。

Shading Mode

Shaded

Shading Mode 的默认设置为 Shaded。此选项表示场景根据当前的光照设置完全点亮。

Miscellaneous

Shadow Cascades

使用颜色可以采用不同的级联级别显示场景的各个部分。此模式有助于正确设置阴影距离、级联计数和级联分割比率。请注意,此可视化方法会使用通常大于阴影距离的 Scene 视图远平面,因此如果要将摄像机的游戏内行为与小远平面匹配,可能需要缩短阴影距离。

Scene 视图中的阴影级联绘制模式
Scene 视图中的阴影级联绘制模式

Global Illumination

Systems

The precompute stage will automatically subdivide the scene into systems (i.e. groups of objects sharing the same real-time lightmap) based on proximity and Lightmap Parameters. This is done to allow multithreading and optimizations when updating indirect lighting. This visualization shows the systems with different colors.

Clustering

Enlighten calculates visibility information for geometry with Contribute GI enabled. It does this by making use of clusters generated during the Clustering step. This view displays those clusters, which should be larger than lightmap texels. The Cluster Resolution parameter in Lightmap Parameters determines this ratio. Converting geometry to clusters can be quite memory intensive if the scale of the geometry isn’t correct. Large scenes can generate more clusters than Unity can store in your system’s memory. If you are seeing high memory usage or long baking times it could be because the static geometry in your scene splits into many more clusters than necessary. The clustering scene view mode can help you identify the geometry in need of UVs or Indirect Resolution adjustments.

Both Enlighten Baked Global Illumination (deprecated and no longer visible in the user interface by default) and Enlighten Realtime Global Illumination depend on these calculations to compute indirect lighting. See Lightmapping using Enlighten Baked Global Illumination for information about how to make Enlighten visible in the user interface as an option for light baking.

Lit Clustering

This is the Clustering view with Enlighten Realtime Global Illumination applied.

UV Charts

This shows the optimized UV layout used when calculating Enlighten Realtime Global Illumination. It is automatically generated during the precompute process. It is available as soon as the Instance precompute stage is completed. The UV Charts scene view mode can help you identify the geometry that needs to have UVs or scale adjusted (use the Resolution parameter in Lightmap Parameters to change scale). This view is also useful when adjusting the Indirect Resolution. Each chart has a different color.

Contributors/Receivers

此绘制模式根据网格渲染器和地形的 Static Editor Flags 中的 ContributeGI 是否已启用,以及其 ReceiveGI 属性的值,用不同颜色绘制网格渲染器和地形。

在默认颜色中:

  • 黄色表示游戏对象的 Static Editor Flags 中未启用 ContributeGI
  • 蓝色表示游戏对象的 Static Editor Flags 中已启用 ContributeGI,并且渲染器的 ReceiveGI 属性设置为 Lightmaps
  • 红色表示游戏对象的 Static Editor Flags 中已启用 ContributeGI,并且渲染器的 ReceiveGI 属性设置为 Light Probes

You can customize the default colors in the Preferences window.

Realtime Global Illumination

Albedo

Enabling Show lightmap resolution overlay in the Editor Manager settings indicates the albedo that lightmappers use to calculate Baked Global Illumination results. Unity calculates the albedo from the material information which can be customized fully by adding a custom meta pass.

Emissive

Shows the emission used when calculating the GI. It is generated from the material information and can be fully customized by adding a custom meta pass.

Indirect

The Indirect view displays indirect lighting as captured in the lightmaps that Enlighten Baked Global Illumination generates. Irradiance is a radiometric unit that describes how much power (radiant flux) a surface receives per unit area. Unity uses the irradiance texture to store indirect light data at runtime. If you disable Enlighten Baked Global Illumination, the Indirect view mode isn’t selectable.

在 Indirect 视图模式下,可以使用光照贴图曝光控件来帮助更有效地评估 HDR 光照贴图。

Comparison of Indirect Lightmaps with different exposure values
Comparison of Indirect Lightmaps with different exposure values
  1. Default Exposure: The lightmap exposure slider at the default value of 0.
  2. Altered Exposure: Here the lightmap exposure slider is at a value of –1.

Directionality

This view shows the most dominant light direction vector. Please refer to the Directional Lightmapping page for more info.

Baked Global Illumination

Baked Lightmap

The Baked Lightmap view displays baked lightmaps applied to the Scene geometry. In this mode, you can use a Lightmap Exposure control to help you assess HDR lightmaps more effectively.

Scenes with high lighting intensities might require you to use exposure compensation to bring the Baked Lightmap Scene View into an easily readable range.

Comparison of Baked Lightmaps with different exposure values
Comparison of Baked Lightmaps with different exposure values
  1. Default Exposure: The lightmap exposure slider at the default value of 0.
  2. Altered Exposure: Here the lightmap exposure slider is at a value of 4.

Shadowmask

此选项显示阴影遮罩纹理遮挡值。它以相同的颜色为网格和光源辅助图标着色,因此用户可以验证光照遮挡因子是否按预期烘焙。

Texel Validity

此模式显示哪些纹理像素由于主要看到背面而被标记为无效。在光照贴图烘焙期间,Unity 从每个纹理像素发出光线。如果纹理像素光线的很大一部分照射到背面几何体,则该纹理像素被标记为无效。这是因为纹理像素首先不应该能够看到背面。Unity 处理此问题的方法是用有效相邻纹理像素替换无效纹理像素。您可以使用 Backface Tolerance 参数 (LightmapParameters > General GI) 来调整此行为。

This view is not compatible with Enlighten Baked Global Illumination.

UV Overlap

如果光照贴图图表在 UV 空间中距离太近,则当 GPU 对光照贴图进行采样时,它们内部的像素值可能会相互渗色。这可能导致意外瑕疵。此模式允许您识别哪些纹理像素过于靠近其他图表中的纹理像素。在解决 UV 问题时,这非常有用。

This view is not compatible with Enlighten Baked Global Illumination.

Light Overlap

此模式允许您查看是否所有静态光源都已烘焙到阴影遮罩。如果关卡某个区域被四个以上的静态光源照亮,超出的光源将回退到完全烘焙并显示为红色。与此计算相关的不是实际光照表面,而是光源的体积的交点区域。因此,即使在下面的截屏中看起来好像网格上的彩色斑点不重叠,但四个聚光灯的锥体最终也会与方向光一起重叠在地平面下方。

  • [GI Contributors/Receivers 绘制模式]于 2020.1 NewIn20201 添加
GI 缓存
模型