Introduction to Virtual Reality
Ever wanted to meet a blue whale under the ocean? Maybe you’re a fan of fighting off space pirates? Rally racing? Spy missions? Zombie apocalypse? All of these are yours to explore and create, and the only thing you need is a virtual reality headset to take you there.
What is VR?
So what is virtual reality, or VR? It simulates a virtual world by using anything from rooms filled with projectors, to display goggles with a monitor for each eye.
VR has been around for decades, but in 2017 its accessibility, quality and amount of available content have all skyrocketed. This is because of the three popular headsets: the HTC Vive, Oculus Rift, and Playstation VR.
How to Try It
Ultimately, no words can explain a VR experience. If you’re interested in diving in, here are a few good options to get you started.
ACM VRCG — If you’re a UCLA student, the VRCG (Virtual Reality and Computer Graphics) committee of ACM is a great place to try out high quality VR with the HTC Vive. Follow them on their Facebook page to get their meeting times.
Store Demos — If you can’t make any of the meetings, you can check out some stores hosting demos for both the HTC Vive and Oculus Rift. For the HTC Vive, your best bet in LA is GameStop. Some of the demo locations are in Culver City and West Hollywood. As for the Oculus Rift, the Microsoft Store in Westfield Century Mall offers demos as well as a few other locations. Make sure to call in advance to guarantee a VR demo experience.
Mobile VR — If you want a more affordable option, but at the expense of some quality, mobile phone VR headsets may be the choice for you.
- Google Cardboard — This is the cheapest option for mobile VR at $15. Google Cardboard headsets are small cardboard boxes with lenses used to convert your phone into a VR display. While they aren’t the comfiest piece of eyewear around, they do a good job of demonstrating the basic capabilities of VR for a low price.
- Google Daydream/Samsung Gear VR — If you have a phone that supports either headset, Google Daydream and the Samsung Gear VR are two higher quality options for mobile VR. This increase in quality comes with an increase in cost, but it may be a good follow-up headset after trying Google Cardboard.
(Warning: Don’t take any mobile VR experiences to be representative of what modern VR technology is capable of. The gap between mobile VR and headsets such as the HTC Vive and Oculus Rift is pretty vast, and you should try out both before coming to any conclusions about VR.)
How to Create
When developing for VR, many of the tools that you’ll be working with are identical to the tools used for game development. That’s because most VR experiences are real-time graphics applications. There are two major game engines: Unity and Unreal.
Game Development Essentials
Whether you choose Unity or Unreal, learning general game development is helpful before diving into VR. While this might be a bit of a slow start for those only interested in VR, there are a few good reasons for this.
- Most tutorials/forums will be dedicated to standard game development
- Debugging and iteration is exceptionally faster outside of VR
- It helps to learn the basics of the engine before focusing on the quirks associated with VR
There are many resources online to get started with either Unity or Unreal. Here are a few of the most popular ones:
Unity website — The Unity website is full of great tutorials that introduce game development. One of the most common tutorials that new developers do is the Roll-a-Ball tutorial. This tutorial walks through many of the core principles of Unity development, including some C# scripting, physics, game objects, etc. There are also more focused tutorials for those looking to get help in a specific area.
Unreal website — Unreal Engine offers a similar tutorials page to Unity with both beginner projects and specific topics. When starting out with Unreal, pick a 3D tutorial that interests you and go for it, because all of the skills you learn from 3D game development will be applicable in VR.
Lynda.com — Through UCLA, all students get access to Lynda.com and its wide range of video tutorials. On Lynda there are tutorial series covering both Unity and Unreal, called the “Essentials” series. These tutorials don’t focus on coding, but rather on creating interesting and unique worlds using the game engines. For anyone interested in level/world design, this is a great starting point.
After learning the basics of game development, VR development is only a few quick changes away. A great place to start is the VR tutorials on the Unity and Unreal webpages.
Coming from a Unity background, I’ll walk through what is needed to set up Unity to develop an application for the HTC Vive.
Step 1: Install Plugins through the Unity Asset Store
SteamVR Plugin — This is the main plugin for creating HTC Vive applications in Unity. Created by Valve, this official plugin provides useful premade VR game objects and components.
VRTK (Virtual Reality Toolkit) — The VRTK makes development with the HTC Vive easier by providing useful scripts that save you the hassle of looking through the SteamVR documentation. These scripts expose input, allow interaction with virtual objects, and provide multiple locomotion techniques.
Step 2: Drag and Drop
After getting these in your project, drag the “CameraRig” from the SteamVR Plugin into the scene.
Boom! VR enabled. You can now hit play, with a headset plugged in, then move and look around your virtual environment. Pretty easy, huh?
If you want to make more complex interactions, such as picking up virtual objects, take a peek at one of the example scenes from VRTK and see how they have their scene set up. Recreating their setup in your original scene will let you quickly get some basic interactions up and running.
And just like that you’ve transported your experience from a monitor to virtual reality. Most of the time, VR development will be very similar to game development but with different input methods, and camera movement bound to the player’s head.
Where to Develop
Come to ACM VRCG if you want to start development on the HTC Vive. All you need to do is sign up for a time slot and you can have access to the necessary hardware (computer, monitor, and Vive) to start creating for VR. You can also ask VRCG members for help and clarification while developing your VR experience.
If you’re more interested in mobile VR, stay tuned for ACM VRCG’s Google Cardboard workshops beginning next quarter. To get a headstart, check out Google’s VR SDK for Unity. This is what will be used in the tutorials next quarter.
After figuring out the VR setup for your respective engine and headset, there are a few extra things to consider when developing something for VR:
- People tend to get sick easily in VR, so think carefully about movement. While VR gives the potential to travel in new and exciting ways, sometimes this virtual motion can be a bit too new and exciting for our brains to handle, causing simulator sickness. For this reason, movement options such as teleportation have become popular for traversing virtual spaces in VR.
- People trust you to make a safe experience. If your experience is in a light hearted meadow, don’t pop in out of nowhere with a jump scare. Managing expectations is important for VR, and being inconsiderate could cause serious mental distress to some users.
And there you go! You now know the basics of VR and where to get started. It is an amazing medium for expression and creativity, where new things are discovered every week. If you’re at all interested, try it out! You won’t be disappointed.
(Special thanks to Jenna Haag for her help)