An Introduction to Virtual Reality

An Introduction to Virtual Reality

You can access the full course here: Build a Micro-VR Game

What is Virtual Reality?

Virtual reality exists on the spectrum of mixed reality. This ranges from the real world to virtual reality.

  • Real world.
  • Augmented Reality (AR) is the rendering of virtual objects on top of the real world (think furniture apps, Pokemon Go, Minecraft Earth, etc).
  • Augmented Virtuality is the rendering of real objects in the virtual world.
  • Virtual Reality (VR) is the rendering of virtual objects in the virtual world.

Mixed Reality flow chart

VR Devices

There are a number of different VR devices out there from different companies. The main companies that are developing VR headsets are: Oculus, Valve/HTC and Microsoft. They each have their own technology that the headsets use and if you’re viewing this course – you most likely own one of these…

Oculus

  • Oculus Rift – Oculus’ flagship device, allowing for positional and rotational tracking as well as two hand controllers. PC powered.
  • Oculus Quest – Similar to the Oculus Rift but runs applications on the in-build Android computer.
  • Oculus Go – More of a casual device, allowing for rotational tracking with one hand controller. Powered by the on-board Android computer.

Valve

  • HTC Vive – Made along side HTC, the Vive features positional and rotational tracking as well as two hand controllers. PC powered.
  • Valve Index – Similar to the Vive, but features new controllers able to detect pressure and individual fingers. PC powered.

Microsoft

  • Windows Mixed-Reality – VR headset with positional and rotational tracking as well as two hand controllers. PC powered.

VR Store Fronts

Alongside the different VR headsets, there are different store fronts. Different online marketplaces where you can publish your games. Each of them allow certain different headsets.

  • Steam
    • Supports: HTC Vive, Valve Index, Oculus Rift and Windows MR.
  • Oculus Store
    • Supports: Oculus Rift, Oculus Quest and Oculus Go.
  • Microsoft Store
    • Supports: Windows MR.

Developing for VR

A good thing about the Unity engine, is that developing for VR is easier than anywhere else. Each of these headsets have their own SDK and way of developing applications. This would result in separate executables for each device you want to develop for.

Chart showing how each headset has its own SDK

With Unity though, the XR API allows us to develop for any VR headset in only one version of the game. Unity does all the hard work of managing the headsets, getting the inputs, rendering the images and allows us to just – develop our game.

Chart showing benefits of Unity XR API

Let’s now get started with setting up our Unity project.

Transcript

Hey, everyone. In this lesson, we’re gonna be over what virtual reality is and a bit of exactly how we can use it in Unity and how it is beneficial to be using it inside of Unity as well.

First of all, what exactly is virtual reality? Well, what you’re seeing here is the mixed reality spectrum. Now it goes from the real world on the left all the way over to virtual reality on the right. In between, we have a few things.

First of all, towards the left, we have augmented reality. This is normally the technology you’d see in things such as mobile devices where virtual objects are placed in the real world. Think Pokemon GO or any sort of application that puts stuff in the world such as furniture apps, measuring apps, or even educational apps. And then there is augmented virtuality. Now this is a lot less common than AR and VR. What this does is this places real-world objects in the virtual world. And then over on the right-hand side, we have virtual reality, which is basically an entirely virtual world that is what you can see and that is what you hear.

Let’s go over now a list of the VR devices. These are the VR devices that we’re gonna be looking at inside of this course. First up, we have the Oculus devices. Now Oculus is one of the leading companies in the VR market. With their devices, we, first of all, have the Oculus Rift. This is you could say their flagship device. There is actually the Oculus Rift and the Oculus Rift S. They do differ in a few separate ways in how the tracking works, but overall the devices work in the same way. If they have six degrees of freedom, which allow them to move in both rotational and positional axes, so we can move around, look around, we can move our hands around, look at them, and so on. So, it’s a pretty immersive technology with the Oculus Rift.

Then we have the Oculus Quest, which is pretty much the same as the Oculus Rift although the Oculus Quest relies on an inbuilt computer rather than one that you would plug your headset into. So, this is entirely wireless, and it works on the device inside of the headset.

And then there is the Oculus Go, which is more of a casual VR device. This is mainly used for light gaming and media consumption. Like the Oculus Quest, it has a computer built into the headset, but this doesn’t have a positional tracking or multi-hand controllers. It only has one-hand controller, which only tracks in the rotational space.

