docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    AR Occlusion Manager component

    The occlusion manager exposes per-frame images representing depth or stencil images. Incorporating depth images into the rendering process achieves realistic blending of augmented and real-world content by ensuring physical objects occlude virtual content located behind them in shared AR space.

    Add the AROcclusionManager component to a Camera with the ARCameraBackground component to automatically enable the background rendering pass to incorporate any available depth information when rendering the depth buffer. To add the ARCameraBackground and AROcclusionManager to your camera, follow the steps outlined in Managers.

    AR Occlusion Manager component
    AR Occlusion Manager component

    Supported depth images

    The types of depth images supported are:

    Type of depth image Description
    Environment Depth Distance from the device to any part of the environment in the camera field of view.
    Human Depth Distance from the device to any part of a human recognized within the camera field of view.
    Human Stencil Value designating, for each pixel, whether that pixel contains a recognized human.

    AR Occlusion Manager properties

    The following table describes the properties of the AR Occlusion Manager component:

    Property Description
    Environment Depth Mode The mode for generating the environment depth texture. There are four options:
    • Disabled: No environment depth texture produced.
    • Fastest: Minimal rendering quality. Minimal frame computation.
    • Medium: Medium rendering quality. Medium frame computation.
    • Best: Best rendering quality. Increased frame computation.
    Temporal Smoothing Whether temporal smoothing should be applied to the environment depth image, if supported on the chosen platform. Temporal smoothing reduces noise to provide smoother images and more consistent occlusion.
    Human Segmentation Stencil Mode The mode for generating human segmentation stencil texture:
    • Disabled: No human stencil texture produced.
    • Fastest: Minimal rendering quality. Minimal frame computation.
    • Medium: Medium rendering quality. Medium frame computation.
    • Best: Best rendering quality. Increased frame computation.
    Human Segmentation Depth Mode The mode for generating human segmentation depth texture:
    • Disabled: No human stencil texture produced.
    • Fastest: Minimal rendering quality. Minimal frame computation.
    • Best: Best rendering quality. Increased frame computation.
    Occlusion Preference Mode If both environment texture and human stencil & depth textures are available, this mode specifies which should be used for occlusion. There are three options:
    • Prefer Environment Occlusion
    • Prefer Human Occlusion
    • No Occlusion
    Note

    Use Occlusion Preference Mode to choose the type of depth image to use on ARKit. Human stencil depth images are only supported on ARKit. Environment and depth images are never simultaneously enabled.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)