Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.03k stars 1.13k forks source link

ARKit confidenceMap #699

Closed trandzik closed 3 years ago

trandzik commented 3 years ago

Please is it possible to access confidenceMap (provided by ARKit) whithin arfoundation? I have been wondering whether it would be possible to build something similar to point cloud demo from this video - at 21:27. It seems like confidenceMap is used to determine distribution of point cloud. Thanks.

todds-unity commented 3 years ago

See AROcclusionManager.environmentDepthConfidenceTexture for the GPU texture. https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/api/UnityEngine.XR.ARFoundation.AROcclusionManager.html#UnityEngine_XR_ARFoundation_AROcclusionManager_environmentDepthConfidenceTexture

And AROcclusionManager.TryAcquireEnvironmentDepthConfidenceCpuImage to access the texture on the CPU. https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/api/UnityEngine.XR.ARFoundation.AROcclusionManager.html#UnityEngine_XR_ARFoundation_AROcclusionManager_TryAcquireEnvironmentDepthConfidenceCpuImage_UnityEngine_XR_ARSubsystems_XRCpuImage__

trandzik commented 3 years ago

I must have missed that in the docs, thank you very much.