docs.unity3d.com
    Show / Hide Table of Contents

    Occlusion

    ARCore provides support for occlusion based on environment depth images it generates every frame. These depth images provide a distance (in meters) from the device to any part of the environment in the camera field of view.

    Supported textures

    The ARCore implementation of AR Foundation Occlusion supports AROcclusionManager.environmentDepthTexture but does not support the other Textures related to human segmentation.

    Environment depth

    The XROcclusionSubsystem provides access to two types of environment depth: raw and smoothed.

    • Raw: The raw, unsmoothed depth data. This is useful for custom processing where raw data is necessary and corresponds to ARCore's ArFrame_acquireRawDepthImage16Bits function.
    • Smoothed: Depth data with smoothing applied. This is useful when performing occlusion and corresponds to ARCore's ArFrame_acquireDepthImage16Bits function.
    Note

    Both raw and smoothed are always available if depth is supported, regardless of the value of environmentDepthTemporalSmoothingEnabled.

    Requirements

    Environment depth requires a device with depth support. See ARCore supported devices for a list of devices that support depth ("Supports Depth API" in the Comments column).

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023