Contents

Preface

Acknowledgments

About the Author

1 VR and AR

Immersive Computing

VR and AR

Media Archaeology

Stereoptics

Pre-Cinema Animation

Computing

Twentieth Century VR

Google VR and AR

Daydream VR

ARCore

Summary

2 Daydream and Unity

Getting to Know Unity

What Is Unity?

Why Unity?

Exploring the Unity Editor

Exploring Unity Concepts

GameObjects

Components

Prefabs

Scripts

MonoBehaviour

Accessing Variables in the Inspector

Daydream Development

Daydream Development Environment

Daydream Hardware

Google VR SDK

Setting Up Your Daydream Developer Environment

Installing the Android SDK and Java JDK in Unity

Installing the Google VR SDK for Unity

Troubleshooting Setup and Installation Issues

Daydream Elements

Recipe 2.1: Installing Elements

Recipe 2.2: Setting Up Daydream Instant Preview

Recipe 2.3: Setting Up a Daydream Controller Emulator

Recipe 2.4: VR Developer Options

Core Daydream Components

GvrEditorEmulator (Prefab)

GvrControllerMain (Prefab)

GvrControllerPointer (Prefab)

GvrEventSystem (Prefab)

GvrPointerPhysicsRaycaster (Script)

GvrPointerGraphicsRaycaster (Script)

Setting Up a Player in VR

Recipe 2.5: Building a VR Player in the First Person

Recipe 2.6: Traveling via Teleportation

Recipe 2.7: Customizing the Teleportation System

Recipe 2.8: Setting Up the Chase Camera

Recipe 2.9: Using a Tunneling Effect to Combat Motion Sickness

Summary

3 Getting to Know the Daydream Controller

Getting to Know the Daydream Controller

Why the Controller?

How the Controller Works

Controller Support

Controlling the Controller

Handling the Controller API

Basic Interaction

Visualizing the Controller

Summary

4 Building UI in VR

Designing User Interfaces in VR

User Experience Design in VR

Ergonomics

Daydream’s Design System: dmm

UI, Unity, and the Google VR SDK

Canvas

Rect Transform

Rect Tool

GvrPointerGraphicsRaycaster

Building the UI

Recipe 4.1: Adding a Canvas in dmms

Recipe 4.2: Adding an Image

Recipe 4.3: Adding Text

Recipe 4.4: Adding a Button

Recipe 4.5: Implementing a Game Menu

UI Layouts in VR

Recipe 4.6: Creating an Animated Cell

Recipe 4.7: Cell Tilt and Hover Effect

Recipe 4.8: Cell Masking Animation Effect

Recipe 4.9: Horizontal Layout

Recipe 4.10: Nested Layouts

Recipe 4.11: Grid Layout

Recipe 4.12: Multipanel Scrolling Layout

Summary

5 Video and Audio

Video in Daydream

Video in VR

Streaming Video

Daydream and Video

Audio in Daydream

Summary

6 Physics Games

Physics, Games, Daydream, and Unity

Unity Physics

Rigidbody Component

Colliders

Handling Collision Events

Fixed Update

Profiling

Building the Games

Recipe 6.1: Intro to Physics—Flipping Pancakes

Recipe 6.2: Building a Pop Gun Mechanic

Recipe 6.3: Building a Grenade Mechanic

Recipe 6.4: Weapon Selector

Building an Alien Shooter Game

Recipe 6.5: Building the Core Mechanic

Turning It into a Game

Recipe 6.6: Building the UI and Finishing the Game

Where to Go from Here

Summary

7 ARCore

Augmented Reality

AR and UX

Lessons, Principles, and Practice

Key Technologies in ARCore

Motion Tracking

Environmental Understanding

Light Estimation

ARCore and Unity

ARCore Classes

ARCore Unity Components

ARCore Recipes

Recipe 7.1 Installing and Running ARCore

Recipe 7.2 Building an ARCore Template Scene

Recipe 7.3 Selecting and Dragging Objects along a Plane

Recipe 7.4 Dragging Objects with Physics Weight

Recipe 7.5 Selecting an Object and Rotating It

Recipe 7.6: Creating a Target Below the Landing Position of the Dragged Object

Recipe 7.7 Retrieving All GameObjects Attached to an Anchor

Recipe 7.8 Retrieving All GameObjects Attached to a Trackable

Recipe 7.9 Hiding the Tracked Surface Visualization

Recipe 7.10 Getting the Y Position of the Lowest Plane

Recipe 7.11 Attaching Objects to Non-Horizontal Surfaces

Recipe 7.12: Customizing the Surface Visualization

Recipe 7.13 Pinching to Scale a GameObject

Recipe 7.14: Handling AR Tracking State

Summary

8 AR Apps

AR Applications

Building User-Centered AR Apps

Recipe 8.1: Creating an AR Drawing App

ARCore and the Poly Toolkit

Poly Toolkit and Poly API

Recipe 8.2: Integrating the Poly Toolkit with ARCore and Unity

Recipe 8.3: Using Poly Toolkit Runtime

Recipe 8.4: Creating an AR Shopping Catalogue App

Summary

9 AR Games

Types of AR Games

AR Game Lifecycle

Recipe 9.1 AR Tabletop Game

Building the Loader Scene

Building the Level Scene

Summary

10 Optimization and Performance

Optimization Strategy

Isolating Bottlenecks

Fixing Bottlenecks

Profile Early, Profile Often

Tools for Analyzing and Optimizing

Analyzing

Optimizing: Daydream Renderer

Optimizing Frame Rate

Draw Calls

Texture Memory

Polygon Count: Geometry

Lighting

Culling

Other Tricks and Tips

Summary

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.174.95