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
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.
-
Plasma Desktop Will Soon Ask for Donations
The next iteration of Plasma has reached the soft feature freeze for the 6.2 version and includes a feature that could be divisive.
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.
-
CachyOS Adds Support for System76's COSMIC Desktop
The August 2024 release of CachyOS includes support for the COSMIC desktop as well as some important bits for video.
-
Linux Foundation Adopts OMI to Foster Ethical LLMs
The Open Model Initiative hopes to create community LLMs that rival proprietary models but avoid restrictive licensing that limits usage.
-
Ubuntu 24.10 to Include the Latest Linux Kernel
Ubuntu users have grown accustomed to their favorite distribution shipping with a kernel that's not quite as up-to-date as other distros but that changes with 24.10.