Code Monkey home page Code Monkey logo

godot_openxr's People

Contributors

aaronfranke avatar bastiaanolij avatar christophhaag avatar douglas-3glasses avatar m4gr3d avatar paul-marechal avatar ph5 avatar theonlyjoey avatar tom95 avatar zoomulator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot_openxr's Issues

Missing instructions in Getting Started

Hi, I followed the getting started instructions to the point where it says

Now you can press the run button to start your project and you should be able to look around.

But the scene started in normal mode. I added a script to the root of the scene to call $FPSController.initialise() in _ready and that fixed it. Would probably be very helpful to others if it was added to the guide.

Move the arms with the Valve knuckles

Greetings,

This is more a "I have no real clue of what I'm doing, so I'm asking for pointers", rather than a real bug report.

So, I'm just starting to fiddle with OpenXR (and Godot) on Linux, and starting to piece out all the required libraries and tools together...

I'm currently using Arch Linux, and I'm using AUR git packages for many of the required libraries.
I've installed openxr, monado and libsurvive and everything seems to more or less working. xrgears do not show any arm, but I don't know if it can.

So, I compiled and tried this example but I can't seem to move any arm using the Valve Index Knuckles controllers. I can see the scene and move the head inside the Valve headset, look at the wonderful table, but that's it.
No arms and no lighthouse detection.

I added a few "fprintf" to OpenXRApi::suggestActions and the logs seem to suggest that the OpenXR is actually trying to use the controllers. But it's either not receiving the inputs from the actual hardware, or something is going wrong with the Godot setup. I'm pretty sure it's the former, though.

OpenXR: initialising OpenXR context
OpenXR Runtime only supports OpenGL version 4.5 - 4.6!
Graphics: Display 0x6594050, Context 50af480, Drawable a600005
Using OpenGL version: 4.6 (Core Profile) Mesa 20.1.7
Using OpenGL Renderer: Radeon RX Vega (VEGA10, DRM 3.38.0, 5.8.8-zen1-1-zen, LLVM 10.0.1)
Swapchain Formats
8C43
Using SRGB swapchain!
8059
881A
8058
81A5
8CAC
8CAD
Yay ! We got /interaction_profiles/khr/simple_controller !
Suggesting actions for /interaction_profiles/khr/simple_controller, 4 bindings
Binding 0, Action 0 => 0
Binding 1, Action 0 => 1
Binding 2, Action 1 => 0
Binding 3, Action 1 => 1
Simple bindings OK ?
YES !
Yay ! We got /interaction_profiles/valve/index_controller !
Suggesting actions for /interaction_profiles/valve/index_controller, 8 bindings
Binding 0, Action 0 => 0
Binding 1, Action 0 => 1
Binding 2, Action 1 => 0
Binding 3, Action 1 => 1
Binding 4, Action 2 => 0
Binding 5, Action 2 => 1
Binding 6, Action 3 => 0
Binding 7, Action 3 => 1
Simple bindings OK ?
YES !
Yay ! We got /interaction_profiles/mndx/ball_on_a_stick_controller !
Suggesting actions for /interaction_profiles/mndx/ball_on_a_stick_controller, 8 bindings
Binding 0, Action 0 => 0
Binding 1, Action 0 => 1
Binding 2, Action 1 => 0
Binding 3, Action 1 => 1
Binding 4, Action 2 => 0
Binding 5, Action 2 => 1
Binding 6, Action 3 => 0
Binding 7, Action 3 => 1
Simple bindings OK ?
YES !
initialized controllers 1 2
OpenXR init succeeded
AR VR Interface initialized
Started ARVR
EVENT: session state changed to 1
EVENT: session state changed to 2
EVENT: interaction profile changed!
Event: Interaction profile changed for /user/hand/left: /interaction_profiles/valve/index_controller
Event: Interaction profile changed for /user/hand/right: /interaction_profiles/valve/index_controller
EVENT: interaction profile changed!
Event: Interaction profile changed for /user/hand/left: /interaction_profiles/valve/index_controller
Event: Interaction profile changed for /user/hand/right: /interaction_profiles/valve/index_controller

Now, I'm a bit a lost when it comes to debug the whole situation.

I installed libsurvive and survive-buttons is able to detect the knuckles input but, after that, I don't know which software I could use to assert that everything is setup correctly, software wise.
xrgears show up the gears inside the VR Headset, but again no knuckles detection it seems, so I guess that something is going wrong between OpenXR and libsurvive.

Just for information, I'm able to use SteamVR and play VR titles on Steam like SteamVR Environments or VRChat (through Proton) just fine.
However, I didn't execute SteamVR, nor vrmonitor while playing with this demo, as they seem to badly interfere with monado-service.

Anyway, there's two questions here :

  1. Is this example supposed to show moving arms when using the Valve Index controllers ? I guess so, since the scene has 2 "ARVRController" with meshes attached... I tried various functions to check if Godot knows what device is behind which ARVRController, but even things like
	var controller = $ARVROrigin/ARVRController
	print(controller.get_controller_name())

just show lefthand (for the first controller)...
2. Do you have a checklist to determined if the software setup is alright ? Or some ideas of softwares I could test before ?

Further improvements to plugin lifecycle

After discussing this with @m4gr3d the other day I think this is worth further discussion in a wider group.

When we fixed the crashing issues for the Oculus runtime and later on made the Quest runtime work we moved a few things around because the Oculus runtimes seem more finicky when it comes to where we do what. Most of this was trial and error and not necessarily moving stuff for the right reasons.

One thing for instance that is important here is that we found out very late in the process that it is especially the spaces created for the action sets that Oculus requires us to create after the session is ready and not earlier. This may have resulted in some logic being moved to this state that could, and would be better if, executed earlier.

That said, current discussions on the OpenXR slack also indicate that there are gaps in the specification here.

For instance a good example and indeed the topic of discussion between me and Fredia, was the creation of the swap chains. According to the documentation this should happen right after the session is created, but we've postponed it until the session is ready. Now that we've changed the way we handle spaces it can probably be moved back. The current approach means that if a session goes idle (player removes their headset) a lot of stuff is re-created which could just be re-used.
However, one of the gaps identified is that the XR runtime can request changing the swap chains. There currently is no mechanism for this but a mechanism will likely be introduced in an upcoming spec change. SteamVR requires this for instance when adaptive performance tuning is turned on (where the runtime varies oversampling depending on load).

Worth more investigation and testing. Much of the code has been moved into methods where we can move when the methods are called and see what works on different runtimes.

Windows Support

For the most part this requires adding a code path for Windows around the OpenGL handling.

Spec: https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_opengl_enable

In OXRCalls.c we need something like

#ifdef _WIN32
#define XR_USE_PLATFORM_WIN32
#else
#define XR_USE_PLATFORM_XLIB
#endif

and a similar ifdef around the code using the XrGraphicsBindingOpenGLXlibKHR struct is required, using the XrGraphicsBindingOpenGLWin32KHR instead.

This requires getting these values

hDC is a valid Windows HW device context handle.
hGLRC is a valid Windows OpenGL rendering context handle.

On Linux the code uses the "current" X display, glx gontext and glx drawable (window)

