How to copy Depth API image to a PNG?
I want to use the Depth API to copy the depth image to a PNG file on Quest 3. https://developer.oculus.com/documentation/unity/unity-depthapi/#depth-api I'm modifying the Depth API sample: https://github.com/oculus-samples/Unity-DepthAPI I'm getting the RenderTexture from Util.GetEnvironmentDepthTextureId() and XRDisplaySubsystem.GetRenderTexture.RenderTexture. However, when I save the RenderTexture to a PNG image, the image is entirely gray. Each pixel color is CDCDCDCD. The image is 2000x2000. My problem is very similar to this reddit thread: https://www.reddit.com/r/oculusdev/comments/17lwzvz/q3_depth_api_accessing_depth_sensor_data_directly/ I looked at the OpenXR Depth API Overview page and I noticed that it says: "Depth maps should only be accessed between the xrBeginFrame and xrEndFrame calls" https://developer.oculus.com/documentation/native/android/mobile-depth/#acquiring-depth-maps The Unity Depth API page says: "RenderTexture can then be used in rendering or in compute shaders." Is this why Texture2D.ReadPixels() doesn't work? Because the RenderTexture is only usable between xrBeginFrame and xrEndFrame? How do I copy the RenderTexture to a texture that I can read and then save to a PNG file? I'm not familiar with Unity's rendering or compute shaders.1.5KViews0likes2CommentsHow to get Real-time Depth data by Quest 3?
I'm wondering if the current Quest 3 offers any APIs that allow real-time retrieval of depth data. I'm interested in whether it can capture 3D data of scanned objects after a full rotation, or any other applications. Uncertain about its accuracy or whether it aligns with what I envision, but I'm eager to experiment and explore its capabilities. I haven't found relevant information in the Unity-DepthAPI.2.8KViews2likes2Comments