Install and run SteamVR on ArchLinux (for using an HTC-Vive) and do OpenGL/OpenVR developement

So, I recently had the chance to try out an HTC-Vive on a Linux machine. Naturally, I installed Arch on it πŸ˜‰

The installation is pretty straight forward, but there are some little catches if you want to do OpenGL development on Linux With OpenVR (OpenVR is the API you use to talk to the SteamVR runtime.)

SteamVR has a Linux beta since February 2017. They also announced that the SteamVR runtime itself is implemented with Vulkan only.

First thing first, I am unaware if it’s currently possible to update the firmware of the base station on Linux, The setup I’m using is also running on Windows and the firmwares where already updated on that platform. That’s one thing I can’t tell you about.

So, to get started, you will need to have Steam running on your machine. ArchLinux is now a 64bit only distribution, Steam is a 32 bit only program. So, if it’s not already the case, you need to activate the [multilib] repository for pacman. (just uncoment the lines for it in /etc/pacman.conf)

First thing first, to do VR, you do need a good GPU. Here I’m running an Nvidia GTX 1070 with the proprietary drivers. You can use an AMD one with the latest version of the mesa drivers apparently. I don’t have access to any modern AMD graphics card so I can’t tell.

Then, you will need to install the following packages:

  • steam
  • lsb-release
  • your graphic’s driver packages in 32 bit (lib32-nvidia-utils, lib32-libvdpau)

Once you have installed Steam, launch it, connect or create an account, and install the SteamVR package, then you want to turn on the beta:

Once you have steam VR on your machine, and before you plug the Vive on the computer, you will need to install some udev rules to permit the app to access the device directly.

Create a file /lib/udev/rules.d/60-HTC-Vive-perms.rules and write the following content in it:

You can now open SteamVR, and you should be prompted to run the room setup program to configure your “play space”

Then, if you want to use OpenVR to render to the Vive with OpenGL, you will need a Vulkan runtime and development package. For this, you need to install theΒ  vulkan-develΒ  package.

You may also need to launch your programs under under the steam runtime, this is done using this script :

~/.steam/steam/ubuntu12_32/steam-runtime/run.sh ./my_steamvr_app

And that should be about it. Programs that link against the OpenVR API will “just work” now.
The info in this article comes from my own experience, and this document from Valve : https://github.com/ValveSoftware/SteamVR-for-Linux

Annwvyn, my game engine is now “officially” compatible with Linux with OpenVR. πŸ˜‰

I would be really happy if it was possible to use the Oculus Rift on Linux, yet, there aren’t any good solution right now. Oculus froze Linux development effort years ago, so we aren’t going to see an official SDK any time soon. The OpenHMD project has made “some” progress” but nothing really usable for now.

The locomotion problem in Virtual Reality

(Seriously, I hesitated some time between this version and the original, but that’s not the point of this article, and I kinda like the 80’s vibe anyway…)

I think we can all agree here, Virtual Reality (VR) is now, and not science-fiction anymore. “Accessible” (not cheap by any stretch of the imagination) hardware is available for costumers to buy and enjoy. Now you can experience being immersed in virtual worlds generated in real time by a gaming computer and feel presence in it.

The subject that I’m about to address doesn’t really apply to mobile (smartphone powered) VR since theses experiences tend to be static ones. Mobile VR will need to have reliable positional tracking of the user’s head before hitting this issue… We will limit the discussion on actual computer-based VR

One problem still bother me, and the whole VR community as well is: In order to explore a virtual world, you have to, well, walk inside the virtual world. And doing this comfortably for the user is, interestingly, more complex that you can think.

You will allways have a limited space for your VR play room. You can’t physically walk from one town to another in Skyrim inside your living room, the open world of that game is a bit bigger than a few square meters.

The case of cockpit games like Elite:Dangerous aside, simulating locomotion is tricky. Any situation where you’re moving can induce nausea.

Cockpit-based game grounds you in the fact that you’re seated somewhere and “not moving” because most of the object around you don’t move (the inside of the spaceship/car/plane). This make it mostly a no problem, you can do barrel rolls and looping all day long and keep your meal inside your stomach. And you have less chance to kill yourself than inside an actual fighter jet πŸ˜‰

Simulator (VR) sickness is induced by a disparity between the visual cues of acceleration you get from your visual system, and what your vestibular system sense. The vestibular system is your equilibrium center, it’s a bit like a natural accelerometer located inside your inner ears.

(more…)