SteamVR and OpenXR
@ Brian Kim (3/14/2023)
SteamVR and OpenXR are two standards for AR and VR. SteamVR is built and maintained by the company behind Steam, Valve, while OpenXR is built and maintained by the Khronos Group.
If you are developing through Unity, you will almost definitely need to use one these standards. Incorporating them will not be too difficult, since both come with plug-ins that can be installed within a Unity project.
It is technically possible to use both plug-ins, but this is likely going to cause confusion for you, the developer, and will probably lead to conflicts within the project due to overlapping bindings and commands.
This page is meant to discuss the relative merits of the two standards and help a developer decide which to use. Note that this is focused on developers using Unity.
The SteamVR plug-in comes with very strong recommendations. Since it is integrated with the existing SteamVR system, there is a greater degree of confidence that a game developed using the plug-in will be compatible with the Steam system and can be uploaded onto the Steam marketplace.
The plug-in also has strong support for a variety of headset and controllers, and there is an existing library of documentation.
However, as discussed elsewhere on the wiki, SteamVR has gone through major development as part of the release of SteamVR 2.0. The main change in this system is that the process for binding developer-generated actions in code requires using the new Binding UI to connect new actions directly to specific buttons and inputs.
This requires that the SteamVR application on the development machine be connected to a headset to get input actions, which might be a technical limitation for developers.
SteamVR 2.0's changes have certain benefits. It allows for more control on the developer's part to target certain operations. Also, instead of having to rely on tracking the controller, as in the older version, the program can directly draw inputs from an expected device controller.
On the other hand, this means that developers need to very carefully specialize their programs for specific controllers and inputs, possible redoing certain operations to make a program compatible across a variety of VR headsets and controllers.
OpenXR takes a different design philosophy to SteamVR. Instead of binding actions to specific inputs from specific devices, OpenXR seeks to be a standard that is universally applicable and accepted across AR and VR devices and platforms.
This mainly means that, instead of taking in inputs from devices specifically, OpenXR's developer code uses generalized inputs from controller objects. This code is designed to be generic to any of the supported devices, including the Oculus Quest 2 and Vive.
OpenXR's system allows for easier development to target a broad range of devices. Theoretically, code built using the OpenXR plug-in should be compilable and runnable on pretty much any VR headset used in the course.
In addition, the OpenXR plug-in allows developers to temporarily run sample code from their device in a VR game setting. This requires connecting a headset to the developing machine, similar to SteamVR, but allows developers to test the code without compiling the project with every change.
OpenXR has been increasingly popular as a standard, receiving support from Steam, and is a good default if you're not sure how to start your project.
The main drawback is that it is not as thoroughly documented as SteamVR, though this is improving. There are enough tutorials online from other users that a developer should be able to fill in most blanks, but in this respect, OpenXR suffers.