After we have Oculus, we then have the Valve headsets. First up, we have the HTC Vive. Now this is a headset that was made in partnership with HTC. That’s why their name’s in the title as well. The HTC Vive could be compared very similarly to the Oculus Rift as it has its six degrees of freedom, you can move around, you can look around, and it has a similar tracking system in place.

Then we have the Valve Index. This is Valve’s most recent headset. Again, this has six degrees of freedom, you have the controllers, although this headset now has a higher resolution, higher refresh rates, additional features, and some brand new controllers, which actually are sensitive to each finger. So, it can track each finger on the hand controller.

Finally, after Valve, we have Microsoft who has their Windows Mixed Reality headset. The Mixed Reality headset, it could be compared to the Oculus Rift S, similar technology in the way it works as it has the tracking built into the headset rather than requiring outside sources, and this is also PC-powered.

So, we got these devices. These are the ones that we’ll be looking at during this course. I’ll be showing you how you can build your Unity project to work on these devices and how to run some of them inside of the editor. Actually before we go on, I do wanna note that we won’t actually specifically go over the Valve Index as the process of building and setting up Unity to work with the Valve Index is the exact same as the HTC Vive. So, you could kinda put those into a bundle for themselves.

All right. Now that we’ve gone over that, let’s go over the various VR storefronts. There are three main ones. We have the Steam store, we have the Oculus store, and we have the Microsoft Store. Now each of these support a number of different headsets. So, it is good to note which store you might wanna publish on.

First up, you have the Steam store, which probably has the most diverse amount of headsets that it can accept and that you can run on it. You have the HTC Vive, the Valve Index, the Oculus Rift, and the Windows Mixed Reality headset. This is due to Steam having their OpenVR technology, which allows developers to pretty much build to any sort of these devices that can then be played on Steam. So, all games that are developed on the OpenVR platform, on the OpenVR API can actually support all these devices listed right here.

Then on the Oculus store, these are of course limited to just the Oculus apps. So, we have the Rift, the Quest, and the Go. Finally, the Microsoft Store is limited to just the Microsoft Reality headset. So, these are the various store fronts.

Next up, we have developing for VR. Now we’re gonna be developing our VR application inside of Unity. I’ll show you why Unity is probably the best platform to develop your VR application. Let’s just say you want to make an application for all the different headsets. Let’s just say you had a VR app and you wanted to develop for each one. Well, thing of that is that not all these devices necessarily support each other. With the Oculus Rift, you’d have to use the Oculus SDK to then create an Oculus Rift app. Then the Vive, you’d have to use the Valve Vive SDK to develop that. And then the Windows MR, you’d have to then use the Windows SDK to develop a Windows MR application.

But the good thing about Unity is that we don’t have to worry about specific devices. We’re not developing. Let’s just say we’re in Unity and we want to track hand controls. We don’t have to go okay, let’s make sure we’re tracking the Valve controllers, let’s make sure we’re tracking the Rift controllers, and so on and so forth. We don’t have to do any of that. We just have to track VR controllers because Unity does all of this behind the scenes in the Unity XR API. ‘Cause in Unity, we are not developing for a specific platform or a specific list of platforms necessarily. We are just developing for VR.

With this in mind, Unity can then build an application that can then be ran on pretty much every headset that supports head tracking, head rotation, and stuff like that. Now there are individual SDKs that we can still implement if we do wanna access more in-depth features for each of these platforms. For the Oculus Rift, you might want to access play avatars. In that case, you would then have to install the Oculus SDK and access it from there. But if you want the basics of being able to look around, move around, use the controllers, and interact with the buttons and things in the VR world, then you can do that entirely using the Unity XR API, which is what we’re gonna be doing in this course with the Zenva VR library.

The Zenva VR library is a VR library that was made here at Zenva using the Unity XR API. So, we’ll be going through that. We’ll be downloading it. And then pretty much from there, we’ll just be doing drag and drop component and prefabs to quickly get together a VR application that we can run on our specific device. Thanks for watching, and I’ll see you all in the next lesson where we start to actually develop our VR project.

Interested in continuing? Check out the full Build a Micro-VR Game course, which is part of our Virtual Reality Mini-Degree.