Unity 2020 Virtual Reality Projects
eBook - ePub

Unity 2020 Virtual Reality Projects

Learn VR development by building immersive applications and games with Unity 2019.4 and later versions, 3rd Edition

Jonathan Linowes

Condividi libro
  1. 592 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Unity 2020 Virtual Reality Projects

Learn VR development by building immersive applications and games with Unity 2019.4 and later versions, 3rd Edition

Jonathan Linowes

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Unity 2020 Virtual Reality Projects è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Unity 2020 Virtual Reality Projects di Jonathan Linowes in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming Games. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2020
ISBN
9781839214257
Edizione
3
Exploring Interactive Spaces
Successful virtual reality (VR) applications put the player into a believable place and allow them to explore and interact with objects in the environment. In this chapter, we'll explore the creation of an interactive space and introduce some new development topics, including level design, 3D modeling, and data management, to implement an interactive space you can experience in VR. The scene is a photo art gallery where you can showcase your own photos. We'll design a simple floor plan that your visitors can move around via teleportation.
You will learn how to use ProBuilder, Unity's built-in level design package, to create an architectural space, including extruding shapes to make walls, doors, and windows. You will also learn about data management using lists, data structures, and scriptable objects. In addition, you will gain more experience with lighting, materials, interaction, and teleportation components. By the end of the chapter, you'll have built a completed interactive art gallery where your visitors can explore your favorite images.
In this chapter, we are going to discuss the following topics:
  • Using ProBuilder in Unity to construct a simplistic art gallery building
  • Interacting with objects and metadata
  • Data structures, lists, and scriptable objects
  • Using teleportation

Technical requirements

To implement the projects and exercises in this chapter, you will need the following:
  • A PC or Mac with Unity 2019.4 LTS or later, an XR plugin for your device, and the XR interaction toolkit package installed
  • A VR headset supported by the Unity XR platform
You can access or clone the GitHub repository for this book (https://github.com/PacktPublishing/Unity-2020-Virtual-Reality-Projects-3rd-Edition-) to optionally use assets and completed projects for this chapter, as follows:
  • Asset files for you to use in this chapter are located in UVRP3Files/Chapter-10-Files.zip.
  • All completed projects in this book can be found in a single Unity project atUVRP3Projects.
  • The completed assets and scenes for this chapter can be found in theUVRP3Projects/Assets/_UVRP3Assets/Chapter10/folder.

Using ProBuilder and ProGrids

For this project, we're going to design an interactive art gallery. We just need a simple, small art gallery exhibit room, about 24 x 36 feet. The room is so simple, in fact, that it could easily be built within Unity using 3D cube primitives, but we'll take this opportunity to introduce you to the ProBuilder package included with Unity. If you prefer, you can skip this section and build the floor and walls using Unity cubes. Or, you could use the GalleryBuilding.obj file provided in the files for this chapter.
ProBuilder is a package of tools that allow you to build, edit, and texture geometry within Unity. It's intended to be used for in-scene level design, prototyping, and playtesting. In this project, we'll use ProBuilder just enough to get you started, along with the tools of its companion, ProGrids. Keep in mind that there's a lot more to it than will be covered in this chapter. For more information on ProBuilder, ProGrids, and Polybrush (introduced in Chapter 4, Using Gaze-Based Control), also check out the documentation and tutorials, including the following:
  • ProBuilder package documentation— https://docs.unity3d.com/Packages/com.unity.probuilder@latest/manual/overview.html
  • Unity at GDC—Rapid worldbuilding with ProBuilder video (March 29, 2018)—https://www.youtube.com/watch?v=7k-81UEluyg
  • Unity Blog—ProBuilder joins Unity offering integrated in-editor Advanced Level Design (February 15, 2018)—https://blogs.unity3d.com/2018/02/15/probuilder-joins-unity-offering-integrated-in-editor-advanced-level-design/
In this project, we will limit our use to a few ProBuilder features, including creating shapes, extruding and moving faces, creating and bridging edges, and snapping to a grid. The first step is to install the ProBuilder and ProGrids packages using the following steps:
  1. Open the Package Manager window by selecting Window | Package Manager.
  2. Ensure the filter dropdown in the upper-left corner of the window is set to All.
  3. Locate the package by typing Pro in the search field.
  4. Install ProBuilder by selecting ProBuilder from the list of packages, and then click Install.
  5. Also, install the Samples package for your render pipeline. Assuming you're using Universal Render Pipeline (URP) in this project, on the Universal Render Pipeline Support item, click Import into Project.
  6. Install ProGrids by selecting ProGrids from the list of packages, and then click Install.
Before using the tools for our project, let's take a quick tour of the editor interface for ProGrids and ProBuilder.

Using the ProGrids editor interface

Back in Chapter 2, Understanding Unity, Content, and Scale, I introduced the Unity Scene editor window, including the use of its built-in grid-snapping tools. ProGrids is an advanced version of this feature available in a separate package. Once installed (as per the preceding instructions), open the ProGrids window using Tools | ProGrids | ProGrids Window, and a new toolbar is added to the Scene window, on the left-hand side of the window, as shown in the following screenshot:
These ProGrids interface icons, from top to bottom, perform the following functions:
  • Snap Size—sets the size of the grid's snapping increment (default: 0.125 meters)
  • Grid Visibility—toggles show/hide gridlines in the Scene view
  • Snapping Enabled—switches on/off the snap-to-grid behavior
  • Push to Grid—snaps all selected objects to the grid
  • Lock Grid—locks the perspective grid in place
  • Set Grid Planes—lets you choose to display grids for a single axis (X, Y, Z), or all three at once (3D).
Grid snapping operates on the transform of the objec...

Indice dei contenuti