Version: 2019.4
Lightmaps and LOD
Lightmaps: Technical information

Ambient occlusion

Ambient occlusionA method to approximate how much ambient light (light not coming from a specific direction) can hit a point on a surface.
See in Glossary
(AO) is a feature that simulates the soft shadows that occur in creases, holes, and surfaces that are close to each another. These areas occlude (block out) ambient lightLight that doesn’t come from any specific direction, and contributes equal light in all directions to the Scene. More info
See in Glossary
, so they appear darker.

It works by approximating how much ambient light can hit a point on a surface. It then darkens creases, holes and surfaces that are close to each other.

You can use ambient occlusion to add realism to your lighting.

Baked Ambient Occlusion

If Baked Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results. Unity has two global illumination systems that combine direct and indirect lighting.: Baked Global Illumination, and Realtime Global Illumination.
See in Glossary
is enabled in your 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
, Unity can bake ambient occlusion into the lightmapsA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
. This is known as Baked Ambient Occlusion.

To enable baked ambient occlusion in your Scene:

  1. Open the Lighting window (menu: Window > RenderingThe process of drawing graphics to the screen (or to a render texture). By default, the main camera in Unity renders its view to the screen. More info
    See in Glossary
    > Lighting Settings)
  2. Navigate to the Mixed Lighting section
  3. Enable Baked Global Illumination
  4. Navigate to the Lightmapping Settings section
  5. Enable Ambient Occlusion

Realtime ambient occlusion

If Baked Global Illumination is not enabled in your Scene but you still want the effect of ambient occlusion, you can use a post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary
effect to apply real-time ambient occlusion to your Scene.

If Realtime Global Illumination using EnlightenA lighting system by Geomerics used in Unity for lightmapping and for Realtime Global Illumination. More info
See in Glossary
is enabled in your Scene, the resolution for indirect lighting does not capture fine details or dynamic objects. We recommend using a real-time ambient occlusion post-processing effect, which has much more detail and results in higher quality lighting.

For information on real-time ambient occlusion post-processing effects, see the documentation on the post-processing effects.

Additional resources

To learn more about AO, see Wikipedia: Ambient Occlusion.

Lightmaps and LOD
Lightmaps: Technical information
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961