Getting started with a VR headset and Leap Motion

This section is for beginners who haven't worked with VR headsets or Leap Motion yet. A VR headset is a head-mounted display, in which we can put a smartphone, or which has a built-in display that can be connected to HDMI or some other display port. A VR headset can create a virtual 3D environment by mimicking human vision, that is, stereo vision.

Human vision works like this: we have two eyes and get two separate and slightly different images in each eye. The brain then combines these two images and generates a 3D image of the surroundings. Similarly, VR headsets have two lenses and a display. The display can be inbuilt or a smartphone. This screen will show a separate view of the left and right images, and when we put the smartphone or built-in display into the headset, it will focus and reshape using two lenses and will simulate 3D stereoscopic vision.

In effect, we can explore a 3D world inside this headset. In addition to visualizing the world, we can also control the events in the 3D world and hear sounds too. Cool, right?

Here is the internal structure of a Google Cardboard VR headset:

Google Cardboard VR headset (source: https://commons.wikimedia.org/wiki/File:Google-Cardboard.jpg)

There are a variety of VR headsets models available, including high-end models such as Oculus Rift, HTC Vive, and more. The following photograph shows one of these VR headsets, which we will use in this chapter. It follows the principle of Google Cardboard, but rather than cardboard, it uses a plastic body:

Oculus Rift (source: https://commons.wikimedia.org/wiki/File:Oculus-Rift-CV1-Headset-Front.jpg)

You can test the VR feature of the headset by downloading Android VR applications from Google Play Store.

You can search for Cardboard in Google Play Store to get the Google VR application. You can use it for testing VR on your smartphone.

The next device we will use in this project is the Leap Motion controller (https://www.leapmotion.com/). The Leap Motion controller is essentially an input device like a PC mouse, in which we can control everything using hand gestures. The controller can accurately track the two hands of a user and map the position and orientation of each finger joint accurately. It has two IR cameras and several IR projectors facing upward. The user can position their hand above the device and then move their hand. The position and orientation of the hands and fingers can be accurately retrieved from their SDK.

Here is an example of the Leap Motion controller and how we can interact with it:

Interacting with the Leap Motion controller (source: https://www.flickr.com/photos/davidberkowitz/8598269932. Image by David Berkowitz. Licensed under Creative Commons CC-BY 2.0: https://creativecommons.org/licenses/by/2.0/legalcode)

Let's now look at the design of our project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.108.236