XOpenDisplay(NULL);
glXGetCurrentContext();
glXGetCurrentDrawable();

but ideally we get the gl context and window handles that godot uses from godot itself.

Failed to enumerate view configuration views! [XR_ERROR_VALIDATION_FAILURE]

Original issue: #13

Using the same setup as posted in the above issue, changing the registry key to specify the Oculus OpenXR runtime results in the following log output/error:

OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

Editing project: F:/Godot/Projects/3_2_branch_openxr_test_01 (F:::Godot::Projects::3_2_branch_openxr_test_01)
Godot Engine v3.2.4.beta.custom_build.61c8efecf - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

Running: F:\Godot\Branches\3.2\godot\bin\godot.windows.tools.64.exe --path F:/Godot/Projects/3_2_branch_openxr_test_01 --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 20076 --position 448,240 res://ARVROrigin.tscn
Godot Engine v3.2.4.beta.custom_build.61c8efecf - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

OpenXR: initialising OpenXR context
Failed to enumerate view configuration views! [XR_ERROR_VALIDATION_FAILURE]
OpenXR init failed

Original (default) registry key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1
ActiveRuntime: D:\Steam\steamapps\common\SteamVR\steamxr_win64.json

Modified key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenXR\1
ActiveRuntime: D:\Oculus\Support\oculus-runtime\oculus_openxr_64.json

Windows 10 x64 20H2 19042.572
Radeon Driver: 20.10.1
Godot Verison: Godot Engine v3.2.4.beta.custom_build.61c8efecf
OpenXR Plugin: (last commit 7e5c2a9)
Using the provided OpenXR Loader .dll in repo (do I need to compile a new one for x64?)
Oculus Quest 1 using Oculus Link
Oculus App Version: 21.0.0.473.199
Quest Firmware: 904120.19760.0
SteamVR: 1.14.16

Please let me know if there is any additional information or steps you would like me to perform or provide that could be helpful/useful!

Relavent links:
https://forums.oculusvr.com/developer/discussion/comment/761189/#Comment_761189
https://steamcommunity.com/app/250820/discussions/8/2647504242046572684/
https://steamcommunity.com/app/250820/discussions/8/2647504242044701031/

Limited set of Actions and Bindings are hardcoded

This relates to GodotVR/godot_openvr#71 and GodotVR/godot_openvr#80

Currently godot_openxr hardcodes "trigger", "grab", "menu" and "handpose" actions. For godot 3.x we probably want to leave those actions hardcoded and create a unified UI for creating and binding actions with godot 4.x.

The plugin code also hardcodes bindings for the interaction profiles "/interaction_profiles/khr/simple_controller", "/interaction_profiles/valve/index_controller" and "/interaction_profiles/mnd/ball_on_stick_controller" which has essentially the inputs of a Playstation Move controller.

  1. We should have bindings for at least Oculus Touch, WMR and HTC Vive Controller. Interaction Profiles with available inputs for each controller are documented in the spec https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-interaction-profiles
  2. It would be nice to be able to add and change bindings without having to recompile the plugin. Perhaps put them in a text file like with OpenVR?

Unlike with OpenVR, there (currently) is no file format for actions and bindings that can be given to a runtime. For 2. we would have to define our own file format and have our own parser. We could also choose to write a parser for OpenVR manifests and reuse those, but they do not map perfectly to OpenXR.

For those unfamiliar with the OpenXR action system:

Like with OpenVR, an application creates "actions" which is an arbitrary name with a type, for example you might create a jump boolean action and then later querying the state of this action results in a true or false value.

Then the application can suggest bindings for those actions which are supposed to be sane defaults for a set of known controllers, for example you might say "If a Valve Index Controller is used, the a button should be bound to the jump action. If a HTC Vive Controller is used, the touchpad click should be bound to the jump action" and so on.

If the user has for example an Oculus Touch controller and the application didn't suggest actions for this controller, then it is not exactly specified what a runtime has to do. Maybe the runtime engages a compatibility mode where it knows how to map for example Index Controller bindings to an Oculus Touch Controller. Maybe the runtime pops up a binding dialog with all the actions that the application suggested and requires the user to map the inputs of the current controller to those actions. Etc.

Either way runtimes are free to allow remapping all of the suggested bindings as they like with UIs like the one found in SteamVR. For example a user might not like that the application developer suggested binding the jump action to the a button of their Valve Index Controller, and uses the runtime's binding UI to map the jump action to the b button instead, without the application knowing that the source of the jump action is not what they suggested (if the application really wants, it can find out with xrEnumerateBoundSourcesForAction()).

VSCode setup

For anyone who finds this useful, this is my vscode setup for building this plugin with vscode. Create a folder called .vscode and create the files and copy/paste the contents from this entry.

tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build godot-cpp debug",
            "type": "shell",
            "command": "scons",
            "group": "build",
            "options": {
                "cwd": "${workspaceFolder}/thirdparty/godot-cpp"
            },
            "args": [
                "target=debug",
                "-j8"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "build desktop plugin debug",
            "type": "shell",
            "command": "scons",
            "group": "build",
            "args": [
                "target=debug",
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "build android plugin",
            // this assumes we've already generate our godot-cpp code (which "build godot-cpp debug" does for us)
            "type": "shell",
            "windows": {
                "command": "./gradlew.bat"
            },
            "linux": {
                "command": "./gradlew"
            },
            "group": "build",
            "args": [
                "generateSharedLibs"
            ]
            "problemMatcher": "$msCompile"
        }
    ]
}

