Learning Virtual Reality

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.

If you’re an experienced programmer familiar with mobile development, this book will help you gain a working knowledge of VR development through clear and simple examples. Once you create a complete application in the final chapter, you’ll have a jumpstart on the next major entertainment medium.

  • Learn VR basics for UI design, 3D graphics, and stereo rendering
  • Explore Unity3D, the current development choice among game engines
  • Create native applications for desktop computers with the Oculus Rift
  • Develop mobile applications for Samsung’s Gear VR with the Android and Oculus Mobile SDKs
  • Build browser-based applications with the WebVR Javascript API and WebGL
  • Create simple and affordable mobile apps for any smartphone with Google’s Cardboard VR
  • Bring everything together to build a 360-degree panoramic photo viewer

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Audience
    2. How This Book Is Organized
    3. Updates for the Revised Edition
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. 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. The CV1
      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 Displays
      3. Presenting Content to the VR Display
      4. Refreshing the VR Display
      5. 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 Google VR SDK for Android
      1. Setting Up the Environment
      2. Walking Through the Code
    4. Developing with the Google VR 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 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

Product information

  • Title: Learning Virtual Reality
  • Author(s): Tony Parisi
  • Release date: October 2015
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491922781