MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
365 stars 92 forks source link

[BUG] MRTK 3 Hand Interaction Example: Quest 3 passthrough not working #830

Open einstyle opened 1 month ago

einstyle commented 1 month ago

Describe the bug

I tried the Hand Interaction Example in MRTK3 with Meta Quest 3 and the passthrough doesn't work. I see the skybox in background. I tried to change the A value of the camera Background and it just switch from skybox to solid black.

Is there a specific setting to change?

Expected behavior

I want to see my environment and the virtual elements (holograms) in overlay.

Your setup (please complete the following information)

Target platform (please complete the following information)

BenediktTobias commented 1 month ago

For passthrough on Meta Quest 3 you need need the Unity OpenXR Meta package (Meta XR All-in-One SDK / Oculus Integration work too but can cause some limitations / incompabilities with certain MRTK features).

einstyle commented 1 month ago

Hi @BenediktTobias,

Thanks for the reply. I already installed that package and added the right settings in the Project settings, however it seems the Passthrough doesn't work. I just opened one Example from MRTK3 (HandInteractables), I created a build for Quest 3, and what I see are the virtual objects with either the skybox in background or a black background (depending if the camera background is set to A=max or A=0)

Any help?

MRKT_Quest3_1 MRKT_Quest3_2

BenediktTobias commented 1 month ago

Based on your second screenshot, it appears that the Unity OpenXR Meta package is not properly installed. Can you please double check in the Package Manager if **Meta OpenXR Feature* is listed there? Afterwards check the camera settings according to the project setup of Unity OpenXR Meta, primarily the clear flags (solid color, A=0), and enable the required OpenXR Feature Groups (AR Foundation: Meta Quest Features, Meta Quest Support).

* Based on your version (2022.2) the newest supported version (0.1.2) was still called Meta OpenXR Feature instead of Unity OpenXR Meta as it is in newer versions (1.0.0+)

** In newer versions of Unity OpenXR Meta this is split into separate features

shaynie commented 1 month ago

@whebertML has gotten this working before, he's going to test and give some guidance.

whebertML commented 1 month ago

@einstyle, here are the steps I've taken to get Passthrough to work with MRTK3.

As @BenediktTobias mentions, there may be issues with the meta all-in-one package, so for simplicity I'll use the Unity OpenXR Meta, com.unity.xr.meta-openxr, package - latest version 1.0.1. The minimum Unity version for that is 2022.3, as mentioned on the package Requirements.

For this example, I'm using Unity 2022.3.27f1.

Install the com.unity.xr.meta-openxr package, version 1.0.1:

image

OpenXR config:

image

MRTK Profile Settings:

image

Last but not least, in your scene, add a "AR Camera Manager" script to your main camera (see below). Also, MRTK3 uses a "Camera Settings Manager" to validate camera settings depending on the type of display, whether opaque display (like Quest 3), or transparent displays (HoloLens 2, Magic Leap 2, etc.). Camera Settings Manager will override the camera settings itself during start, so you must change the opaque display settings to Solid Color, and make sure color is 0 in all channels, including alpha (see below):

image

QuweQuwe commented 3 weeks ago

I had the same phenomenon and tried many things.

Unity 2022.3.38f1 Create a new project with Universal3D Add com.unity.xr.meta-openxr in Package Manager Add MRTK3 in Tool スクリーンショット 2024-08-01 170208

Changed OpenXR settings as follows スクリーンショット 2024-08-01 170225 スクリーンショット 2024-08-01 170236 スクリーンショット 2024-08-01 170256

In the original scene Removed Maincamera Added the following to the scene MRTK XR Rig Cube (for confirmation during pass-through) スクリーンショット 2024-08-01 170756

Add ARCameraManager to the MRTK XR Rig main camera Set Alpha of SolidColor in OpaqueDisplay of CameraSettingManger to 0 スクリーンショット 2024-08-01 170440

Now when I ran the patch, I did not get the pass-through display. Disabling CameraSettingManger resulted in pass-through display.

I'm trying to confirm if there is something wrong with the MRTK3 settings. I placed XR Origin (AR) and disabled MRTK XR Rig and it showed pass-through.