What this book covers
Chapter 1, Virtual Reality for Everyone, defines Google Cardboard, explores it, and discusses how it's used and how it fits in the spectrum of VR devices.
Chapter 2, The Skeleton Cardboard Project, examines the structure of a Cardboard app for Android, takes a tour of Android Studio, and helps you build a starter Cardboard project by introducing the Cardboard Java SDK.
Chapter 3, Cardboard Box, discusses how to build a Cardboard Android app from scratch (based on Google's Treasure Hunt sample) with a 3D cube model, transformations, stereoscopic camera views, and head rotations. This chapter also includes discussions of 3D geometry, Open GL ES, shaders, matrix math, and the rendering pipeline.
Chapter 4, Launcher Lobby, helps you build an app to launch other Cardboard apps on your phone. Rather than using 3D graphics, this project simulates stereoscopic views in screen space and implements gaze-based selections.
Chapter 5, RenderBox Engine, shows you how to create a small graphics engine used to build new Cardboard VR apps by abstracting the low-level OpenGL ES API calls into a suite of the Material
, RenderObject
, Component
, and Transform
classes. The library will be used and further developed in subsequent projects.
Chapter 6, Solar System, builds a Solar System simulation science project by adding a sunlight source, spherical planets with texture mapped materials and shaders, animating in their solar orbits, and a Milky Way star field.
Chapter 7, 360-Degree Gallery, helps you build a media viewer for regular and 360-degree photos, and helps you load the phone's camera folder pictures into a grid of thumbnail images and use gaze-based selections to choose the ones to view. It also discusses how to add process threading for improved user experience and support Android intents to view images from other apps.
Chapter 8, 3D Model Viewer, helps you build a viewer for 3D models in the OBJ file format, rendered using our RenderBox library. It also shows you how to interactively control the view of the model as you move your head.
Chapter 9, Music Visualizer, builds a VR music visualizer that animates based on waveform and FFT data from the phone's current audio player. We implement a general architecture used to add new visualizations, including geometric animations and dynamic texture shaders. Then, we add a trippy trails mode and multiple concurrent visualizations that transition in and out randomly.