Version: 2017.3
Lighting overview
Light Explorer

Lighting Window

The Lighting window (menu: Window > Lighting > Settings) is the main control point for Unity’s Global Illumination (GI) features. Although GI in Unity gives good results with default settings, the Lighting window’s properties allow you to adjust many aspects of the GI process, to customise your Scene or optimise for quality, speed and storage space as you need. This window also includes settings for ambient light, halos, cookies and fog.

Обзор

The controls of the Lighting window are divided among three tabs:

  • The Scene tab settings apply to the overall Scene rather than individual GameObjects. These settings control lighting effects and also optimisation options.

  • The Global maps tab shows all of the lightmap Asset files generated by the GI lighting process.

  • The Object maps tab shows previews of GI lightmap textures (including shadow masks) for the currently selected GameObject.

The window also has an Auto Generate checkbox below the displayed content. If you tick this checkbox, Unity updates lightmap data as you edit the Scene. Note that the update usually takes a few seconds rather than happening instantaneously. If you leave the Auto Generate box unticked, 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 tab

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

Environment

The Environmental Lighting section contains settings for the skybox, diffuse lighting and reflections.

Property: Function:
Skybox Material A skybox is a Material that appears behind everything else in the Scene to simulate the sky or other distant background. Use this property to choose the skybox Material you want to use for the Scene. The default value is the Material Default-Skybox in the Standard Assets.
Sun Source When a procedural skybox is used, use this to specify a GameObject with a directional Light component to indicate the direction of the “sun” (or whatever large, distant light source is illuminating your Scene). If this is set to None (the default), the brightest directional light in the Scene is assumed to represent the sun.
Environment Lighting These settings affect light coming from the distant environment.
Source Diffuse environmental light (also known as ambient light) is light that is present all around the Scene and doesn’t come from any specific source object. Use this to define a source colour. The default value is Skybox.
    Color Select this to use a flat color for all ambient light in the Scene.
    Gradient Select this to choose separate colors for ambient light from the sky, horizon and ground, and blend smoothly between them.
    Skybox Select this to use the colors of the skybox (if specified by the Skybox Material) to determine the ambient light coming from different angles. This allows for more precise effects than Gradient.
Intensity Multiplier Use this to set the brightness of the diffuse environmental light in the Scene, defined as a value between 0 and 8. The default value is 1.
Ambient Mode Use this to specify the Global Illumination mode that should be used to handling ambient light in the Scene. This property is only available when both real-time lighting and baked lighting are enabled in the Scene.
    Realtime Choose Realtime if you want the ambient light in the Scene to be calculated and updated in real time.
    Baked Choose Baked if you want the ambient light to be precomputed and set into the Scene at run time.
Environment Reflections These settings control global settings involved in Reflection Probe baking, and settings affecting global reflections.
Source Use this setting to specify whether you want to use the skybox for reflection effects, or a cube map of your choice. The default value is Skybox.
    Skybox Select this to use the skybox for reflections. 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 cube map for reflections. If you select Custom, an additional option called Cubemap appears. Use this to set the cube map of the skybox for reflection purposes.
Compression Use this to define whether or not reflection textures are compressed. The default setting is Auto.
    Auto The reflection texture is compressed if the compression format is suitable.
    Uncompressed The reflection texture is stored in memory uncompressed.
    Compressed The texture is compressed.
Intensity Multiplier The degree to which the reflection source (the skybox or cube map specified in the Reflection Source property) is visible in reflective objects.
Bounces A reflection “bounce” occurs when a reflection from one object is then reflected by another object. The reflections are captured in the scene through the use of Reflection Probes. Use this property to set how many times the Reflection Probes evaluate bounces back and forth between objects. If this is set to 1, then Unity only takes the initial reflection (from the skybox or cube map specified in the Reflection Source property) into account.

Realtime Lighting

Property: Function:
Realtime Global Illumination If this checkbox is ticked, Unity calculates and updates the lighting in real time. See documentation on Realtime Global Illumination for more information.

Mixed Lighting

Property: Function:
Baked Global Illumination If this checkbox is ticked, Unity precomputes the lighting and sets it into the Scene at run time. See documentation on Baked Global Illumination for more information.
Lighting Mode Lighting Mode determines the way Mixed Lights and shadows work with GameObjects in the Scene.
Note: When you change the Lighting Mode, you also 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 used to render real-time shadows. This setting is only available when Lighting Mode is set to Subtractive.

Lightmapping Settings

Property: Function:
Lightmapper Use this to specify which internal lighting calculation software to use to calculate lightmaps in the Scene. The options are Enlighten and Progressive (experimental). The default value is Enlighten.
See documentation on the Progressive Lightmapper for more information about the experimental Progressive Lightmapper feature.
Indirect Resolution Use this value to specify the number of texels per unit to use for indirect lighting calculations. Increasing this value improves the visual quality of indirect light, but also increases the time it takes to bake lightmaps. The default value is 2.
Lightmap Resolution Use this value to specify the number of texels per unit to use for lightmaps. Increasing this value improves lightmap quality, but also increases bake times. The default value is 40.
Lightmap Padding Use this value to specify the separation (in texel units) between separate shapes in the baked lightmap. The default value is 2.
Lightmap Size The size (in pixels) of the full lightmap texture, which incorporates separate regions for the individual object textures. The default value is 1024.
Compress Lightmaps A compressed lightmap requires less storage space, but the compression process can introduce unwanted visual effects into the texture. Tick this checkbox to compress lightmaps, or untick it to keep them uncompressed. The checkbox is ticked by default.
Ambient Occlusion When ticked, this opens a group of settings which allow you to control the relative brightness of surfaces in ambient occlusion. Higher values indicate a greater contrast between the occluded and fully lit areas. This is only applied to the indirect lighting calculated by the GI system. This setting is enabled by default.
    Max Distance Set a value to control how far rays are cast in order to determine whether an object is occluded or not. A larger value produces longer rays and contributes more shadows to the lightmap, while a smaller value produces shorter rays that contribute shadows only when objects are very close to one another. A value of 0 casts an infinitely long ray that has no maximum distance. The default value is 1.
    Indirect Contribution Use the slider to scale the brightness of indirect light as seen in the final lightmap (that is, ambient light, or light bounced and emitted from objects) from a value between 0 and 10. The default value is 1. Values less than 1 reduce the intensity, while values greater than 1 increase it.
    Direct Contribution Use the slider to scale the brightness of direct light from a value between 0 and 10. The default value is 0. The higher this value is, the greater the contrast applied to the direct lighting.
