NeoSpark314 / godot_oculus_quest_toolkit

An easy to use VR toolkit for Oculus Quest development using the Godot game engine
MIT License
367 stars 38 forks source link

Headset is blank when used with OpenVR #71

Open gururise opened 3 years ago

gururise commented 3 years ago

Installed Release 0.4.2 on Godot 3.3 (Mono Build) on Windows 10.

  1. Open (Edit) the Godot Oculus Quest Toolkit Demo
  2. Downloaded OpenVR plugin from the AssetLib
  3. Plug Oculus Quest 1 via Link Cable and connect via Oculus Link
  4. Run the Demo

What happens next is steamvr starts up and OpenVR plugin is detected. The headset tracking is working and I can see the tracking working properly on the display on my PC monitor; however, nothing shows up on the headset itself (ie. its black). I tried changing the engine target fps to 72 to match the Quest 1; however, it made no difference.

Note: I have verified the VR demo in the Godot Tutorial works just fine on the Oculus Link.

OUTPUT LOG:

--- Debugging process started --- Godot Engine v3.3.stable.mono.official - https://godotengine.org OpenGL ES 2.0 Renderer: AMD Radeon RX 6800 XT OpenGL ES Batching: ON

Initializing VR (Toolkit version 0.4.2) Available Interfaces are [{id:0, name:OpenVR}, {id:1, name:Native mobile}]: Found OpenVR Interface. Success initializing OpenVR Interface. _perform_switch_scene to res://demo_scenes/GodotSplash.tscn switching to scene 'res://demo_scenes/GodotSplash.tscn' ERROR: : get_tracking_space(): no ovrBaseAPI object. Tracking space is: -1 ERROR: : get_boundary_oriented_bounding_box(): no ovrBaseAPI object. get_boundary_oriented_bounding_box is: [1, 0, 0, 0, 1, 0, 0, 0, 1 - 0, 0, 0, (1.93, 2.5, 2.25)] Engine.target_fps = 72 Switching model for controller 'oculus_quest_controller_left_1' (id 1) WARNING: Unable to automatically determine controller model type. Switching model for controller 'oculus_quest_controller_right_2' (id 2) WARNING: Unable to automatically determine controller model type. _perform_switch_scene to res://demo_scenes/UIDemoScene.tscn switching to scene 'res://demo_scenes/UIDemoScene.tscn' Changed move speed to 1.000000 Changed smooth turn speed to 90 Changed click turn angle to 45 Switching model for controller 'oculus_quest_controller_left_1' (id 1) WARNING: Unable to automatically determine controller model type. Switching model for controller 'oculus_quest_controller_right_2' (id 2) WARNING: Unable to automatically determine controller model type. ERROR: : MixedRealityCapture currently requries a special build with the method 'VisualServer.viewport_get_color_texture_id'

NeoSpark314 commented 3 years ago

Thanks for reporting this issue. I think the problem is that in the render settings for desktop the framebuffer is set to 3d without effects; can you try to go to your 3d render settings and set the framebuffer allocation for desktop to 3d; I hope this fixes the problem. If it does I should change the defaults in the toolkit project settings.

gururise commented 3 years ago

Thanks for the reply. The framebuffer allocation for desktop was already set to 3D by default. I changed the mobile setting to 3D (just in case) but to no effect. The screen was still black.

image

I also tried changing the desktop setting to 3d w/o effect and the screen was still black.

NeoSpark314 commented 3 years ago

Thanks for trying. Do other godot VR projects work for you? I'm not sure what your exact setup is. I do not have a Desktop VR headset to test myself but I think for others OpenVR worked so maybe it is related to AMD graphics card? Some similar issue was discussed recently on the toolkit discord. Can you try to switch to GLES3 renderer?

gururise commented 3 years ago

Switching to GLES3 and everything worked!

GLES2 results in a black screen (in the headset). I noticed this is also the case on the official Godot VR tutorial as well. Something might have broke with OpenVR + GLES2 in Godot 3.3, as I previously used GLES2 with OpenVR in older versions of Godot.

I posted an issue to the Godot OpenVR repo.