launch.json
For the launch.json file, this is setup for Windows so you will need to alter the paths if you're on Linux. You'll always need to adjust the path to your Godot executable. This allows you to debug the plugin (on desktop).

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Editor Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "D:/Development/godot3-git/bin/godot.windows.opt.tools.64.exe",
            "args": [
                "-e",
                "--path",
                "demo"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "integratedTerminal",
            "preLaunchTask": "build desktop plugin debug"
        },
        {
            "name": "Runtime Launch (Default)",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "D:/Development/godot3-git/bin/godot.windows.opt.tools.64.exe",
            "args": [
                "--path",
                "demo"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "integratedTerminal",
            "preLaunchTask": "build desktop plugin debug"
        },
        {
            "name": "Runtime Launch (SteamVR)",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "D:/Development/godot3-git/bin/godot.windows.opt.tools.64.exe",
            "args": [
                "--path",
                "demo"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [
                { "name": "XR_RUNTIME_JSON", "value": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR\\steamxr_win64.json" }
            ],
            "console": "integratedTerminal",
            "preLaunchTask": "build desktop plugin debug"
        },
        {
            "name": "Runtime Launch (Oculus)",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "D:/Development/godot3-git/bin/godot.windows.opt.tools.64.exe",
            "args": [
                "--path",
                "demo"
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [
                { "name": "XR_RUNTIME_JSON", "value": "C:\\Program Files\\Oculus\\Support\\oculus-runtime\\oculus_openxr_64.json" }
            ],
            "console": "integratedTerminal",
            "preLaunchTask": "build desktop plugin debug"
        }
    ]
}

Oculus OpenXR: unable to recover if headset is taken off or moved from face during play session

Using the Oculus OpenXR runtime If the headset is removed or moved away from the face/head enough that the sensor turns the screen off Godot throws these errors and will not recover until play is restarted:

ERROR: OpenXRApi::process_openxr: Abort Mission!
   At: src\OpenXRApi.cpp:1508
ERROR: OpenXRApi::xr_result: OpenXR failed to wait for swapchain image! [XR_ERROR_CALL_ORDER_INVALID]

It will continue to spam the XR_ERROR_CALL_ORDER_INVALID line regardless of placing the headset back on, and the HMD screen will rapidly flash blank gray until the play session is ended or restarted. This is not a huge deal as the initial play session works fine but if your trying to lift the headset up/off to check something on the screen it makes things a little more difficult.

Info:
Windows 10 x64 20H2 19042.746
Radeon Driver: 21.1.1
Godot Version: Godot_v3.2.4-beta6_win64
OpenXR Loader: 1.0.12
Oculus Quest 1 using Oculus Link
Quest Firmware: 1201830.9360.0
Oculus App Version 23.0.0.43.517 (23.0.0.43.517)

No display output on Quest headsets with SteamVR runtime

There's no output on the Quest 2 headset when using a wired link but the desktop window does clearly show the player moving along side their hands moving.

I've also tested this with a WMR headset with it displaying correctly.

image
image

Fine-grained Rumble Control?

Hi! In

// Full haptic control will be offered through another object
you noted that there will be a dedicated interface for better controlling haptic output. I was wondering whether there is already some design ideas on how this will be achieved. Will it become part of the core Godot ARVR interface, be added to one of the existing GDNative classes, or as a new class?

If this has already been discussed, please go ahead and close the issue. I didn't find any mention in this repo :)

Unable to build for mingw-w64 on linux (debian bullseye)

ie I'm trying to avoid making a windows build environment 😨

Exporting the openvr demo via mingw-w64 via linux godot worked well (thanks!).

When trying to build openxr the godot-cpp scons build works.

But the openxr scons build fails

$ scons platform=windows
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o glad/glad.os -c -DWIN32 -D_WIN32 -D_WINDOWS -W3 -GR -D_CRT_SECURE_NO_WARNINGS -std:c++latest -O2 -EHsc -DNDEBUG /MD -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include glad/glad.c
gcc: error: /MD: No such file or directory
gcc: error: unrecognized command-line option ‘-W3’; did you mean ‘-W’?
gcc: error: unrecognized command-line option ‘-GR’; did you mean ‘-R’?
gcc: error: unrecognized command-line option ‘-std:c++latest’
gcc: error: unrecognized command-line option ‘-EHsc’
scons: *** [glad/glad.os] Error 1
scons: building terminated because of errors.

or

$ scons platform=windows use_llvm=yes
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang -o glad/glad.os -c -fPIC -O3 -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include glad/glad.c
clang++ -o src/ARVRInterface.os -c -fPIC -O3 -std=c++17 -fPIC -O3 -fPIC -Iglad -I. -Isrc -Igodot-cpp/godot-headers -Igodot-cpp/include -Igodot-cpp/include/core -Igodot-cpp/include/gen -Iopenxr_loader/1.0.18/include src/ARVRInterface.cpp
In file included from src/ARVRInterface.cpp:4:
In file included from src/ARVRInterface.h:7:
src/openxr/OpenXRApi.h:43:10: fatal error: 'GL/gl.h' file not found
#include <GL/gl.h>
         ^~~~~~~~~
1 error generated.
scons: *** [src/ARVRInterface.os] Error 1
scons: building terminated because of errors.

gl.h is available at /usr/x86_64-w64-mingw32/include/GL/gl.h

Is there a performance advantage to openxr? I'm likely to be an early adopter of godot 4.0 alpha and/or may move the build target to linux at some point (worse videocard atm). Advice?

Openvr was a bit a janky even with a very high end system but I haven't made any efforts to investigate yet.

[Oculus Link stuck] Installing to device (please wait...): Oculus Quest 2

Following the wiki steps, I wrote a Demo.
After one-click deployment to Oculus Quest2 through the editor, the Oculus Link was stuck and did not deploy successfully.
(Three loading dots on the Oculus screen)
Oddly enough, my Demo for Godot_Oculus_mobile was successfully deployed on the device.

Godot Engine v3.3.3.stable.mono.official.b973f997f - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2
OpenGL ES Batching: ON

Mono: Log file is: 'C:\Users\Administrator\AppData\Roaming/Godot/mono/mono_logs/2021-10-10_23.32.38_8524.log'
Project is missing: C:/Users/Administrator/workspace/godot/demoXR/project.godot
Editing project: C:/Users/Administrator/workspace/godot/godot_xr (C:::Users::Administrator::workspace::godot::godot_xr)
Godot Engine v3.3.3.stable.mono.official.b973f997f - https://godotengine.org
OpenGL ES 2.0 Renderer: GeForce GTX 970/PCIe/SSE2
OpenGL ES Batching: ON

Mono: Log file is: 'C:\Users\Administrator\AppData\Roaming/Godot/mono/mono_logs/2021-10-10_23.32.43_360.log'
* daemon not running; starting now at tcp:5037
* daemon started successfully
0 param: --xr_mode_ovr
1 param: --use_depth_32
2 param: --use_immersive
ADDING: classes.dex
ADDING: lib/arm64-v8a/libc++_shared.so
ADDING: kotlin/annotation/annotation.kotlin_builtins
ADDING: kotlin/collections/collections.kotlin_builtins
ADDING: kotlin/coroutines/coroutines.kotlin_builtins
ADDING: kotlin/internal/internal.kotlin_builtins
ADDING: kotlin/kotlin.kotlin_builtins
ADDING: kotlin/ranges/ranges.kotlin_builtins
ADDING: kotlin/reflect/reflect.kotlin_builtins
Adding feature android.hardware.vr.headtracking
ADDING: AndroidManifest.xml
ADDING: res/drawable-hdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-hdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable-mdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-mdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable-nodpi-v4/splash.png
ADDING: res/drawable-nodpi-v4/splash_bg_color.png
ADDING: res/drawable-v21/notification_action_background.xml
ADDING: res/drawable-xhdpi-v4/notification_bg_low_normal.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_normal.9.png
ADDING: res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png
ADDING: res/drawable-xhdpi-v4/notify_panel_notification_icon_bg.png
ADDING: res/drawable/notification_bg.xml
ADDING: res/drawable/notification_bg_low.xml
ADDING: res/drawable/notification_icon_background.xml
ADDING: res/drawable/notification_tile_bg.xml
ADDING: res/drawable/splash_drawable.xml
ADDING: res/layout-v16/notification_template_custom_big.xml
ADDING: res/layout-v21/notification_action.xml
ADDING: res/layout-v21/notification_action_tombstone.xml
ADDING: res/layout-v21/notification_template_custom_big.xml
ADDING: res/layout-v21/notification_template_icon_group.xml
ADDING: res/layout/downloading_expansion.xml
ADDING: res/layout/godot_app_layout.xml
ADDING: res/layout/notification_action.xml
ADDING: res/layout/notification_action_tombstone.xml
ADDING: res/layout/notification_media_action.xml
ADDING: res/layout/notification_media_cancel_action.xml
ADDING: res/layout/notification_template_big_media.xml
ADDING: res/layout/notification_template_big_media_custom.xml
ADDING: res/layout/notification_template_big_media_narrow.xml
ADDING: res/layout/notification_template_big_media_narrow_custom.xml
ADDING: res/layout/notification_template_icon_group.xml
ADDING: res/layout/notification_template_lines_media.xml
ADDING: res/layout/notification_template_media.xml
ADDING: res/layout/notification_template_media_custom.xml
ADDING: res/layout/notification_template_part_chronometer.xml
ADDING: res/layout/notification_template_part_time.xml
ADDING: res/layout/status_bar_ongoing_event_progress_bar.xml
ADDING: res/mipmap-anydpi-v26/icon.xml
ADDING: res/mipmap-hdpi-v4/icon.png
ADDING: res/mipmap-hdpi-v4/icon_background.png
ADDING: res/mipmap-hdpi-v4/icon_foreground.png
ADDING: res/mipmap-mdpi-v4/icon.png
ADDING: res/mipmap-mdpi-v4/icon_background.png
ADDING: res/mipmap-mdpi-v4/icon_foreground.png
ADDING: res/mipmap-xhdpi-v4/icon.png
ADDING: res/mipmap-xhdpi-v4/icon_background.png
ADDING: res/mipmap-xhdpi-v4/icon_foreground.png
ADDING: res/mipmap-xxhdpi-v4/icon.png
ADDING: res/mipmap-xxhdpi-v4/icon_background.png
ADDING: res/mipmap-xxhdpi-v4/icon_foreground.png
ADDING: res/mipmap-xxxhdpi-v4/icon.png
ADDING: res/mipmap-xxxhdpi-v4/icon_background.png
ADDING: res/mipmap-xxxhdpi-v4/icon_foreground.png
ADDING: res/mipmap/icon.png
ADDING: res/mipmap/icon_background.png
ADDING: res/mipmap/icon_foreground.png
ADDING: resources.arsc
ADDING: lib/arm64-v8a/libMonoPosixHelper.so
ADDING: lib/arm64-v8a/libMonoSupportW.so
ADDING: lib/arm64-v8a/libgodot_android.so
ADDING: lib/arm64-v8a/libmono-btls-shared.so
ADDING: lib/arm64-v8a/libmono-ee-interp.so
ADDING: lib/arm64-v8a/libmono-native.so
ADDING: lib/arm64-v8a/libmono-profiler-aot.so
ADDING: lib/arm64-v8a/libmono-profiler-coverage.so
ADDING: lib/arm64-v8a/libmono-profiler-log.so
ADDING: lib/arm64-v8a/libmonosgen-2.0.so
Installing to device (please wait...): Oculus Quest 2

Colors are too bright inside of the HMD

Looks like the same issue we were having with OpenVR. Godot will do color balancing and converts the final output to sRGB color space. I'm guessing OpenXR is expecting the image to be in linear color space.

Can be worked around by turning "keep linear" on in the viewport but this will make the image to dark on screen. That can be worked around with a shader, this is the approach we took in OpenVR.

Alternative we can see if OpenXR allows us to tell it we're giving it an image in sRGB color space.

Rumble not stable on linux with streamvr

Hey,
When I run rumble on Linux it stays for a second or so and then stopps.
In windows rumble works fine.

Attaching example project for reproduction (uploaded to a server of mine because github wont allow to upload):
https://gnethomelinux.com/files/rumble_test.tar.gz

Using godot 4.3 and a machine that dual boots between linux and windows to test.
Hardware is Original HTC Vive.

Linux OS is Ubuntu 21.10
Windows is 10

Steps to reproduce:

  1. Download and extract example project provided
  2. Open Godot and run the project

Expected (when run on Windows):

  • You will see the print "left rumble" and "right rumble" in the debug window until the controllers are detected
  • Controllers once detected rumble constantly

Actual (when run on Linux):

  • You will see the print "left rumble" and "right rumble" in the debug window until the controllers are detected
  • Controllers vibrate once and stop

Output on linux:

Godot Engine v3.4.stable.official.206ba70f4 - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2
OpenGL ES Batching: ON
 
Starting vr
Running on OpenXR runtime: SteamVR/OpenXR 0.1.0
Running on Linux, using SteamVR workaround for issue https://github.com/ValveSoftware/SteamVR-for-Linux/issues/421
OpenXR Runtime only supports OpenGL version 4.3 - 4.6!
OpenXR Graphics: Display %p, Context %lx, Drawable %lx
OpenXR Using OpenGL version: 3.3.0 NVIDIA 470.82.00
OpenXR Using OpenGL renderer: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2
Yes VR
rumble left
rumble right
OpenXR EVENT: session state changed to XR_SESSION_STATE_IDLE
On state idle
OpenXR EVENT: session state changed to XR_SESSION_STATE_READY
On state ready
OpenXR Swapchain Formats
OpenXR Couldn't find prefered swapchain format, using 32859
Attached action set godot
OpenXR found internal action aim_pose
OpenXR found internal action grip_pose
OpenXR found internal action front_trigger
OpenXR found internal action side_trigger
OpenXR found internal action primary
OpenXR found internal action secondary
OpenXR found internal action ax_button
OpenXR found internal action by_button
OpenXR found internal action ax_touch
OpenXR found internal action by_touch
OpenXR found internal action menu_button
OpenXR found internal action select_button
OpenXR found internal action front_button
OpenXR found internal action front_touch
OpenXR found internal action side_button
OpenXR found internal action primary_button
OpenXR found internal action secondary_button
OpenXR found internal action primary_touch
OpenXR found internal action secondary_touch
OpenXR found internal action haptic
Hand tracking is supported

rumble left
rumble right
[...]
 [output overflow, print less text!]

rumble right
OpenXR EVENT: session state changed to XR_SESSION_STATE_VISIBLE
On state visible
OpenXR EVENT: session state changed to XR_SESSION_STATE_FOCUSED
On state focused
OpenXR mapped /user/hand/left to 1
OpenXR regained tracking for hand 0
OpenXR mapped /user/hand/right to 2
OpenXR regained tracking for hand 1
rumble left
rumble right
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR Event: Interaction profile changed for /user/hand/left: /interaction_profiles/htc/vive_controller
OpenXR Event: Interaction profile changed for /user/hand/right: /interaction_profiles/htc/vive_controller
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: session state changed to XR_SESSION_STATE_VISIBLE
On state visible
OpenXR EVENT: session state changed to XR_SESSION_STATE_SYNCHRONIZED
On state synchronize

output on windows:

--- Debugging process started ---
Godot Engine v3.4.stable.official.206ba70f4 - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2
OpenGL ES Batching: ON
 
Starting vr
Running on OpenXR runtime: SteamVR/OpenXR 0.1.0
OpenXR Runtime only supports OpenGL version 4.3 - 4.6!
OpenXR Using OpenGL version: 3.3.0 NVIDIA 472.12
OpenXR Using OpenGL renderer: NVIDIA GeForce RTX 2060 with Max-Q Design/PCIe/SSE2
Yes VR
rumble left
rumble right
OpenXR EVENT: session state changed to XR_SESSION_STATE_IDLE
On state idle
OpenXR EVENT: session state changed to XR_SESSION_STATE_READY
On state ready
OpenXR Swapchain Formats
OpenXR Couldn't find prefered swapchain format, using 32859
Attached action set godot
OpenXR found internal action aim_pose
OpenXR found internal action grip_pose
OpenXR found internal action front_trigger
OpenXR found internal action side_trigger
OpenXR found internal action primary
OpenXR found internal action secondary
OpenXR found internal action ax_button
OpenXR found internal action by_button
OpenXR found internal action ax_touch
OpenXR found internal action by_touch
OpenXR found internal action menu_button
OpenXR found internal action select_button
OpenXR found internal action front_button
OpenXR found internal action front_touch
OpenXR found internal action side_button
OpenXR found internal action primary_button
OpenXR found internal action secondary_button
OpenXR found internal action primary_touch
OpenXR found internal action secondary_touch
OpenXR found internal action haptic
Hand tracking is supported

rumble left
rumble right
OpenXR EVENT: session state changed to XR_SESSION_STATE_SYNCHRONIZED
On state synchronized
OpenXR EVENT: session state changed to XR_SESSION_STATE_VISIBLE
On state visible
OpenXR EVENT: session state changed to XR_SESSION_STATE_FOCUSED
On state focused
OpenXR mapped /user/hand/left to 1
OpenXR regained tracking for hand 0
OpenXR mapped /user/hand/right to 2
OpenXR regained tracking for hand 1
rumble left
rumble right
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR EVENT: interaction profile changed!
OpenXR Event: Interaction profile changed for /user/hand/left: /intera[...]

License text in source code

Hi All,

I'd like your opinion on this. The Godot source code has a comment block at the top of each file with the following message:

/*************************************************************************/
/*  register_types.h                                                     */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).   */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

It's placed there to make sure the MIT license is adhered to by anyone who distributes the source code.

This has recently been adopted by godot-cpp as well. I wonder if we should do the same here and whether we should use the exact same message or make it reflect that the source code in this repo is part of the Godot OpenXR plugin

4.0-dev branch

I've created a 4.0-dev branch to start the porting work to Godot 4.0
This will likely be a branch that won't work for the foreseeable future as we're waiting on a number of upstream changes in Godot to be accepted but I'm trying to get a head start in this work.

I'll also do my best to try and keep this branch rebase on master.

Banded lights

There is a problem with rendering on the Oculus Quest 2 (standalone mode) using OpenXR GLES2, but not with Oculus VR Mobile GLES2.

The screenshots below of a scene with many spotlights illustrate this quite well.
image

First image is OVRM runtime

image

Second image is OpenXR runtime

image

Third image is the scene in the editor for reference

Android/Quest Handtracking doesn't work

Branch: android-dev

Finger tracking is currently commented out on Android/Quest and controller tracking isn't working. Suspect there is an issue with the interaction profiles.

Obtain/set headset refresh rate

Different headsets run at different refresh rates which is a problem if we don't know about it because we want to keep our physics update rate in sync with our headset as best we can.

Unfortunately OpenXR does not expose this in the core specification but Facebook did provide a set of extensions:
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_display_refresh_rate

Here we can enumerate a list of framerates supported by the headset, get its current setting and change it (the Quest 2 has two options so it can be compatible with the Quest 1).

Unfortunately seeing this is an extension we can't guarantee this feature is available. If not available we'll need to return a good default value.

Rename methods and variables to consistant naming conventions

Naming of variables and methods are all over the place, time to clean this up. I'm planning to start on this after the android-dev branch is merged into master, this gives us time to make some decisions on this.

The current conventions within Godot that I think we should keep following are:

  • classnames in camel case including capitalising the first letter. i.e. MyClassName
  • same for structure names and the collection name for enums
  • enum members in upper case. i.e. MY_ENUM_MEMBER
  • member variables in snake case. i.e. my_member_variable
  • member methods in snake case. i.e. my_member_method()

Note that it is common in Godot to prefix internal methods with an underscore to denote they are considered private even though they need to be public to make them callable from GDScript.
We'll follow suit if we're in the same situation, so internal functions like '_readyor_init` or functions called by signals.

Note that layout is mostly enforced through clang-format with tabs used as indent but just for reference.

Class definition:

class MyClassName {
private:
	int a_private_variable;

protected:
	int a_protected_variable;

public:
	void a_public_method(const int p_parameter);
};

Function definition:

void MyClassName::a_public_method(const int p_parameter) {
	// code goes here
}

note we do not include ; after } if not needed.

