Note: This is an archived version of the Blender Developer Wiki (archived 2024). The current developer documentation is available on developer.blender.org/docs.

User:Severin/GSoC-2019/How to Test

Core Support of Virtual Reality Headsets through OpenXR

How to Test

Only for preservation purposes!
Information on this page was replaced by a new guide on the manual: https://docs.blender.org/manual/en/2.83/getting_started/configuration/hardware.html#getting-started.


The following are introductions for testing the vr_scene_inspection branch with HMDs (head mounted displays) supported by available OpenXR platforms. Blender itself doesn't drive the device; it communicates with installed device drivers (very loosely speaking) via the new OpenXR specification interface. A little bit of setup is needed for this, explained in the following.

Grab a Build

Windows builds are uploaded regularly to Graphicall: https://blender.community/c/graphicall/3dbbbc/
The only Linux compatible runtime is Monado - which isn't ready for user testing really. If you still want to use Linux, you'll have to compile both Blender and Monado by yourself.

If you want to compile the branch yourself, you'll have to make sure the OpenXR-SDK dependency is installed correctly. On Windows it's already bundled with the precompiled libraries, so simply updating these will get you there (e.g. svn up in C:\blender-git\lib\win64_vc14). On Linux, install_deps.sh can be used as usual.

Also checkout the soc-2019-openxr Add-ons branch (e.g. git checkout soc-2019-openxr in C:\blender-git\blender\release\scripts\addons\).


First: Choose a Runtime

To use your HMD with Blender - or any OpenXR application in fact - an OpenXR runtime is required. This is the part that actually implements the OpenXR specification, much like a graphics driver implements the OpenGL specification. It may help to think about the runtime as the device driver, although it's a higher level concept.

Given that OpenXR is quite new, runtimes for it are still in early-ish development too. So don't expect production ready software! Getting them up and running will probably become even easier in the future.

There are three runtimes with OpenXR support available:

  • Windows Mixed Reality (WinMR) Runtime.
  • Oculus Runtime (Windows only, not officially released yet)
  • Monado
    Free and Open Source VR platform with an OpenXr runtime. No binaries available, has to be compiled for testing.

If you have a WinMR or Oculus HMD, your choice is obvious. If you run Linux and feel adventurous, you can try compiling Monado.

Windows Mixed Reality

Blender OpenXR Windows Mixed Reality.png

To use the Windows Mixed Reality platform with OpenXR, make sure you have recent Windows updates installed. More specifically, the October 2018 Update (1809) or newer needs to be installed.

All you have to do is install the Mixed Reality OpenXR Developer Portal, launch it and press "Set as active runtime".
(For the October 2018 Update, an additional Compatibility Pack has to be installed too.
For more information and detailed steps, refer to https://docs.microsoft.com/en-us/windows/mixed-reality/openxr.)


Oculus (Windows only)

Blender OpenXR Oculus Runtime.jpg

While Oculus doesn't yet consider their OpenXR support ready to be considered part of their feature set, you can use their in development support. All you have to do is install the Oculus app, and launch Blender through the blender_oculus.cmd script, located next to the blender.exe in Windows builds of the branch.


Enable the Blender VR Add-on

We decided to not expose the VR features in Blender by default for now. An Add-on was created that has to be enabled to use VR.

(If you compiled Blender yourself, make sure that the Add-ons sub-module has the soc-2019-openxr branch checked out too.)

Then it's just a matter of enabling the Basic VR Viewer Add-on from Preferences » Add-ons

Start a Blender VR Session

VR session panel.png

With a runtime installed and set up, a VR session can be launched in Blender through Window » Toggle VR Session. To end it, use the same button or close the runtime (e.g. by closing the Mixed Reality Portal when using the Windows Mixed Reality runtime).

That is it! All you can do for now is inspect the scene from the active camera in VR. Of couse, this is just the start, by no means the end of it.


Feedback and Bug Reports

I hope to get feedback to iron out quirks, bugs and to make sure usage is as users would expect it. The best place for this is the devtalk project thread. Note that there are some known issues already, see #67083. Don't hesitate to contact me directly either.
Please don't create a normal bug report, this is not a master project.

In case you want to troubleshoot problems yourself, the new --debug-xr commandline option for Blender gives rather detailed debugging output.