Preface
Chapter 1: Virtuall Eve th'm for Eve one
What is virtual reality to you?
Types of head-mounted displays
Desktop VR
Mobile VR
The difference between virtual reality and augmented reality
Applications versus games
What this book covers
Who are you?
Types of VR experiences
Technical skills that are important to VR
Summary
Chapter 2: Objects and Scale
Getting started with Unity
Starting a new Unity project
The Unity editor
The default world space
Creating a simple diorama
Adding a cube
Adding a plane
Adding a sphere and some material
Changing the scene view
Adding a photo
Coloring the ground plane
Measurement tools
Keeping a unit cube handy
Using a Grid Projector
Measuring the Ethan character
Importing from the Blender experiment
An introduction to Blender
A unit cube
A UV Texture image
Importing into Unity
A few observations
Summary
Chapter 3: VR Build and Run
VR device integration software
Unity's built-in VR support
The device-specific SDK
The OSVR project
WebVR
3D worlds
Creating the MeMyselfEye prefab
Build for the Oculus Rift
Build for Google Cardboard
The Android setup
The iOS setup
Installing the Cardboard Unity package
Adding the camera
The build settings
The Play Mode
Building and running in Android
Building and running in iOS
The device-independent clicker
How virtual reality really works
Stereoscopic 3D viewing
Head tracking
Summary
Chapter 4: Gaze-based Control
Ethan, the walker
Artificially intelligent Ethan
The Navmesh bakery
A random walker in the town
Interlude - a quick introduction to Unity programming
The RandomPosition script
"Zombie-ize" Ethan!
Go where I'm looking
The LookMoveTo script
Adding a feedback cursor
Observations
If looks could kill
The KillTarget script
Adding particle effects
Cleaning up
Summary
Chapter 5: World Space UI
A reusable default canvas
The visor HUD
The reticle cursor
The windshield HUD
The game element UI
The info bubble
An in-game dashboard with input events
Creating a dashboard with buttons
Linking the water hose to the buttons
Activating buttons from the script
Look to highlight a button
Looking and then clicking to select
Looking and staring to select
A responsive object UI with head gestures
Using the head position
Using head gestures
Summary
Chapter 6: First-person Character
Understanding the Unity characters
Unity components
The Camera component
The Rigidbody component
The Character Controller component
Unity Standard Assets
ThirdPersonController
AIThirdPersonController
FirstPersonController
RigidBodyFPSController
Making a first person
Move in the direction you're looking
Keep your feet on the ground
Don't pass through solid objects
Don't fall off the edge of the world
Stepping over small objects and handling uneven terrain
Start and stop moving
Using head gestures to start/stop
User calibrations
A character's height
Real-life height of a player
Recentering
Maintaining a sense of self
Head-body disconnect
Head and body...
...And feet
The body avatar
Virtual David le nose
Audio cues
Locomotion, teleportation, and sensors
Managing VR motion sickness
Summary
Chapter 7: Physics and the Environment
Unity physics
Bouncy balls
Headshots
Trampoline and brick
A human trampoline
Like a brick
Like a character
Interlude - environment and things
Wispy Sky
The planet Earth
The corporate logo
Blender
Unity
An elevator
Jumping
Summary
Chapter 8: Walk-throughs and Rendering
Building in Blender
Walls
Ceiling
Assemble the scene in Unity
The gallery room
The artwork rig
The exhibition plan
Adding photos to the gallery
An animated walk-through
Unity's animation system
Scripted animation
Optimizing for performance and comfort
Optimizing your implementation and content
Simplify your models
Using texture maps instead of complex meshes
Limiting the objects to be drawn
Lighting and shadow performance
Optimizing your scripts
Optimizing for the Unity rendering pipeline
Life's a batch
Multipass pixel filling
Other rendering tips
Optimizing for the target hardware and drivers
Unity Profiler
Summary
Chapter 9: Using All 360 Degrees
360-degree media
Crystal balls
Magic orbs
Panoramas
Infographics
Equirectangular projections
Globes
Photospheres
Field of view- FOV
Capturing a 360-degree media
Summary
Chapter 10: Social VR Metaverse
Multiplayer networking
Networking services
The network architecture
Local versus server
The Unity networking system
Setting up a simple scene
Creating a scene environment
Creating an avatar head
Adding multiplayer networking
Network Manager and HUD
Network Identity and Transform
Running as a host
Adding spawn positions
Running two instances of the game
Associating avatar with the first-person character
Adding multiplayer virtual reality
The Oculus Rift players
The Google Cardboard players
Next steps
Building and sharing a custom VRChat room
Preparing and building the world
Host the world
Summary
Chapter 11: What's Next?
Index