If statements should always have code blocks (defensive programming) so:

if (expression) {
	// code goes here
}

Not if (expression) // code goes here

Same for switch:

switch (value) {
	case 1: {
		// code goes here
	}; break;
	case 2: {
		// code goes here
	}; break;
	default: {
		// code goes here
	}; break;
}

Switch should always contain a default clause.

Godot OpenXR can't target Windows Mixed Reality OpenXR runtime because it relies on DirectX

Hi there, just wanted to say you've been doing fantastic work!

Fyi--this OpenXR addon doesn't work with the Windows Mixed Reality platform out of the box:

ERROR: OpenXRApi::initialiseInstance: OpenXR Runtime does not support OpenGL extension!

Because WMR only support DirectX 😢

But! Preliminary reading found that someone as part of Google Summer of Code made an OpenGL to DirectX compatibility layer for Blender's OpenXR loader, and it actually (mostly) worked:

https://devtalk.blender.org/t/gsoc-2019-vr-support-through-openxr-weekly-reports/7665
https://devtalk.blender.org/t/gsoc-2019-core-support-of-virtual-reality-headsets-through-openxr/7614/15

The project is, however, 2 years old and skimming his last update parts of the workaround seem to have broken because of API changes.

Nonetheless, if WMR compatibility is a priority, @julianeisel 's foundational work is likely helpful.

