Book Description

As virtual reality approaches mainstream consumer use, a vibrant development ecosystem has emerged in the past few years. This hands-on guide takes you through VR development essentials for desktop, mobile, and browser-based applications. You’ll explore the three go-to platforms—OculusVR, Gear VR, and Cardboard VR—as well as several VR development environments, programming tools, and techniques.

Table of Contents

  1. Preface
    1. Audience
    2. How This Book Is Organized
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Books Online
    6. How to Contact Us
    7. Acknowledgments
  2. 1. Introduction
    1. What Is Virtual Reality?
      1. Stereoscopic Displays
      2. Motion Tracking Hardware
      3. Input Devices
      4. Computing Platforms
    2. Virtual Reality Applications
    3. Chapter Summary
  3. 2. Virtual Reality Hardware
    1. Oculus Rift
      1. The DK1
      2. The DK2
      3. Crescent Bay
      4. Setting Up Your Oculus Rift
    2. Other High-End Head-Mounted Displays
    3. Samsung Gear VR: Deluxe, Portable Virtual Reality
      1. The Oculus Mobile SDK
    4. Google Cardboard: Low-Cost VR for Smartphones
      1. Stereo Rendering and Head Tracking with Cardboard VR
      2. Cardboard VR Input
      3. Developing for Google Cardboard
    5. VR Input Devices
    6. Chapter Summary
  4. 3. Going Native: Developing for Oculus Rift on the Desktop
    1. 3D Graphics Basics
      1. 3D Coordinate Systems
      2. Meshes, Polygons, and Vertices
      3. Materials, Textures, and Lights
      4. Transforms and Matrices
      5. Cameras, Perspective, Viewports, and Projections
      6. Stereoscopic Rendering
    2. Unity3D: The Game Engine for the Common Man
    3. Setting Up the Oculus SDK
      1. Setting Up Your Unity Environment for Oculus Development
    4. Building Your First VR Example
      1. Building and Running the Application
      2. Walking Through the Code
    5. Chapter Summary
  5. 4. Going Mobile: Developing for Gear VR
    1. The Gear VR User Interface and Oculus Home
    2. Using the Oculus Mobile SDK
      1. Setting Up the Android SDK
      2. Generating an Oculus Signature File
      3. Setting Up Your Device for USB Debugging
    3. Developing for Gear VR Using Unity3D
      1. Setting Up Your Unity3D Environment
      2. A Simple Unity3D Sample
      3. Handling Touchpad Events
    4. Deploying Applications for Gear VR
    5. Chapter Summary
  6. 5. WebVR: Browser-Based Virtual Reality in HTML5
    1. The Story of WebVR
    2. The WebVR API
      1. Supported Browsers and Devices
      2. Querying for VR Devices
      3. Setting Up VR Fullscreen Mode
      4. Head Tracking
    3. Creating a WebVR Application
      1. Three.js: A JavaScript 3D Engine
      2. A Full Example
    4. Tools and Techniques for Creating Web VR
      1. WebVR Engines and Development Tools
      2. Using Unity3D and Unreal for WebVR Development
      3. Open Source Libraries and Frameworks
    5. WebVR and the Future of Web Browsing
    6. Chapter Summary
  7. 6. VR Everywhere: Google Cardboard for Low-Cost Mobile Virtual Reality
    1. Cardboard Basics
      1. Supported Devices and Operating Systems
      2. Headset Manufacturers
      3. Cardboard Applications
      4. Input Devices for Cardboard
    2. Cardboard Stereo Rendering and Head Tracking
    3. Developing with the Cardboard SDK for Android
      1. Setting Up the Environment
      2. Walking Through the Code
    4. Developing with the Cardboard SDK for Unity
      1. Setting Up the SDK
      2. Building Treasure Hunt for Unity
      3. A Walkthrough of the Unity Code
    5. Developing Cardboard Applications Using HTML5 and a Mobile Browser
      1. Setting Up the WebVR Project
      2. The JavaScript Cardboard Code
    6. Chapter Summary
  8. 7. Your First VR Application
    1. About 360-Degree Panoramas
    2. Setting Up the Project
      1. Getting the Software, Hardware, and Sample Code
      2. Creating the Unity Scene and Project
    3. Adding Cardboard VR Support
    4. Creating a Gaze-and-Tap User Interface
      1. Creating a 2D Plane
      2. Adding Input Support to the Project
      3. Creating an Event Handler Script
      4. Handling Magnet Switch Events
      5. Creating the Functioning User Interface
    5. Where to Take the Project from Here
    6. Chapter Summary
  9. A. Resources
    1. Headsets, Input Devices, and Video Capture Systems
      1. Headsets
      2. Input Devices
      3. 360 Video
    2. Applications and Content
      1. Flagship Experiences
      2. Noteworthy Companies
      3. Download Sites
      4. WebVR Showcases and Applications
    3. SDKs, Development Tools, and Programming Languages
      1. Device SDKs
      2. Game Engine Middleware
      3. Programming Languages
      4. Software Frameworks
    4. Websites
    5. Meetup Groups
  10. Index