Thursday, 24 May 2018

VR on the cheap.

A recent BSc Games Development project by Jack Taylor look at the use of older VR equipment options running on newer operating system, specifically Windows 10. Aim of this work was a lower cost system, for users, including educational use. In the post below Jack discusses his work.

VR on the Cheap
Guest Blogger: Jack Taylor

The chosen approach was to use the Oculus DK1 Headset working with new versions of Unity.
Configuring the Oculus DK1 for Windows 10
Firstly, you will need to download the official Oculus SDK 0.8.0 Windows Runtime software. You can find a download for that here:
Please note that newer versions of the Oculus SDK will not work with an Oculus DK1 headset, so 0.8.0 is crucial for this process to work.
Once downloaded, run the executable file. You will be presented with this:

Run through the installer, following instructions as prompted. This installer will handle the task of placing the necessary drivers and Oculus services on to your machine (you may be prompted to restart your machine once the installation has completed).
The key piece of software you will need from the runtime is the Oculus Configuration Utility. You can find this in your system tray after you have installed the Oculus Runtime. To launch your Oculus Configuration Utility, simply click on this icon in your system tray:

If the icon that is shown above is in your system tray at any time, your Oculus headset will work with your machine. You should be presented with this window when you open the utility software (if your Oculus Rift is attached to your machine):

This service is automatically launched in your system tray when you start your machine. If you haven’t had this service automatically enabled when your machine starts, you will need to enable it before attempting to use your Oculus, or it won’t work. You can use this service to change the settings on your Oculus to suit your needs. If you wish to modify your height and test the demonstration scene that this piece of software provides, you will need to create a profile within the configuration utility. You can do so by clicking the + icon located next to the user list:

You can name your profile to whatever you like:

Once you have created your profile, the bottom half of the configuration will become available.

The height measurement is only necessary if you are aiming to develop or play with your Oculus Rift when standing. You can use the demonstration scene to test your settings when you have made changes. Once you have completed these steps, your Oculus Rift DK1 headset will be ready to use with Windows 10.

Configuring the Oculus DK1 for Unity Development
You will need a Steam account for this section. If you do not have a Steam account, you can create one here: Download the Steam application and install it on your machine. The Steam application should come equipped with the SteamVR player. You can double check this in your library.

Notice to the right of the search bar, you will see “VR”. You can select between your library applications by clicking on your library. You should see a “VR” option within the dropdown menu.

When you launch your SteamVR application through Steam, you should follow through the tutorial that they have prepared and complete the room setup as soon as possible.

Once you have completed the previous steps and your Oculus DK1 headset is working with Windows 10, you can start using it with applications that support VR. If you want to start developing Oculus games, you can use any version of Unity that is available through their website (

Let’s start by creating a 3D Unity Project (I am using Unity 2017.1.1f1). You are going to need a handful of plug-ins for this to work with your project. Navigate to the Unity Store and search for the “SteamVR” package.

The package in the image above is the package you will need to import in to your project. This package will allow your Unity project to link to the SteamVR application that we installed earlier. Start by importing this plugin in to your project.

The Unity store will prompt you with a warning about overwriting your project settings. For this example, I have gone ahead and done so, as we started a new project.

This window will appear when you start to import the plugin:

Go ahead and import all these assets in to your project.

Before testing any examples that are provided by this plugin, please make sure that you have correctly configured your project’s player settings to support the use of VR. If you haven’t done this yet, you can so by navigating to “Edit -> Project Settings -> Player”.

Your inspector will display all available settings for your player. You will need to make sure that you have enabled the Oculus SDK within the available Virtual Reality SDK section. The OpenVR option should be enabled automatically by Unity. The important section of these settings is this:

The “Virtual Reality Supported” option MUST be enabled, or your project will not support any VR headsets. Once enabled, you can add any available VR SDK in this area by clicking on the + icon in the bottom right. Once clicked, a list of available VR SDKs will appear. For this example, you will need to select the Oculus SDK.
Your SDK list should look like this:

You are now all set to use your Oculus DK1 in Unity. If you would like to test it out, the SteamVR plugin offers an example scenario where you can look around.

Another feature that has been used for this project is the LEAP motion controllers to replace the Oculus controllers that were brought out with the newer versions of the headset. The LEAP motion was not as difficult to implement when using Unity 5.6. The required plug-ins were available on the Unity Asset Store which included examples of how the controllers worked with Unity.
Once the hardware had been setup for the project, there were no problems developing the project to demonstrate the use of older models of Oculus headsets. Firstly, to start the project off, a player needed to be created that utilised the Oculus headset and the LEAP motion controller. A scenario had been created where the player starts in an elevator. As mentioned before, they are presented with a set of instructions that inform them of what they need to do to progress. 

A UI had to be designed to stay within the central view of the cameras on the Oculus VR headset. There were instances of UI usage that would show on PC monitors but would not be duplicated over to display in the VR headset. This UI was mainly used for the instructions that the player had to follow to progress. The elements used for the instructions had to be polished up to demonstrate cleaner text and to ensure that the instructions are more readable to those using the older Oculus VR headset.

Once the project had been setup and was ready to go, the scenario would begin, and the player would start on a platform that had a door which would be closed for the first part of the demonstration. To begin the scenario, the player will have to pull a lever using their hands. After pulling the lever, the platform that the player is on will start to move. Once the platform has finished moving, the door will lower.

After the door has lowered, the player screen will fade to black and the player will be moved to the second area of the scenario where they will be prompted with more instructions before they can start the next part of the demonstration. After the instructions have been sent, the player can begin the next phase of the demonstration by pressing a button that will be clearly marked on a panel to the left of where they are moved to. Once they press the button, they will hear a countdown occur which will trigger a handful of targets to appear after it reaches 0. The player will then have to use the throwable objects provided to hit the targets to increase their score. They only have a certain amount of time to gain a valid score. 

Once the timer runs out, the targets will disappear, and the players will then have to restart the demonstration to try again if they wish to. The main purpose of the project is to demonstrate different events that can be created using the outdated version of the Oculus Rift (The Oculus DK1 Headset) and the LEAP Motion controllers. The project has been created using Unity 5.6 with various plug-ins to support the use of the equipment mentioned before. 

All views and opinions are the guest blogger's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

No comments:

Post a Comment