Cheers!

Android build issue

I've had this issue with the Quest plugin as well, now happens here too, this is a local issue to my laptop, just capturing some data here to discuss.

First time I run gradlew:

D:\Development\xr_plugins\godot_openxr>gradlew generatePluginBinary

> Task :GodotOpenXR:externalNativeBuildDebug
Build godot_openxr_armeabi-v7a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\debug\armeabi-v7a'
D:/Development/xr_plugins/godot_openxr/src/openxr/actions/actionset.cpp:99:22: warning: comparison between NULL and non-pointer ('XrSession' (aka 'unsigned long long') and NULL) [-Wnull-arithmetic]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2425:14: warning: enumeration values 'XR_SESSION_STATE_UNKNOWN' and 'XR_SESSION_STATE_MAX_ENUM' not explicitly handled in switch [-Wswitch-enum]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2386:11: warning: 126 enumeration values not explicitly handled in switch: 'XR_TYPE_UNKNOWN', 'XR_TYPE_API_LAYER_PROPERTIES', 'XR_TYPE_EXTENSION_PROPERTIES'... [-Wswitch-enum]
Build godot_openxr_arm64-v8a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\debug\arm64-v8a'
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2425:14: warning: enumeration values 'XR_SESSION_STATE_UNKNOWN' and 'XR_SESSION_STATE_MAX_ENUM' not explicitly handled in switch [-Wswitch-enum]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2386:11: warning: 126 enumeration values not explicitly handled in switch: 'XR_TYPE_UNKNOWN', 'XR_TYPE_API_LAYER_PROPERTIES', 'XR_TYPE_EXTENSION_PROPERTIES'... [-Wswitch-enum]

