Version: Unity 6.1 Alpha (6000.1)
Language : English
Introduction to lightmaps and baking
Preview baked lighting

Set up your scene and lights for baking

Select Window > Rendering > Lighting from the Unity Editor menu to open the Lighting window. Make sure any Mesh you want to apply a lightmap to has proper UVs for lightmapping. The easiest way to do this is to open the Mesh import settings and enable the Generate Lightmap UVs setting.

Next, to control the resolution of the lightmaps, go to the Lightmapping Settings section and adjust the Lightmap Resolution value.

To be included in your lightmap, Renderers must meet the following criteria:

  • Have a Mesh RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
    See in Glossary
    or TerrainThe landscape in your scene. A Terrain GameObject adds a large flat plane to your scene and you can use the Terrain’s Inspector window to create a detailed landscape. More info
    See in Glossary
    component
  • Be marked as Contribute GI
  • Use a built-in Unity Material or shaderA program that runs on the GPU. More info
    See in Glossary
    that supports lightmaps, or a shader in the Built-In Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
    See in Glossary
    with a Meta Pass.

You can adjust settings for Lights in the Light Explorer. To open the Light Explorer, go to Window > Rendering > Light Explorer.

Static versus Dynamic

No matter which Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results.
See in Glossary
system you use, Unity will only consider objects that are marked as “Contribute GI” during the baking/precomputing of the lighting. Dynamic (i.e. non-static) objects have to rely on the Light Probes you placed throughout the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
to receive indirect lighting.

Because the baking/precomputing of the lighting is a relatively slow process, only large and complex assets with distinct lighting variations, such as concavity and self-shadowing, should be tagged as “Contribute GI”. Smaller and convex meshes that receive homogeneous lighting should not be marked as such, and they should, therefore, receive indirect lighting from the Light ProbesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
which store a simpler approximation of the lighting. Larger dynamic objects can rely on LPPVs, in order to receive better localized indirect lighting. Limiting the number of objects tagged as “Contribute GI” in your scene is absolutely crucial to minimize baking times while maintaining an adequate lighting quality. You can learn more about this optimization process and the importance of Probe lighting in this tutorial.

Introduction to lightmaps and baking
Preview baked lighting