Skip to main content
Top

2020 | Book

Virtual Reality with VRTK4

Create Immersive VR Experiences Leveraging Unity3D and Virtual Reality Toolkit

insite
SEARCH

About this book

Virtual reality is quickly becoming the next medium to communicate your ideas. Once siloed in make-believe world of science fiction, virtual reality can now touch any aspect of your life. This book shows you how to create original virtual reality content using the Unity game engine and the Virtual Reality Tool Kit. By the end of the book you'll be creating your own virtual reality experience using the fundamental building blocks within.

You'll start by reviewing spatial computing, an emerging field that encompasses self-driving cars to space exploration. You'll also create your own virtual reality environments for use on headsets such as those from Oculus and HTC. Using the Unity3D game engine and the Virtual Reality Toolkit on a computer or laptop, you will walk through the fundamentals of virtual reality with as little code as possible. That is the beauty of Unity and the Virtual Reality Toolkit. You will discover how to use buttons in a virtual space, gaze-tracking for user input, and physics for enabling interaction between a human and a virtual space.

From game design to education to healthcare to human resources, virtual reality offers new and creative ways to engage users, students, patients, customers, and more. Not a coding book, Virtual Reality with VRTK4 shows that you don't need to be a computer or graphics whiz to begin creating your own virtual reality experiences.

What You'll Learn

Grasp Virtual Reality Toolkit and its interaction with Unity3DExplore the fundamental science of virtual realityReview the inner workings of Unity3D and its integration with VRTKUnderstand the big picture of C# coding in Unity3DIncorporate head and hand movement into virtual experiences

Who This Book Is For

Creative professionals or students who are familiar with computer design programs and want to begin prototyping their own original virtual reality work as quickly as possible.

Table of Contents

Frontmatter
Chapter 1. Setup
Abstract
To begin developing immersive experiences with Unity and VRTK, we must first download and install the required tools. These tools include: Unity, an integrated development environment (IDE), and Git for either Windows or Mac.
Rakesh Baruah
Chapter 2. The Virtual Camera
Abstract
In Chapter 1, you left off running the sample scene prepackaged with VRTK. Although the VRTK demo scene is pretty nifty, it might not have been what you imagined the immersive power of VR could fully create.
Rakesh Baruah
Chapter 3. Game Objects, Components, and an Introduction to C# Scripting
Abstract
In Chapter 2, we created a simple VR experience called GlobeHopper, in which we placed a user in the middle of a 360-degree still image. It’s all well and good that as Priyanka in our user story we created a way to share a 360-degree photograph from our trip out to the U.S. West. What if we wanted to heighten our immersive, static photo with something more virtual, though?
Rakesh Baruah
Chapter 4. Doin’ Thangs: Input, Events, and Action
Abstract
If this was a book just about developing in Unity, you’d find an exercise here asking you to wire up a button that responds to a user input with some kind of action. That would be cool, and you’d feel good about your understanding of such an elegant process. However, later, when you sit down to create your own VR experience, you would find that there are many more events you have to publish and subscribe to than you realized. Further, defining each one would send you deep into tinkering with code. Plenty of developers can confidently do this with nothing but Red Bull and a neck pillow, but we are more interested in getting our apps up and running quickly so that we can rapidly prototype and share our experiences. This is why VRTK suits our needs nicely.
Rakesh Baruah
Chapter 5. Keyboard Input as Action
Abstract
In Chapter 4 we laid the groundwork for better understanding the Unity Event System and its integration with VRTK. For me, it’s helpful to think of events as messages sent between classes and objects to notify different components of a program that a change has occurred. Because user input into our VR applications alters the state of the program, it, too, is an event. As an event, user input fits nicely into the list of responsibilities handled by VRTK as an interface for the Unity Event System.
Rakesh Baruah
Chapter 6. Controller Button Inputs as Actions
Abstract
So far, we’ve set up virtual cameras in our scene that connect to the user’s head-mounted display. We’ve also added interactive game objects to our scene and wired them up to user input through the keyboard. But this is VR. We’re not here to use keyboards. We want to use touch controllers.
Rakesh Baruah
Chapter 7. Trigger Input Through One-Dimensional Axis Actions
Abstract
What a mouthful, huh? One-dimensional axis actions. It sounds more complicated than it is. Hopefully, by the end of this chapter you will agree.
Rakesh Baruah
Chapter 8. Interactors and Interactables
Abstract
In the previous chapter we connected a VRTK 1D Axis Action component to the right trigger button of our touch controller. Unlike buttons, triggers communicate a continuum of data to our programs. However, many times the extra information conveyed through a range of float values is not only unnecessary for a VR application, but also unhelpful. Fortunately, VRTK offers a component to convert a trigger event from a collection of float values to a single boolean value of either on or off.
Rakesh Baruah
Chapter 9. Movement in VR
Abstract
We’ve made it. Here begins the final chapter in our journey together. We’ve gone from an introduction of the vertex to the creation of interactive VR scenes with dynamic UI text. What’s taken me four years to understand, you hopefully have grasped within the confines of these pages. There’s still one more feature of VR design that we have not addressed.
Rakesh Baruah
Backmatter
Metadata
Title
Virtual Reality with VRTK4
Author
Rakesh Baruah
Copyright Year
2020
Publisher
Apress
Electronic ISBN
978-1-4842-5488-2
Print ISBN
978-1-4842-5487-5
DOI
https://doi.org/10.1007/978-1-4842-5488-2

Premium Partner