Book Image

Unity Virtual Reality Projects

By : Jonathan Linowes
Book Image

Unity Virtual Reality Projects

By: Jonathan Linowes

Overview of this book

What is consumer “virtual reality�? Wearing a head-mounted display you view stereoscopic 3D scenes. You can look around by moving your head, and walk around using hand controls or motion sensors. You are engaged in a fully immersive experience. On the other hand, Unity is a powerful game development engine that provides a rich set of features such as visual lighting, materials, physics, audio, special effects, and animation for creating 2D and 3D games. Unity 5 has become the leading platform for building virtual reality games, applications and experiences for this new generation of consumer VR devices. Using a practical and project-based approach, this book will educate you about the specifics of virtual reality development in Unity. You will learn how to use Unity to develop VR applications which can be experienced with devices such as the Oculus Rift or Google Cardboard. We will then learn how to engage with virtual worlds from a third person and first person character point of view. Furthermore, you will explore the technical considerations especially important and possibly unique to VR. The projects in the book will demonstrate how to build a variety of VR experiences. You will be diving into the Unity 3D game engine via the interactive Unity Editor as well as C-Sharp programming. By the end of the book, you will be equipped to develop rich, interactive virtual reality experiences using Unity. So, let's get to it!
Table of Contents (18 chapters)
Unity Virtual Reality Projects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
11
What's Next?
Index

Types of head-mounted displays


Presently, there are two basic categories of head-mounted displays for virtual reality—desktop VR and mobile VR.

Desktop VR

With desktop VR (and console VR), your headset is a peripheral to a more powerful computer that processes the heavy graphics. The computer may be a Windows PC, Mac, Linux, or a game console. Most likely, the headset is connected to the computer with wires. The game runs on the remote machine and the head-mounted display (HMD) is a peripheral display device with a motion sensing input. The term desktop is an unfortunate misnomer since it's just as likely to be stationed in either a living room or a den.

The Oculus Rift (https://www.oculus.com/) is an example of a device where the goggles have an integrated display and sensors. The games run on a separate PC. Other desktop headsets include HTC/Valve Vive and Sony's project Morpheus for PlayStation.

The Oculus Rift is tethered to a desktop computer via video and USB cables, and generally, the more graphics processing unit (GPU) power, the better. However, for the purpose of this book, we won't have any heavy rendering in our projects, and you can get by even with a laptop (provided it has two USB ports and one HDMI port available).

Mobile VR

Mobile VR, exemplified by Google Cardboard (http://www.google.com/get/cardboard/), is a simple housing (device) for two lenses and a slot for your mobile phone. The phone's display is used to show the twin stereographic views. It has rotational head tracking, but it has no positional tracking. Cardboard also provides the user with the ability to click or tap its side to make selections in a game. The complexity of the imagery is limited because it uses your phone's processor for rendering the views on the phone display screen. Other mobile VR headsets include Samsung Gear VR and Zeiss VR One, among others.

Google provides the open source specifications, and other manufacturers have developed ready-made models for purchase, with prices for the same as low as $15. If you want to find one, just Google it! There are versions of Cardboard-compatible headsets that are available for all sizes of phones—both Android and iOS.

Although the quality of the VR experience with a Cardboard device is limited (some even say that it is inadequate) and it's probably a "starter" device that will just be quaint in a couple of years, Cardboard is fine for the small projects in this book, and we'll revisit its limitations from time to time.