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

Compartir libro
  1. 592 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y 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

Detalles del libro
Vista previa del libro
Índice
Citas

Información del 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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Unity 2020 Virtual Reality Projects un PDF/ePUB en línea?
Sí, puedes acceder a Unity 2020 Virtual Reality Projects de Jonathan Linowes en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming Games. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2020
ISBN
9781839214257
Edición
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...

Índice