Version: 2019.3
光照概述
光源资源管理器 (Light Explorer)

Lighting 窗口

The Lighting window (menu: Window > Rendering > Lighting Settings) is the main control point for Unity’s lighting features. You can use the Lighting window to adjust many aspects of the lighting process, to customise the lighting in your Scene, and to optimise your lighting for quality, speed and storage space.

Note that the options available in the Lighting window vary depending on which render pipeline your Project uses.

概述

Lighting 窗口包含 3 个选项卡:

  • The Scene tab contains lighting settings that apply to the overall Scene rather than individual GameObjects.

  • The Realtime Lightmaps tab shows a list of all realtime lightmaps for the current Scene. If Realtime Global Illumination is not enabled in your Project, this tab will be empty.

  • The Baked Lightmaps tab shows a list of baked lightmaps for the current Scene, along with the Lighting Data Asset. If Baked Global Illumination is not enabled in your Project, this tab will be empty.

At the bottom of the Lighting window is the Auto Generate checkbox. When enabled, Unity updates lightmap data as you edit the Scene. Note that the update usually takes a few seconds rather than happening instantaneously. If Auto Generate is disabled, the Generate Lighting button to the right of the checkbox becomes active; use this button to trigger lightmap updates when you need them. Use the Generate Lighting button if you want to clear the baked data from the Scene without clearing the GI Cache.

Scene 选项卡

The Scene tab contains lighting settings that apply to the current Scene, rather than individual GameObjects. The Scene tab contains several sections:

Environment

This section contains settings for the skybox, diffuse lighting and reflections.

属性: 功能:
Skybox Material 天空盒是一种材质,它出现在场景中的所有其他对象后方,用于模拟天空或其他遥远的背景。使用此属性可选择要用于场景的天空盒。默认值是内置的默认天空盒 (Default Skybox)。
Sun Source 如果__天空盒材质 (Skybox Material)__ 是程序化天空盒 (Procedural Skybox),使用此设置可指定带有方向光组件的游戏对象,从而指示太阳(或任何照亮场景的大型远距离光源)的方向。如果设置为 None__,则认为场景中最亮的方向光代表太阳。默认值为 None。| | Environment Lighting__ This section contains settings that affect light coming from the distant environment.
Source 漫射环境光(也称为环境光)是场景周围存在的光,并非来自任何特定的光源对象。此项可用于定义光源颜色。默认值为 Skybox
    Skybox Select this to use the colors of the Skybox set in Skybox Material to determine the ambient light coming from different angles. This allows for more precise effects than Gradient.
    Gradient 选择此选项可为来自天空、地平线和地面的环境光选择单独的颜色,并在它们之间平滑混合。
    Color 选择此选项可将单调颜色用于场景中的所有环境光。
Intensity Multiplier 使用此属性可设置场景中漫射环境光的亮度,定义为 0 到 8 之间的值。默认值为 1。
Ambient Mode Use this to specify which Global Illumination mode should be used to determine ambient light in the Scene. This property is only available when both real-time lighting and baked lighting are enabled in the Scene.
    Realtime 如果希望实时计算和更新场景中的环境光,请选择 Realtime
    Baked Choose Baked if you want Unity to precompute the ambient light in the Editor, and then apply it at runtime.
Environment Reflections 此部分包含反射探针烘焙的全局设置,以及影响全局反射的设置。
Source 使用此设置指定是要将天空盒用于反射效果,还是使用您选择的立方体贴图。默认值为 Skybox
    Skybox Select this to use the Skybox as the reflection source. If you select Skybox, an additional option called Resolution appears. Use this to set the resolution of the Skybox for reflection purposes.
    Custom Select this to use a cubemap for reflections. If you select Custom, an additional option called Cubemap appears. Use this to specify the cubemap.
Compression 使用此属性可定义是否压缩反射纹理。默认设置是 Auto
    Auto 如果压缩格式合适,则压缩反射纹理。
    Uncompressed 反射纹理以非压缩状态存储在内存中。
    Compressed 压缩纹理。