> Task :GodotOpenXR:processDebugManifest
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:6:5-10:31 Warning:
        uses-feature#android.hardware.vr.headtracking was tagged at AndroidManifest.xml:6 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:14:9-17:36 Warning:
        meta-data#com.samsung.android.vr.application.mode was tagged at AndroidManifest.xml:14 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:23:9-26:40 Warning:
        meta-data#com.oculus.supportedDevices was tagged at AndroidManifest.xml:23 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:29:9-32:40 Warning:
        meta-data#com.oculus.always_draw_view_root was tagged at AndroidManifest.xml:29 to replace another declaration but no other declaration present

> Task :GodotOpenXR:externalNativeBuildRelease
Build godot_openxr_armeabi-v7a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\release\armeabi-v7a'
D:/Development/xr_plugins/godot_openxr/src/openxr/actions/actionset.cpp:99:22: warning: comparison between NULL and non-pointer ('XrSession' (aka 'unsigned long long') and NULL) [-Wnull-arithmetic]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2425:14: warning: enumeration values 'XR_SESSION_STATE_UNKNOWN' and 'XR_SESSION_STATE_MAX_ENUM' not explicitly handled in switch [-Wswitch-enum]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2386:11: warning: 126 enumeration values not explicitly handled in switch: 'XR_TYPE_UNKNOWN', 'XR_TYPE_API_LAYER_PROPERTIES', 'XR_TYPE_EXTENSION_PROPERTIES'... [-Wswitch-enum]
Build godot_openxr_arm64-v8a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\release\arm64-v8a'
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2425:14: warning: enumeration values 'XR_SESSION_STATE_UNKNOWN' and 'XR_SESSION_STATE_MAX_ENUM' not explicitly handled in switch [-Wswitch-enum]
D:/Development/xr_plugins/godot_openxr/src/openxr/OpenXRApi.cpp:2386:11: warning: 126 enumeration values not explicitly handled in switch: 'XR_TYPE_UNKNOWN', 'XR_TYPE_API_LAYER_PROPERTIES', 'XR_TYPE_EXTENSION_PROPERTIES'... [-Wswitch-enum]

> Task :GodotOpenXR:processReleaseManifest
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:6:5-10:31 Warning:
        uses-feature#android.hardware.vr.headtracking was tagged at AndroidManifest.xml:6 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:14:9-17:36 Warning:
        meta-data#com.samsung.android.vr.application.mode was tagged at AndroidManifest.xml:14 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:23:9-26:40 Warning:
        meta-data#com.oculus.supportedDevices was tagged at AndroidManifest.xml:23 to replace another declaration but no other declaration present
D:\Development\xr_plugins\godot_openxr\android\src\main\AndroidManifest.xml:29:9-32:40 Warning:
        meta-data#com.oculus.always_draw_view_root was tagged at AndroidManifest.xml:29 to replace another declaration but no other declaration present

BUILD SUCCESSFUL in 10m 4s
54 actionable tasks: 53 executed, 1 up-to-date

Some warnings but all seems ok.

Any time after that:

D:\Development\xr_plugins\godot_openxr>gradlew generatePluginBinary

