Book Image

Cardboard VR Projects for Android

By : Jonathan Linowes, Matt Schoen
Book Image

Cardboard VR Projects for Android

By: Jonathan Linowes, Matt Schoen

Overview of this book

Google Cardboard is a low-cost, entry-level media platform through which you can experience virtual reality and virtual 3D environments. Its applications are as broad and varied as mobile smartphone applications themselves. This book will educate you on the best practices and methodology needed to build effective, stable, and performant mobile VR applications. In this book, we begin by defining virtual reality (VR) and how Google Cardboard fits into the larger VR and Android ecosystem. We introduce the underlying scientific and technical principles behind VR, including geometry, optics, rendering, and mobile software architecture. We start with a simple example app that ensures your environment is properly set up to write, build, and run the app. Then we develop a reusable VR graphics engine that you can build upon. And from then on, each chapter is a self-contained project where you will build an example from a different genre of application, including a 360 degree photo viewer, an educational simulation of our solar system, a 3D model viewer, and a music visualizer. Given the recent updates that were rolled out at Google I/O 2016, the authors of Cardboard VR Projects for Android have collated some technical notes to help you execute the projects in this book with Google VR Cardboard Java SDK 0.8, released in May 2016. Refer to the article at https://www.packtpub.com/sites/default/files/downloads/GoogleVRUpdateGuideforCardbook.pdf which explains the updates to the source code of the projects.
Table of Contents (16 chapters)
Cardboard VR Projects for Android
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Why is it called Cardboard?


It all started in early 2014 when Google employees, David Coz and Damien Henry, in their spare time, built a simple and cheap stereoscopic viewer for the Android smartphones. They designed a device that can be constructed from ordinary cardboard, plus a couple of lenses for your eyes, and a mechanism to trigger a button "click." The viewer is literally made from cardboard. They wrote software that renders a 3D scene with a split screen: one view for the left eye, and another view, with offset, for the right eye. Peering through the device, you get a real sense of 3D immersion into the computer generated scene. It worked! The project was then proposed and approved as a "20% project" (where employees may dedicate one day a week for innovations), funded, and joined by other employees.

Note

Two sources of "canonical" facts about the story behind how Cardboard came into existence are as follows:

In fact, Cardboard worked so well that Google decided to go forward, taking the project to the next level and releasing it to the public a few months later at Google I/O 2014. The following figure shows a typical unassembled Google Cardboard kit:

Since its inception, Google Cardboard has been accessible to hackers, hobbyists, and professional developers alike. Google open sourced the viewer design for anyone to download the schematics and make their own, from a pizza box or from whatever they had lying around. One can even go into business selling precut kits directly to consumers. An assembled Cardboard viewer is shown in the following image:

The Cardboard project also includes a software development kit (SDK) that makes it easy to build VR apps. Google has released continuous improvements to the software, including both a native Java SDK as well as a plugin for the Unity 3D game engine (https://unity3d.com/).

Since the release of Cardboard, a huge number of applications have been developed and made available on the Google Play Store. At Google I/O 2015, Version 2.0 introduced an upgraded design, improved software, and support for Apple iOS.

Google Cardboard has rapidly evolved in the eye of the market from an almost laughable toy into a serious new media device for certain types of 3D content and VR experiences. Google's own Cardboard demo app has been downloaded millions of times from the Google Play Store. The New York Times distributed about a million cardboard viewers with its November 8, Sunday issue back in 2015.

Cardboard is useful for viewing 360-degree photos and playing low-fidelity 3D VR games. It is universally accessible to almost anyone because it runs on any Android or iOS smartphone.

Developers are now integrating 3D VR content directly into Android apps. Google Cardboard is a way of experiencing virtual reality that is here to stay.