Final Gather When Final Gather is enabled, the final light bounce in the GI calculation is calculated at the same resolution as the baked lightmap. This improves the visual quality of the lightmap, but at the cost of additional baking time in the editor.
    Ray Count Use this value to define the number of rays emitted for each final gather point. The default value is 256.
    Denoising Tick this checkbox to apply a denoising filter to the final gather output. This box is ticked by default.
Directional Mode You can set the lightmap up to store information about the dominant incoming light at each point on the objects’ surfaces.
See documentation on Directional Lightmapping for further details. The default mode is Directional.
    Directional In Directional mode, a second lightmap is generated to store the dominant direction of incoming light. This allows diffuse normal mapped materials to work with the GI. Directional mode requires about twice as much storage space for the additional lightmap data. Directional lightmaps cannot be decoded on SM2.0 hardware or when using GLES2.0. They will fallback to Non-Directional lightmaps.
    Non-directional Non-directional mode switches both these options off.
Indirect Intensity Use this slider to control the brightness of indirect light stored in realtime and baked lightmaps, from a value between 0 and 5. A value above 1 increases the intensity of indirect light while a value of less that 1 reduces indirect light intensity. The default value is 1.
Albedo Boost Use this slider to control the amount of light bounced between surfaces by intensifying the albedo of materials in the Scene, from a value between 1 and 10. Increasing this draws the albedo value towards white for indirect light computation. The default value of 1 is physically accurate.
Lightmap Parameters Unity uses a set of general parameters for the lightmapping in addition to properties of the Lighting window. A few defaults are available from the menu for this property but you can also create your own lightmap parameter file using the Create New option. See the Lightmap Parameters page for further details. The default value is Default-Medium.

Other Settings

Property: Function:
Other Settings Settings for fog, Halos, Flares and Cookies.
Fog Enables or disables fog in the Scene. Note that fog is not available with the Deferred rendering path. For deferred rendering, the Post-processing fog effect effect may suit your needs.
    Color Set the color Unity uses to draw fog in the Scene.
    Mode Define the way in which the fogging accumulates with distance from the camera.
        Linear Fog density increases linearly with distance.
            Start Set the distance from the Camera at which the fog starts.
            End Set the distance from the Camera at which the fog completely obscures Scene GameObjects.
        Exponential Fog density increases exponentially with distance.
            Density Use this to control the density of the fog. The Fog appears more dense as the Density increases.
        Exponential Squared Fog density increases even faster than exponentially with distance (exponentially and squared).
            Density Use this to control the density of the fog. The Fog appears more dense as the Density increases.
Halo Texture Set the Texture you want to use for drawing a Halo around lights.
Halo Strength Define the visibility of halos around lights, from a value between 0 and 1.
Flare Fade Speed Define the time (in seconds) over which lens flares fade from view after initially appearing. This is set to 3 by default.
Flare Strength Define the visibility of lens flares from lights, from a value between 0 and 1.
Spot Cookie Set the Cookie texture you want to use for spot lights.

Debug settings

Property: Function:
Debug Settings Settings that help you debug your Scene.
Update Statistics If ticked, the statistics window at the bottom of the Lighting settings window is updated as the Scene changes. This can have an impact on performance during Play mode. For better performance in Play mode, untick this box.
Light Probe Visualization Use this to filter which Light Probes are visualized in the Scene view. The default value is Only Probes Used By Selection.
    Only Probes Used By Selection Only Light Probes that affect the current selection are visualized in the Scene view.
    All Probes No Cells All Light Probes are visualized in the Scene view.
    All Probes With Cells All Light Probes are visualized in the Scene view, and the tetrahedrons that are used for interpolation of Light Probe data are also displayed.
    None No Light Probes are visualized in the Scene view.
Display Weights When ticked, Unity draws a line from the Light Probe used for the active selection to the positions on the tetrahedra used for interpolation. This is a way to debug probe interpolation and placement problems.
Display Occlusion When ticked, Unity displays occlusion data for Light Probes if the Mixed lighting mode is Distance Shadowmask or Shadowmask.

At the bottom of the Scene tab, the Statistics window lists information about Lights in the Scene. Lights are separated by type, Meshes, emissive Materials, Light Probes and Reflection Probes.

Note also that there is a dockable window called the Light Explorer, to help you work with large numbers of Lights.

Global maps tab

Use the Global maps tab to view the actual textures in use by the lighting system. These include intensity light maps, shadow masks and directionality maps. This is only available when Baked lighting or Mixed lighting is used; the preview is blank for Realtime lighting.

Object maps tab

Use the Object maps tab to see previews of baked textures for the currently selected* *GameObject only, including shadow masks.


Lighting overview
Light Explorer