> Task :GodotOpenXR:externalNativeBuildDebug
Build godot_openxr_armeabi-v7a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\debug\armeabi-v7a'
Build godot_openxr_arm64-v8a
ninja: Entering directory `D:\Development\xr_plugins\godot_openxr\android\.cxx\cmake\debug\arm64-v8a'

> Task :GodotOpenXR:generateDebugRFile FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':GodotOpenXR:generateDebugRFile' (type 'GenerateLibraryRFileTask').
> File 'D:\Development\xr_plugins\godot_openxr\android\build\intermediates\local_only_symbol_list\debug\R-def.txt' specified for property 'localResourcesFile' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
11 actionable tasks: 3 executed, 8 up-to-date

Switching build tools allows me to reset.

Access violation crash on xrDestroyInstance

I'm getting a crash on Windows/SteamVR when exiting the application. When xrDestroyInstance is called there is an access violation. Not sure what could be causing it, something we haven't cleaned up properly?

Plugin not working

I downloaded the plugin from the asset repository, imported it and enabled it in my project. VR doesn't start at all now when using OpenXR as the VR interface, this includes using the first_person_controller_vr.tscn scene from the plugin. This happens with "default" "SteamVR" and "Microsoft MR" from the dropdown in the top right. I have OpenXR installed for the Microsoft Mixed Reality app. I'm using Godot 3.3.2 and my project is using GLES3.

I'm not sure if this is relevant but when I tried using this code I got the error OpenXR Runtime does not support OpenGL extension!

extends ARVROrigin

func _ready():
	var arvr_interface = ARVRServer.find_interface("OpenXR")
	if arvr_interface and arvr_interface.initialize():
		get_viewport().arvr = true

My computer information
OS: Windows 10 (21H1)
HMD: Samsung Odyssey+
CPU: Ryzen 7 3700X
GPU: GTX 1070
RAM: 16GB

EDIT: The readme for this repository says godot needs to be compiled with the release debug target, but the readme for the asset repository doesn't mention this. Does godot still need to be compiled as release debug?

Implement controller model support

OpenXR has an extension from Microsoft that when available allows us to load a properly setup controller model for the controller the player is holding in their hands. This is similar to the logic that already exists in the OpenVR plugin for obtaining controller models with the notable difference that OpenVR supplies a simple vertex and index list from which we can create an ArrayMesh while OpenXR provides a fully articulated GLTF (GLB) binary.

See https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_controller_model for more info.

This is currently blocked by:
godotengine/godot-proposals#1632

No video in HMD - "failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]"

Attempting to use latest OpenXR plugin with latest 3.2 Godot branch as of today (Godot Engine v3.2.4.beta.custom_build.61c8efecf) results in HMD tracking working in editor, but no video is being sent to the headset. Basic scene with origin and camera, and minimal initialization code:
image

SteamVR NOT running results in the following log:

Running: F:\Godot\Branches\3.2\godot\bin\godot.windows.tools.64.exe --path F:/Godot/Projects/3_2_branch_openxr_test_01 --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 15424 --position 448,240 res://ARVROrigin.tscn
Godot Engine v3.2.4.beta.custom_build.61c8efecf - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

OpenXR: initialising OpenXR context
OpenXR Runtime only supports OpenGL version 4.3 - 4.6!
Using OpenGL version: 3.3.14736 Core Profile Forward-Compatible Context 20.10.1 27.20.12033.1007
Using OpenGL Renderer: AMD Radeon RX 5700 XT
Swapchain Formats
Using SRGB swapchain!
Suggesting actions for /interaction_profiles/khr/simple_controller, 4 bindings
Suggesting actions for /interaction_profiles/valve/index_controller, 8 bindings
Suggesting actions for /interaction_profiles/mndx/ball_on_a_stick_controller, 8 bindings
initialized controllers 1 2
OpenXR init succeeded
EVENT: session state changed to 1
EVENT: session state changed to 2
EVENT: session state changed to 3
EVENT: session state changed to 4
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
EVENT: session state changed to 5
EVENT: interaction profile changed!
Failed to get interaction profile path str for /user/hand/left [XR_ERROR_RUNTIME_FAILURE]
Failed to get interaction profile path str for /user/hand/right [XR_ERROR_RUNTIME_FAILURE]
EVENT: interaction profile changed!
Failed to get interaction profile path str for /user/hand/left [XR_ERROR_RUNTIME_FAILURE]
Failed to get interaction profile path str for /user/hand/right [XR_ERROR_RUNTIME_FAILURE]
EVENT: interaction profile changed!
Failed to get interaction profile path str for /user/hand/left [XR_ERROR_RUNTIME_FAILURE]
Failed to get interaction profile path str for /user/hand/right [XR_ERROR_RUNTIME_FAILURE]
EVENT: interaction profile changed!
Failed to get interaction profile path str for /user/hand/left [XR_ERROR_RUNTIME_FAILURE]
Failed to get interaction profile path str for /user/hand/right [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
EVENT: interaction profile changed!
Event: Interaction profile changed for /user/hand/left: /interaction_profiles/khr/simple_controller
Event: Interaction profile changed for /user/hand/right: /interaction_profiles/khr/simple_controller
EVENT: interaction profile changed!
Event: Interaction profile changed for /user/hand/left: /interaction_profiles/khr/simple_controller
Event: Interaction profile changed for /user/hand/right: /interaction_profiles/khr/simple_controller
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]

SteamVR RUNNING results in the following log:

Running: F:\Godot\Branches\3.2\godot\bin\godot.windows.tools.64.exe --path F:/Godot/Projects/3_2_branch_openxr_test_01 --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 15424 --position 448,240 res://ARVROrigin.tscn
Godot Engine v3.2.4.beta.custom_build.61c8efecf - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

OpenXR: initialising OpenXR context
OpenXR Runtime only supports OpenGL version 4.3 - 4.6!
Using OpenGL version: 3.3.14736 Core Profile Forward-Compatible Context 20.10.1 27.20.12033.1007
Using OpenGL Renderer: AMD Radeon RX 5700 XT
Swapchain Formats
Using SRGB swapchain!
Suggesting actions for /interaction_profiles/khr/simple_controller, 4 bindings
Suggesting actions for /interaction_profiles/valve/index_controller, 8 bindings
Suggesting actions for /interaction_profiles/mndx/ball_on_a_stick_controller, 8 bindings
initialized controllers 1 2
OpenXR init succeeded
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
EVENT: session state changed to 1
EVENT: session state changed to 2
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
EVENT: session state changed to 3
EVENT: session state changed to 4
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
failed to begin frame! [XR_ERROR_RUNTIME_FAILURE]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]
Failed to locate view space in play space! [XR_ERROR_TIME_INVALID]

Windows 10 x64 20H2 19042.572
Radeon Driver: 20.10.1
OpenXR Plugin: (last commit 7e5c2a9)
Using the provided OpenXR Loader .dll in repo (do I need to compile a new one for x64?)
Oculus Quest 1 using Oculus Link
Oculus App Version: 21.0.0.473.199
Quest Firmware: 904120.19760.0
SteamVR: 1.14.16

Please let me know if there is any additional information or steps you would like me to perform or provide that could be helpful/useful!

Missing ButtonEvent for trigger touching (button 16)

A very strange bug: I have a debug display which displays the state of all buttons. It shows a state change for button 16 when I touch the trigger with my index finger, but the button_pressed event isn't firing. All other buttons/touches and corresponding events seem to work so far, except for this mysterious number 16.

Windows, Godot 3.4 stable, OpenXR installed from assetlib, Oculus Quest PCVR over AirLink

ARVRCamera transform not updated in Godot

Hi, after some talk in the Godot discord, it seems there is a bug with the ARVRCamera Node not being updated properly. It always stays at the origin. (1,0,0 - 0,1,0 - 0,0,1 - 0,0,0)

@BastiaanOlij mentioned that it is only returning the left and right eye positions for rendering, not the center position that is used to track the camera node in Godot. According to him, this is the code that needs to be fixed up: https://github.com/GodotVR/godot_openxr/blob/master/src/ARVRInterface.cpp#L155

This then results in some buggy behavior, where child nodes don't follow the camera for example (as the parent node transform doesn't seem to change, when it is in fact moving in game). Also, since the transform doesn't update, ARVRServer.get_hmd_trasnform() as well as get_camera_transform() from the camera node always return the origin (identity rotation and zero translation)

Skeleton/finger tracking on Quest

We've disabled hand tracking on Android because this currently crashes on the Quest.

This is purely used for skeletal animation of the hand either by inferring the positioning based on controller sensors, or for full hand tracking as supported on the quest.

Demo not working in Oculust Quest 2

Hi,

I'm trying run demo's android-dev branch in Occulust Quest 2. Export apk OK and Install OK, but demo not working.

What steps do you have to follow to use the plugin and demo for Occulust Quest 2 in Godot?

Thanks.

Oculus OpenXR: no support found for requested extension: XR_EXT_hand_tracking

It seems since hand tracking was added the plugin will no longer start when pointing to the the oculus_openxr runtime. The SteamXR runtime works, but the fps is not the best, thats why I tried to switch back to Oculus's and discovered this issue. The last version I can get to start is: 15d0abb

Full error when trying to start a basic scene using the latest plugin while openxr is pointing to oculus_openxr_64.json:

Running: E:/Godot/Godot_v3.2.4-beta6_win64.exe/Godot_v3.2.4-beta6_win64.exe --path E:/Projects/Godot/project_space --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 11608 --position 1408,780 res://scenes/prefabs/XRPlayer.tscn
Godot Engine v3.2.4.beta6.official - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 5700 XT
OpenGL ES Batching: ON

OpenXR initialising OpenXR context
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : LoaderInstance::CreateInstance, no support found for requested extension: XR_EXT_hand_tracking
Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance failed
Error [GENERAL | xrResultToString | OpenXR-Loader] : No active XrInstance handle.
ERROR: OpenXRApi::xr_result: OpenXR Failed to create XR instance. [☺]

   At: src\OpenXRApi.cpp:137
ERROR: OpenXRApi::openxr_get_api: OpenXR init failed
   At: src\OpenXRApi.cpp:99
Error [GENERAL | xrDestroyInstance | OpenXR-Loader] : Instance handle is XR_NULL_HANDLE.

Please let me know if there is any additional info you would like and anything I can do to test/help.

Info:
Windows 10 x64 20H2 19042.746
Radeon Driver: 20.12.1
Godot Version: Godot_v3.2.4-beta6_win64
OpenXR Plugin: any commit AFTER (15d0abb) NOT working
OpenXR Loader: 1.0.12/1.0.13 (tried both)
Oculus Quest 1 using Oculus Link
Quest Firmware: 1201830.9360.0
Oculus App Version 23.0.0.43.517 (23.0.0.43.517)
SteamVR Version: 1.15.19

Raspberry pi support for XR

I know its a bit of weird request but considering that godot is most popular foss game engine and raspberry pi is the most stable and popular arm sbc, one could imagine that using some sort of stereoscopic rendering on demand and openXR binding for imu for 3dof tracking one could achieve fully open sourced XR headset.

Investigate using XR_EXTENSION_PROTOTYPES to load extensions

Extensions don't get their access methods initialized up front which is why we're loaded function pointers in various places. We need to look into using the XR_EXTENSION_PROTOTYPES define to enable the loader to supply pointers to functions for (enabled?) extensions.

Branches tags and versions

I believe it's time we start focusing on release 1.1.0 and merge our android-dev branch into master.

Official versions are managed through tags, so we currently have 1.0.0, 1.0.1, 1.0.2 and 1.0.3 releases tagged. We're also using tags to mark alpha and beta builds.

Our master branch is where we merge our development work into and is thus our leading branch. Once we merge our android-dev branch this branch effectively moves us up to 1.1.x territory.

In order to be able to do 1.0.x patch releases we will therefor create a 1.0.x branch.

PRs should be submitted against the master branch unless it is a fix only applicable for an older version. If we want the fix to go against both master and an older version we add the tag cherry-pick-1.0.x. Once a PR is approved and ready to merge into master we'll create a PR for the cherry pick as well and remove the cherry pick tag to let us know we've handled it.

We will also soon start work on porting this plugin to Godot 4 proper, we'll like create a godot4-dev branch to manage this work. Once merged into master that will move our master forward to 2.0.x

Controller mappings

The Godot 3 version of our OpenXR plugin uses a hardcoded action set and interaction profile that maps all the available inputs to Godot joystick/gamepad system.

Care has been taken to make sure inputs match as much as possible so there are only very rare occasions where you need to know the controller the player uses. The nonsensical order of the buttons is unfortunately a result of features becoming available after button id's were already assigned making everything a little messy.

Note menu/select button and secondary thumbstick/trackpad input is a recent addition and is only available from 1.1.0 onwards

Default/unknown controllers
Buttons:

  • 3 = menu button
  • 4 = select button

No axis

Vive wands
Buttons:

  • 2 = grip button
  • 3 = menu button
  • 4 = system button
  • 12 = trackpad "touch"
  • 14 = trackpad "click"
  • 15 = trigger

Axis:

  • 0/1 = trackpad x/y
  • 2 = trigger
  • 4 = grip (acts as button so only values 0.0 and 1.0)

Windows WMR Controllers
Buttons:

  • 2 = grip button
  • 3 = menu button
  • 11 = trackpad "touch"
  • 13 = trackpad "click"
  • 14 = thumbstick "click"
  • 15 = trigger

Axis:

  • 0/1 = thumbstick x/y
  • 2 = trigger
  • 4 = grip (acts as button so only values 0.0 and 1.0)
  • 6/7 = trackpad x/y

Oculus Touch Controllers
Buttons:

  • 1 = B (right) / Y (left) button
  • 2 = grip button
  • 3 = menu button (left only)
  • 7 = A (right) / X (left) button
  • 12 = thumbstick "touch"
  • 14 = thumbstick "click"
  • 15 = trigger

Axis:

  • 0/1 = thumbstick x/y
  • 2 = trigger
  • 4 = grip (acts as button so only values 0.0 and 1.0)

Valve Index Controllers
Buttons:

  • 1 = B button
  • 2 = grip button
  • 7 = A button
  • 11 = trackpad "touch"
  • 12 = thumbstick "touch"
  • 13 = trackpad "click"
  • 14 = thumbstick "click"
  • 15 = trigger

Axis:

  • 0/1 = thumbstick x/y
  • 2 = trigger
  • 4 = grip (acts as button so only values 0.0 and 1.0)
  • 6/7 = trackpad x/y

We are planning changes to how this works in Godot 4 so the above information applies to Godot 3 only.

Passthrough API is just black

I tried recompiling the latest version with Passthrough permission enabled, but the viewport background is still black. I tried every method of troubleshooting available, but nothing seems to suggest anything's wrong. I hope someone here can help. Hope it's not a stupid question.

SteamVR is reporting various mapping errors

Since adding our touch events we're getting a bundle of mapping issues:

Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/left/input/squeeze/value
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/right/input/squeeze/value
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/left/input/x/touch
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/right/input/a/touch
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/left/input/y/touch
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/right/input/b/touch
Tue Oct 19 2021 14:40:05.827 - Receiving binding with input source we've never heard of /user/hand/left/input/trigger/touch
Tue Oct 19 2021 14:40:05.828 - Receiving binding with input source we've never heard of /user/hand/right/input/trigger/touch
Tue Oct 19 2021 14:40:05.828 - Receiving binding with input source we've never heard of /user/hand/left/input/squeeze/value
Tue Oct 19 2021 14:40:05.828 - Receiving binding with input source we've never heard of /user/hand/right/input/squeeze/value
Tue Oct 19 2021 14:40:05.828 - Receiving binding with input source we've never heard of /user/hand/left/input/thumbstick/touch
Tue Oct 19 2021 14:40:05.828 - Receiving binding with input source we've never heard of /user/hand/right/input/thumbstick/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/left/input/x/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/right/input/a/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/left/input/y/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/right/input/b/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/left/input/trigger/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/right/input/trigger/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/left/input/thumbstick/touch
Tue Oct 19 2021 14:40:05.830 - Receiving binding with input source we've never heard of /user/hand/right/input/thumbstick/touch

Error spam when controllers are off

Getting math error spam when controllers are not turned on (Index controllers on Windows):

ERROR: Condition "Math::is_inf(v.x)" is true.
   at: VisualServerScene::instance_set_transform (servers\visual\visual_server_scene.cpp:690)
ERROR: Condition "Math::is_inf(v.x)" is true.
   at: VisualServerScene::instance_set_transform (servers\visual\visual_server_scene.cpp:690)
ERROR: Condition "Math::is_inf(v.x)" is true.
   at: VisualServerScene::instance_set_transform (servers\visual\visual_server_scene.cpp:690)
ERROR: Condition "Math::is_inf(v.x)" is true.
   at: VisualServerScene::instance_set_transform (servers\visual\visual_server_scene.cpp:690)

Android/Quest screen too bright

Looks like on the Quest using the GLES2 renderer everything becomes too bright. I think this is because OpenXR is expecting colors in linear color space, this may also be a problem if RGBA8 is used on desktop instead of SRGBA8 and that triggering OpenXR to do an additional color correction.

Need to investigate further.

Refactor ARVRInterface to subclass ARVRInterfaceGDNative

This is something we've only applied to the (still in development) ARCore plugin but we added a few changes to the GDNative interface that allows us to subclass the ARVRInterfaceGDNative wrapper and create more natural additions to the interface.

Combined with the planned improvements in GDNative for Godot 4 this will help developers lots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.