docs.unity3d.com
Search Results for

    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 the environment.

    This page is a supplement to the AR Foundation Occlusion manual. The following sections only contain information about APIs where ARCore exhibits unique platform-specific behavior.

    Tip

    When developing an AR app, refer to both the AR Foundation documentation as well as the required packages for each platform you support.

    Check if occlusion is supported

    • The XROcclusionSubsystemDescriptor properties supportsEnvironmentDepthImage and supportsEnvironmentDepthConfidenceImage require that you start an AR session before support can be determined. If there is no AR session, these properties return false. They might return true later when a session has been started.

    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. Refer to ARCore supported devices for a list of devices that support depth.

    In This Article
    Back to top
    Copyright © 2024 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)