Skip to content

Depth map, hit-test fix, Quest recording, image targets and room in captures - #478

Open
doranteseduardo wants to merge 5 commits into
developfrom
feat/plan-dic-2026
Open

doranteseduardo wants to merge 5 commits into
developfrom
feat/plan-dic-2026

Conversation

@doranteseduardo

@doranteseduardo doranteseduardo commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

A hit-test crash fix, CPU access to the depth map, and three Quest features built on the passthrough camera (session recording, image targets, and the real room under video captures).

Changes

Hit test

  • VRONode::hitTestGeometry and VROGeometryUtilSplitNodeByGeometryElements no longer crash on a geometry without a vertex source; such a geometry is simply not hit.

Depth map access

  • VROARFrame::getDepthMap(VROARDepthMap *): a CPU copy of the whole depth map in metres, its confidence in [0, 1], intrinsics scaled to the depth image, and the camera pose of the frame it belongs to.
  • iOS: LiDAR (row stride respected, ARKit's 0/1/2 confidence mapped to 0/0.5/1) or the monocular estimator's buffers with the pose they were inferred from.
  • ARCore: 16-bit millimetres with the row stride, the confidence image with its own size and stride.
  • JNI nativeGetDepthMap packs everything into one float array; ARScene.getDepthMap() returns ARScene.DepthMap.

Quest: session recording from the passthrough camera

  • VROSceneRendererOpenXR enables XR_KHR_convert_timespec_time and can locate the head at a camera frame's CLOCK_MONOTONIC time.
  • PassthroughCameraFeed (new) owns the left passthrough camera (Camera2, Horizon OS v74+) and shares it between listeners.
  • PassthroughRecordingSource feeds ARSessionRecorder: each frame posed with head × lens pose, intrinsics from the camera's calibration. Same video.mp4 + session.jsonl as phones; the header also carries the raw lens pose.
  • ARScene.startRecording takes this path on an OpenXR session; isRecordingSupported / getRecordingStatus answer for it.

Quest: image targets

  • VROImageTrackerORB (new, no dependencies): FAST on a pyramid, ORB descriptors, ratio-test matching, RANSAC homography, pose from the homography and the target's physical width. Host test in ViroRenderer/test/imagetracker.
  • VROARSessionOpenXR implements addARImageTarget / removeARImageTarget, searches passthrough frames a few times a second and publishes VROARImageAnchors through the delegate (ARCore's augmented-image axis convention), so image markers work unchanged.
  • ARScene starts the search when a headset scene gets image targets; ViroViewOpenXR hands the scene its context.

Quest: the room under video captures

  • The renderer caches the left eye's field of view and the IPD and computes the homography from the recorded eye to the camera image through a plane 2 m ahead (only while passthrough is on).
  • VROAVRecorderAndroid draws the latest camera frame beneath the scene in the record pass (YUV → RGB in a small GLES3 shader); the scene blends over it where it is transparent. The driver's GL state cache is invalidated after the raw draw.
  • ViroMediaRecorder listens to the camera feed while a headset recording runs.

Notes

  • The camera pose on the headset is composed as head × LENS_POSE_ROTATION × 180° about X (optical → GL axes). This is the Camera2 convention as documented; the recording header keeps the raw lens pose so it can be recomposed if the headset reports it differently.
  • Without the camera permissions (CAMERA, horizonos.permission.HEADSET_CAMERA) each Quest feature reports it and does nothing; video captures stay scene-only.
  • Image targets from an image database are not tracked on a headset (the tracker needs the target's bitmap).

Testing

  • Android :viroreact:assembleRelease and iOS ViroKit (device + simulator) build.
  • Image tracker host test: four synthetic poses recovered within 1.7 mm / 2.6°, no false detection on an unrelated frame.
  • New JNI symbols checked in the built libviro_renderer.so.

@doranteseduardo doranteseduardo changed the title December plan: depth map, hit-test fix, Quest recording, image targets and room in captures Depth map, hit-test fix, Quest recording, image targets and room in captures Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants