𝔖 Scriptorium
✦   LIBER   ✦

📁

Unity 2020 Virtual Reality Projects

✍ Scribed by Jonathan Linowes


Publisher
Packt Publishing
Year
2020
Tongue
English
Leaves
586
Edition
3
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Explore the latest features of Unity and build VR experiences including first-person interactions, audio fireball games, 360-degree media, art gallery tours, and VR storytelling

Key Features

  • Discover step-by-step instructions and best practices to begin your VR development journey
  • Explore Unity features such as URP rendering, XR Interaction Toolkit, and ProBuilder
  • Build impressive VR-based apps and games that can be experienced using modern devices like Oculus Rift and Oculus Quest

Book Description

This third edition of the Unity Virtual Reality (VR) development guide is updated to cover the latest features of Unity 2019.4 or later versions - the leading platform for building VR games, applications, and immersive experiences for contemporary VR devices.

Enhanced with more focus on growing components, such as Universal Render Pipeline (URP), extended reality (XR) plugins, the XR Interaction Toolkit package, and the latest VR devices, this edition will help you to get up to date with the current state of VR. With its practical and project-based approach, this book covers the specifics of virtual reality development in Unity. You'll learn how to build VR apps that can be experienced with modern devices from Oculus, VIVE, and others. This virtual reality book presents lighting and rendering strategies to help you build cutting-edge graphics, and explains URP and rendering concepts that will enable you to achieve realism for your apps. You'll build real-world VR experiences using world space user interface canvases, locomotion and teleportation, 360-degree media, and timeline animation, as well as learn about important VR development concepts, best practices, and performance optimization and user experience strategies.

By the end of this Unity book, you'll be fully equipped to use Unity to develop rich, interactive virtual reality experiences.

What you will learn

  • Understand the current state of virtual reality and VR consumer products
  • Get started with Unity by building a simple diorama scene using Unity Editor and imported assets
  • Configure your Unity VR projects to run on VR platforms such as Oculus, SteamVR, and Windows immersive MR
  • Design and build a VR storytelling animation with a soundtrack and timelines
  • Implement an audio fireball game using game physics and particle systems
  • Use various software patterns to design Unity events and interactable components
  • Discover best practices for lighting, rendering, and post-processing

Who this book is for

Whether you're a non-programmer unfamiliar with 3D computer graphics or experienced in both but new to virtual reality, if you're interested in building your own VR games or applications, this Unity book is for you. Any experience in Unity will be useful but is not necessary.

Table of Contents

  1. Virtually Everything for Everyone
  2. Understanding Unity, Content, and Scale
  3. Setting Up Your Project for VR
  4. Using Gaze-Based Control
  5. Interacting with Your Hands
  6. Canvasing the World Space UI
  7. Teleporting, Locomotion, and Comfort
  8. Lighting, Rendering, Realism
  9. Playing with Physics and Fire
  10. Exploring Interactive Spaces
  11. Using All 360 Degrees
  12. Animation and VR Storytelling
  13. Optimizing for Performance and Comfort.

✦ Table of Contents


Cover
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Table of Contents
Preface
Chapter 1: Virtually Everything for Everyone
What is virtual reality?
Differences between virtual reality and augmented reality
Applications versus games
Types of VR experience
Types of HMD
Desktop VR
Mobile VR
How virtual reality works
Stereoscopic 3D viewing
Head, hand, and body tracking
Technical skills that are important to VR
What this book covers
Who this book is for
Summary
Chapter 2: Understanding Unity, Content, and Scale
Technical requirements
Installing Unity
Development system requirements
Installing Unity Hub
Installing the Unity Editor
Creating a new Unity project
Installing additional packages and assets
Getting started with Unity
Exploring the Unity Editor
Understanding the default new scene
Using grid and snap
A couple more options
Creating a simple diorama
Adding a cube and a plane
Adding a red ball
Changing the scene view
Making a Crate Material
Adding a photo
Using prefabs
Creating and instantiating a prefab
Editing and overriding a prefab
Importing content
Creating 3D content for VR
Importing from the Unity Asset Store
Using Unity Legacy Standard Assets
Importing models in supported formats
Round-trip geometry workflows
Summary
Chapter 3: Setting Up Your Project for VR
Technical requirements
Introducing the Unity XR platform
Choosing your target VR platforms and toolkits
Enabling virtual reality for your platform
Setting your target platform
Installing XR Plugin Management
Installing the XR Interaction Toolkit
Adding the XR camera rig
Exploring the XR Rig objects and components
Building and running your project
Configuring the player settings
Building, running, and testing your VR project
Building for SteamVR
Setting up for OpenVR
Installing the SteamVR Unity Plugin toolkit
Building for Oculus Rift
Setting up for Oculus desktop
Installing the Oculus Integration toolkit
Building for Immersive Windows MR
Setting up for Immersive WMR
Installing Visual Studio workloads
Installing the Mixed Reality Toolkit (MRTK)
Building for Oculus Quest
Installing the Android tools
Setting up for Oculus mobile VR
Other Android and optimization settings
Installing the Oculus Integration toolkit
Using adb
Building for Google Cardboard
Setting up for Google Cardboard 
Targeting Android for Cardboard
Targeting iOS for Cardboard
Summary
Chapter 4: Using Gaze-Based Control
Technical requirements
Adding Ethan, the walker
Artificially intelligent Ethan
The NavMesh bakery
Scripting a random walk target
"Zombie-izing" Ethan!
Adding a zombie material
Painting models with Polybrush
Going where I'm looking
The LookMoveTo script
Adding a feedback cursor object
Observing through obstacles
Making a look-to-kill system
The KillTarget script
Adding particle effects
Introducing Unity C# programming
Summary
Chapter 5: Interacting with Your Hands
Technical requirements
Setting up the scene
Defining a balloon game object
Making the balloon prefab
Creating a Balloon Controller
Using an Input Manager button 
Polling the XRI_Right_Trigger button
Controlling balloons with the input trigger
Creating balloons
Releasing balloons
Inflating a balloon while pressing the trigger
Using Unity events for input
Invoking our input action events
Subscribing to input events
Tracking your hands
Parenting the balloon to your hand
Forcing balloons to float upright
Interacting with a balloon gun
Introducing the XRI Interactor/Interactable architecture
Creating a grabbable balloon gun
Handling Activate events
Using the XR Interaction Debugger
Popping balloons
Making the balloons poppable
Adding a popping explosion
Disabling rigid physics while in hand
Throwing a ball projectile
Resetting the ball position
Summary
Chapter 6: Canvasing the World Space UI
Technical requirements
Studying VR design principles
Making a reusable default canvas
Creating a default canvas prefab
Initializing the default main camera
Including an Event System component with XRUI Input Module
Implementing a HUD
Creating a visor HUD
The windshield HUD
Hiding the panel using Canvas Group
The in-game world space UI
Making a scoreboard
Using TextMesh Pro
Info bubbles
The reticle cursor
Adding a canvas reticle to gaze-based interaction
Adding a reticle to the XR interactor hand controller
Adding a gaze-based reticle using XRI
Building an interactive dashboard 
Adding a dynamic water hose
Creating a dashboard with a toggle button
Stopping the ray interactor at the canvas
Direct interaction with UI elements
Building a wrist-based menu palette
Summary
Chapter 7: Teleporting, Locomotion, and Comfort
Technical requirements
Implementing basic glide locomotion
Moving forward with the thumbstick
Rotating with the thumbstick
Moving in the direction you're looking or pointing
Avoiding obstacles
Climbing a wall
Building a wall with grab holds
Adding the XRI Interactor and Interactable components
Adding a ClimbController script
Adding the GrabPull script and actions
Falling
Using the XRI Locomotion System
Understanding the Locomotion System
Turning in a snap
Integrating scripts with Locomotion System
Teleporting between locations
Installing the XRI examples
Adding teleportation
Restricting interaction to a specific layer
Ray interactors for teleportation
Switching between Interactors
Locomotion and comfort in VR
Other locomotion mechanics
Managing VR motion sickness
Summary
Chapter 8: Lighting, Rendering, Realism
Technical requirements
Lighting and rendering strategies
Choosing a Render Pipeline
Choosing Lighting Settings and GameObjects
Setting up our demo scene 
Using the SampleScene
Disabling baked lighting
Creating a menu panel
Using environment lighting
Environment lighting source
Adding Environment Light Intensity
Adding a Fog effect
Using PBR materials and URP Shaders
Using Light objects and Emission surfaces
Using Light Probes and Reflection Probes
Enhancing your scenes with post-processing effects
Summary
Chapter 9: Playing with Physics and Fire
Technical requirements
Understanding Unity physics
Creating bouncy balls
Managing the GameObject life cycle
Removing fallen objects
Setting a limited lifetime
Implementing an object pool
Building a headshot game
Serving a ball
Adding sound effects
Hitting the target
Building a Paddleball game
Creating a hand paddle
Building a shooter ball game
Making a shooter wall
Shooting balls toward the player
Improving the ball
Juicing the scene
Great balls of fire
Skull environment
Audio synchronization
Summary
Chapter 10: Exploring Interactive Spaces
Technical requirements
Using ProBuilder and ProGrids
Using the ProGrids editor interface 
Using the ProBuilder editor interface
Constructing the art gallery building
Using a floor plan sketch
Creating the floor
Creating the walls
Making holes for entrances
Creating a roof and skylight
Assembling the scene
Replacing the building materials
Tuning the lighting
Creating the artwork rig
Defining an artwork rig
Adding a spotlight
The exhibition plan
Adding pictures to the gallery
Managing art info data
Using lists
Using data structures
Using scriptable objects
Displaying the art info
Adjusting for image aspect ratio
Teleporting around the gallery
Room-scale considerations
Summary
Chapter 11: Using All 360 Degrees
Technical requirements
Exploring 360-degree media
Understanding equirectangular projections
VR is hacking your field of view
Stereo 360-degree media
Having fun with photo globes
Seeing crystal balls
Rendering globes
Handling magic orbs
Viewing 360-degree photos
Viewing 360 images from the web
Adding an image viewer UI
Playing 360-degree videos
Using Unity skyboxes
Six-sided or cubemap skyboxes
Spherical panoramic skyboxes 
360-degree video skyboxes
Capturing 360-degrees in Unity
Capturing cubemaps and reflection probes
Using third-party capture tools 
Summary
Chapter 12: Animation and VR Storytelling
Technical requirements
Composing our story 
Gathering the assets
Creating the initial scene
Timelines and Audio tracks
Using a Timeline to activate objects
Recording an Animation Track
A growing tree
A growing bird
Using the Animation editor
A wafting nest
Animating other properties
Animating lights
Animating a scripted component property
Using Animation clips
Shaking an egg
Using Animator Controllers
ThirdPersonController Animator
Living Birds Animator
Defining the fly-to targets
Using Animator hashes and DOTween to animate
Using a Signal Track in Timeline
Making the story interactive
Look to play
Resetting the initial scene's setup
Summary
Chapter 13: Optimizing for Performance and Comfort
Technical requirements
Using the Unity Profiler and Stats windows
The Stats window
Overview of the Profiler window
Analyzing and diagnosing performance problems
Optimizing your art
Decimating models
Levels of detail
Optimizing your scene with static objects
Setting up the scene
Lighting and baking
Occlusion culling
Optimizing the rendering pipeline
Optimizing your code
Understanding the Unity life cycle
Writing efficient code
Runtime performance and debugging
Summary
Other Books You May Enjoy
Index


📜 SIMILAR VOLUMES


Unity Virtual Reality Projects
✍ Linowes J. 📂 Library 🌐 English

Pack Publishing, 2015. — 286 p. — ISBN: 978-1-78398-855-6.<br/> <br/><strong>Код примеров к книге выложен <a class="object-link fpm" data-file-id="1819807" href="/file/1819807/">здесь</a>.</strong><div class="bb-sep"></div>What is consumer virtual reality? Wearing a head-mounted display you view ste

Unity Virtual Reality Projects
✍ Linowes J. 📂 Library 🌐 English

Pack Publishing, 2015. — 286 p. — ISBN: 978-1-78398-855-6.<br/> <br/><strong>Код примеров к книге выложен <a class="object-link fpm" data-file-id="1819807" href="/file/1819807/">здесь</a>.</strong><div class="bb-sep"></div>What is consumer virtual reality? Wearing a head-mounted display you view ste

Unity Virtual Reality Projects - Second
✍ Jonathan Linowes 📂 Library 📅 2018 🏛 Packt Publishing 🌐 English

Unity has become the leading platform for building virtual reality games, applications, and experiences for this new generation of consumer VR devices.<br><br>Unity Virtual Reality Projects walks you through a series of hands-on tutorials and in-depth discussions on using the Unity game engine. With

Unity Virtual Reality Projects - Second
✍ Jonathan Linowes 📂 Library 📅 2018 🏛 Packt Publishing 🌐 English

Unity has become the leading platform for building virtual reality games, applications, and experiences for this new generation of consumer VR devices.<br><br>Unity Virtual Reality Projects walks you through a series of hands-on tutorials and in-depth discussions on using the Unity game engine. With

Unity Virtual Reality Projects (Code Onl
✍ Linowes J. 📂 Library 🌐 English

Pack Publishing, 2015. — Source Code. — ISBN: 978-1-78398-855-6.<br/> <br/><strong>Код примеров к выложенной здесь книге в форматах <a class="object-link fpm" data-file-id="1819808" href="/file/1819808/">PDF</a>, <a class="object-link fpm" data-file-id="1819809" href="/file/1819809/">EPUB</a>, <a cl