Virtual reality glasses on Linux

DK2 on the Way

Virtual reality fans seek to achieve presence, which means the user perceives the virtual world as real: The brain accepts the illusion as a second reality because it does not notice any visual errors and anomalies. The second development kit (DK2) already comes closer to this goal, because the developers have optimized the hardware of the first kit.

At a resolution of 960x1080 pixels per eye, the picture is now much sharper and the risk of pixelation much lower; the production version is likely to offer even higher resolution. At the same time, the OLED display achieves refresh rates of between 60 and 75Hz with switching times of only 2 or 3 milliseconds, thus preventing motion blur and judder. Additionally, the DK2 comes with an additional external device that determines the absolute position of the user in space. This means that head movements to the front, back, right, left, up, and down are interpreted, giving the Oculus Rift six degrees of freedom.

This innovation, together with the faster screen response times, solves one major problem of the first kits: motion sickness. In fact, some users felt sick when they tried to use the Rift. This situation is now much better and possibly a closed case. Another improvement that developers are likely to welcome is the absence of the previous desktop cable clutter: A 3-meter-long cable that terminates in a USB and an HDMI connector supplies the glasses with power and data. The controller is eliminated, and the cable is detachable. Whereas the DK1 cost US$  300, the new version costs US$  350.

Hello, Linux

In our lab, I tried out the Oculus Rift on a pre-release version of Lubuntu 14.04 to keep the desktop overhead as low as possible. To start, the system needed the proprietary drivers for NVidia or ATI video cards; the Rift did not work with the free drivers. Although the Rift should actually run with Intel cards like the HD 4000 according to the official information [8], the makers recommend graphics cards that allow a frame rate of 60FPS.

After installing the driver and rebooting, you can connect the hardware, turn on the VR goggles via the controller, and configure the displays. The DK1 expects a resolution of 1280x800 pixels, but the test laptop's screen used 1366x768 pixels. Lubuntu 14.04 automatically and unchangeably configured the Rift display as the first display and did not assign a separate resolution for the laptop display. Other Linux systems might do a better job of this, but it was not a major problem.

To get started with the Oculus, you also need the SDK, which means having a free account for the developer zone [9]. You will find several scripts for Linux in the SDK that you need to run one after another. After unpacking the SDK archive, go to the OculusSDK folder and run the commands in Listing 1.

Listing 1

Getting Started with the Rift

 

The script uses chmod to get rid of any access problems; in the next step, the configuration script installs a number of packages that the Rift requires on Linux systems. In the last two lines, the installer relinks an existing udev library if the Oculus World Demo complains about a missing udev library at startup. At this point, you could run the demo, but without head tracking.

To enable and customize the Rift to match the personal needs of the individual user, you need to run the ./OculusConfigurationUtility script as shown in Figure 2. If you see a "No USB detected" message at the top of the window, it could help to unplug the Rift's USB cable briefly and then plug it back in. You can then create a profile, set the type of eye glasses used, and press the Calibrate button to calibrate the VR glasses. To do so, rotate the unit at head height through all three degrees of freedom until the window on the screen shows a green stripe (Figure 3). You then store the settings. Rift users can enter the IPD manually or select Launch Interactive Utility to launch an interactive tool that supports this.

Figure 2: The configuration tool for the Oculus Rift helps measure the field of view and calibrate head tracking.
Figure 3: During calibration, the user needs to rotate the VR glasses several times through the three axes.

The Measure IPD button launches a test to adjust the Rift to the user's field of view (FoV). To do this, you need to close one eye and follow a vertical green line, which you push to the far left or far right by clicking on the two arrows. You then repeat the process for your other eye; Accept stores the settings (Figure 4). The next time you start, however, you have to repeat this performance; the configuration script is still fraught with teething troubles (see the "Configured to Death" box).

Figure 4: You can use the Settings Viewer to check whether the settings are right for your eyes.

Configured to Death

The configuration tool does not yet work perfectly, and it is also used for several other purposes. Besides the SDK, the Unity demo from the Oculus website [9] includes the tool. If you want to test Steam with the VR option, you will find the same tool under the name Steam VR. It does not store profiles and may even fail to detect the Rift, until you unplug and replug. These issues need to be rectified.

Oculus in the House

The ./OculusWorldDemo then starts the Toscana demo, which takes you to a rather sparsely furnished villa with a sea view (Figure 5). You can look around with the help of head movements and move your (invisible) Avatar, using the arrow keys. Pressing the Space bar takes you to an in-demo mode that displays some values (FPS, FoV, IPD) and keyboard shortcuts that let you change the parameters of the game. The demo does not include sound.

Figure 5: Luxury, even if only virtual: The Toscana demo is usually the user's first encounter with virtual reality.

An overview of the available demos, including those for Linux, is available online [10]. Demos and games worth exploring include Titans of Space, Technolust, The City, The Room, and Lorryrider (Figure 6); the latter needs an advanced graphics card; otherwise, judder tends to spoil the effect. In some demos, I first had to press the F11 key to correct the perspective.

Figure 6: In Lorryrider, the Rift user takes a ride on a car through a mine; you need a good graphics card for this.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Firefox Steps into 3D

    New initiative will bring futuristic virtual reality effects to the web surfing experience.

  • FOSDEM

    Long lines and interesting discussions awaited the visitor at this year's FOSDEM event in Brussels, Belgium.

  • News

    Updates on technologies, trends, and tools.

  • Welcome

    The world is left to wonder if the recent news of a Debian fork is an important event or a minor historical footnote. Either way, it seems like a good story, reminiscent of the Linux stories of the past, when the community really looked and behaved like a collection of individuals rather than a corporate fan club.

  • The Eyes Have It
comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News