Godot 4 OpenXR demo Screenshot from the demo project being developed as an example for OpenXR in Godot 4
Godot 4 OpenXR demo Screenshot from the demo project being developed as an example for OpenXR in Godot 4

By: Bastiaan Olij 27 February 2022

Lots of things are happening on the XR front with Godot, so time for a long overdue update blog post.

Godot 4 XR

Highlights

At the end of last year, we had rounded off most of the core changes in Godot 4 to support XR. We had XR fully working through OpenVR/SteamVR and, except for a pesky timing issue, had OpenXR up and running.

It initially seemed the timing issue was related to issues with the original Vulkan implementation on OpenXR. OpenXR had already moved to a new approach, where OpenXR takes over managing the Vulkan instance. Switching to this new approach however required embedding OpenXR support into the core of Godot. With the Meta grant securing the funding to switch to the new approach, the whole implementation was ported to the core.

While we would later discover the cause of the timing issue was fixable in the plugin, the new approach is far more future-proof. It will make it much easier to implement various XR features including the editor features we have on the roadmap.

The initial version of this work was merged this week. For details, check the Core OpenXR PR. Currently, only desktop VR is supported as we are waiting on Meta to adopt the official Khronos OpenXR loader.

An example project to try out can be found here.

Known issues

There is a known issue with the brightness of the output. This is being worked on.

Next steps

The team is currently working on:

  • A UI for editing the OpenXR action map.
  • Variable Rate Shading support to enable foveated rendering on all platforms. This will provide significant rendering performance improvements, and will also be available for non-VR usage eventually.
  • Porting extension logic from the Godot 3 plugin.

Godot OpenXR plugin 1.2.0 release

The Godot XR Contributors have been hard at work preparing another release of the plugin that addresses a few critical issues and has a number of QOL improvements. The team would like to specifically express their thanks to the many developers helping out in testing these changes.

Download

The plugin can be downloaded from the Asset Library

Requires Godot 3.4 or higher.

Highlights

  • Fixes the way swapchains are created ensuring consistant color gradients between different systems and preventing the banding issue on the Meta Quest. This also fixes the issues reported by users using the Meta Quest and Quest 2 over (air) link.
    • There is a regression in the desktop version where the on screen preview is too dark which we are aware of. This requires a fix in Godot itself. A workaround is available.
  • Fixes an important issue in the returned trigger and grip values when analogue input was requested.
  • Adds support for the HP Reverb G2 controllers.
  • Improves upon the timing used for predictive tracking. This ensures controller positions are more accurate. Added HUD elements to your camera node are now positioned correctly.
  • Adds an API to return information about the confidence of the tracking data. Poses will now provide information on whether the controllers are accurately tracked or whether the controllers are (partially) obscured and the tracking is predictive.

Next steps

The contributors are mainly focused on improving the logic that is already in the plugin and improving compatibility with different systems out there.
Work is also progressing on some of the newer OpenXR features that are currently still in experimental builds such as supporting the new Meta Spatial Anchors API.

Reporting issues

For any issues encountered while using the Godot OpenXR plugin, or for any clarifications/improvements to the Godot XR documentation, feel free to open a github issue under the Godot OpenXR github page!

The list of current known issues can be found here.

Godot XR Tools 2.3.0

The Godot XR Tools Contributors welcome new contributor Malcolm Nixon. Many of the improvements in this release were executed by Malcolm closely working together with project lead Bastiaan Olij.

The plugin can be downloaded from the Asset Library

Documentation can be found on the repository’s wiki.

Requires Godot 3.4 or higher.

Highlights

  • The bulk of the changes center around the movement implementation in the plugin. There is a lot more flexibility in moving your player around including climbing mechanics, glide mechanics, wind mechanics, etc. This change does introduce a separate player object that needs to be added into your project however the plugin will attempt to do so automatically. This means some settings have moved so this could lead to minor breakage on existing projects.
  • The pickup and throw mechanics have been greatly improved.
  • There is now a vignette implementation that includes an automatic mode that will vary the vignette based on the players movement.

Godot 4 port

The port of this module to Godot 4 is well under way and used in the test project mentioned above. You can follow the work being done here.

Next steps

The team is currently working on a virtual keyboard implementation, a whiteboard implementation, a door interaction implementation and on an implementation for supporting physical interactions with viewports using the users fingers as an alternative of the laser pointer.

Reporting issues

For any issues encountered while using the Godot XR tools plugin, or for any clarifications/improvements to the wiki documentation, feel free to open a github issue under the Godot XR tools github page!

The list of current known issues can be found here.

Community

If you need help, want to help or just like to chill with those who are making stuff with Godot XR, the best place to come and hang out is on the Godot Engine Discord server in the XR channel.

If you’re interested in contributing to either the plugins or the core functionality, come and hang out on the Godot Contributors chat server in the XR channel to discuss ideas.

Source: Godot Engine Official