Intensity Multiplier 反射源在反射对象中可见的程度。
Bounces 当来自一个对象的反射随后被另一个对象反射时,便发生反射反弹。使用此属性可设置反射探针评估对象之间来回反弹的次数。如果设置为 1,则 Unity 只会考虑初始反射(来自 Reflection Source 属性中指定的天空盒和立方体贴图)。

Realtime Lighting

属性: 功能:
Realtime Global Illumination (deprecated) If this checkbox is ticked, Unity enables Realtime Global Illumination using Enlighten. Note that Enlighten is deprecated, and will soon be removed.

Mixed Lighting

属性: 功能:
Baked Global Illumination If enabled, Unity precomputes lighting data in the Editor, and then applies this data to the Scene at runtime. See documentation on Baked lighting for more information.
Lighting Mode Specifies which Light Mode will be used for all Mixed lights in the Scene. Options are Baked Indirect, Subtractive, and Shadowmask.
Note: When you change the Lighting Mode, you need to re-bake the Scene. If Auto Generate is enabled in the Lighting window, this happens automatically. If Auto Generate is not enabled, click Generate Lighting to see the updated lighting effect.
Realtime Shadow Color Define the color that Unity uses to render real-time shadows. This setting is only available when Lighting Mode is set to Subtractive.

Lightmapping Settings

Lightmapping Settings are specific to the Lightmapper backend. To see the settings information for each lighting system, see the documentation on the Progressive CPU Lightmapper, the Progressive GPU Lightmapper (preview), and Enlighten (deprecated).

Other Settings

本节提供了有关 Other Settings 部分的文档。

属性: 功能:
Other Settings 雾效、光环光晕剪影的设置。
Fog 在场景中启用或禁用雾效。请注意,此模式无法用于延迟渲染路径。对于延迟渲染,后期处理雾效效果可能比较合适。
Color 使用拾色器设置 Unity 用于在场景中绘制雾的颜色。
Mode 定义雾化效果随着与摄像机距离变化而积累的方式。
Linear 雾效强度随着距离线性增加。
Start 设置在距离摄像机多远时开始雾效。
End 设置在距离摄像机多远时雾效完全遮挡场景游戏对象。
Exponential 雾效强度随着距离呈指数增加。
Density 用于控制雾效的强度。雾效随着 Density 增加而显示为更强。
Exponential Squared 雾效强度随着距离更快速增加(指数和平方)。
Density 用于控制雾效的强度。雾效随着 Density 增加而显示为更强。
Halo Texture 设置要用于在光源周围绘制光环的纹理。
Halo Strength 定义光源周围光环的可见性,值在 0 到 1 之间。
Flare Fade Speed 定义最初出现镜头光晕之后从视图中淡出的时间(以秒为单位)。默认情况下,该值设置为 3。
Flare Strength 定义光源下镜头光晕的可见性,值在 0 到 1 之间。
Spot Cookie 设置要用于点光源剪影纹理。

Debug Settings

属性: 功能:
Debug Settings 这些设置可帮助您调试场景。
Light Probe Visualization 用于过滤哪些光照探针显示在 Scene 视图中。默认值为 Only Probes Used By Selection
    Only Probes Used By Selection 只有影响当前选择的光照探针才会显示在 Scene 视图中。
    All Probes No Cells 所有光照探针都将显示在 Scene 视图中。
    All Probes With Cells 所有光照探针都将显示在 Scene 视图中,还会显示用于光照探针数据插值的四面体。
    None 任何光照探针都不显示在 Scene 视图中。
Display Weights 勾选此复选框时,Unity 将从用于有效选择的光照探针到用于插值的四面体上的位置绘制一条线。这是一种调试探针插值和放置问题的方法。
Display Occlusion 勾选此复选框时,如果混合光照模式为 Distance ShadowmaskShadowmask,则 Unity 将显示光照探针的遮挡数据。

  • 2018–03–29 页面已发布

  • 5.6 版更新

  • 2018.1 版中更新了光照贴图部分和调试设置 NewIn20181

光照概述
光源资源管理器 (Light Explorer)