Virtual reality glasses on Linux
Developing for the Rift
If you want to develop software for the Rift, the related manual contains all the information you need about the included SDK. The Oculus Rift in Action book [11] by Bradley Austin Davis, Karen Bryla, and Alex Benton is described by the authors as a work in progress. It deals with programming for the Rift, and it points users to a GitHub repository with freely available examples for application developers [12]. Listing 2 shows how the software, which integrates a customized version of the Oculus Rift SDK, can be built on Ubuntu 14.04.
Listing 2
Oculus SDK for Linux
After installing some header files in the first step, you download the code from the GitHub repository and retrieve the init
and update
submodules. You then create a build directory, change into this, then run cmake
to generate a Unix-style Makefile, which you then run as the last step.
If the compile process fails, you may need to go back and add more development packages, according to the error messages. If the process is successful, the executable sample files end up in the build/output
directory.
Motor Controlled
You can quickly accumulate a huge amount of code in 3D programming; thus, it makes sense – and not only for game developers – to use 3D graphical editors that rely on an underlying game engine. The Unity engine is very popular and well supported in this respect. Oculus VR includes files that help Unity output Rift-optimized demos; the SDK also exports files for Linux.
On the website, you will also find a manual for Unity integration [13] and a Unity variant of the Toscana demo [9]. The downside: The Unity editor needs to be installed, and it still doesn't run natively on Linux. Additionally, the graphics in games created with Unity are not generally considered state-of-the-art – even if they are perfectly okay for many of today's indie games.
Less well integrated, but just as interesting, is Valve's Source SDK 2013, which supports the Oculus Rift [14]. Developers of commercial games need a commercial license; for all others, the engine is free to use. It is installed on your disk along with the fairly ancient Hammer editor.
For something more visually state-of-the-art, try the Unreal engine and CryENGINE. The manufacturers of both announced Linux versions for spring 2014, and the pricing model was changed. Versions 3 and 4 of the Unreal engine support the Rift, and CryENGINE has built-in Rift support (versions 3 and 4).
Among the free engines, Torque 3D [15] works with the Oculus Rift, and Panda3D [16] offers at least rudimentary support. The Blender Game Engine (BGE) also works with the VR glasses; developer Lubosz Sarnecki created a Python wrapper [17] based on the OpenHMD library and released under the Boost Software License.
Web 3.0
On the web, many projects and people focus on data glasses. Some simply render an existing image stereoscopically and show it at a certain distance; this also works for YouTube videos. The difficult part is integrating head tracking; usually the user can only change perspective with the mouse or keyboard. The vr.js [18] library also supports head tracking, but it relies on the outdated NPAPI.
In particular, the JavaScript Three.js [19] library is very popular in the 3D community. Several impressive projects are hosted on the associated website, including a demo for the Rift [20]. Last, but not least, Second Life could be making a comeback thanks to the new technology: At least, the alternative CtrlAltStudio client [21] supports the VR glasses.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.