2024 Unity VR Tutorial (OpenXR and XR Interaction Toolkit) - PART 1 - Project Setup
Estimated read time: 1:20
Learn to use AI like a Pro
Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In this tutorial by SVRGA Tech, viewers are guided through the process of setting up a VR project in Unity using OpenXR and XR Interaction Toolkit. The tutorial emphasizes the importance of using the latest LTS version of Unity, setting up a reusable VR template, and integrating the Universal Render Pipeline (URP). It also covers the installation of necessary XR packages, addition of interaction profiles for devices like the Oculus Quest 2, and correction of material rendering issues. The video concludes with testing scenes and a sneak peek of what the next video will cover.
Highlights
The video begins with installing Unity and setting up a new VR project. ๐ ๏ธ
Creating a 3D core project and adding the Universal Render Pipeline (URP). ๐จ
Installing XR packages including XR plug-in management, XR Interaction Toolkit, and XR Hands. ๐ฆ
Adding interaction profiles such as Oculus Touch Controller and Hand Interaction Profile. ๐
Fixing material rendering issues by converting materials to URP. ๐ง
Testing the hand visualizer and interaction toolkit demo scenes to ensure everything is working. ๐ฎ
Key Takeaways
Ensure Unity is installed with the latest LTS version for optimal performance. ๐ฏ
Create a reusable VR base template for future projects. ๐
Integrate Universal Render Pipeline (URP) for cross-platform compatibility. ๐
Set up essential XR packages like XR Interaction Toolkit for smooth project execution. โ๏ธ
Resolve material rendering issues promptly by converting materials to URP format. ๐จ
Prepare for the next video by testing all interactive elements in the hands and interaction demo scenes. ๐
Overview
Starting a VR project in Unity can seem daunting, but this tutorial by SVRGA Tech breaks it down into manageable steps. First things first, make sure to have the latest LTS version of Unity ready. Once set, the journey begins with creating a VR base template โ your reliable starting point for any new project.
The tutorial shines a spotlight on the integration of the Universal Render Pipeline (URP). With its versatile rendering capabilities, URP is a must for anyone looking to develop across various platforms seamlessly. The guide covers adding XR packages essential for your VR projects, from setting up plug-in management to XR interaction toolkits.
A key segment of the video focuses on troubleshooting materials. If your models are draped in a mysterious pink hue, itโs time to convert materials to URP using Unityโs built-in tools. This video wraps up with testing the waters โ or rather, the visualizer and interaction toolkit scenes. With a stable setup ready, the next video promises to explore VR character types in more depth.
Chapters
00:00 - 00:30: Introduction and Unity Installation The chapter provides an introduction to setting up a VR project in Unity. It begins with a reminder to ensure Unity is installed on your system. You can do this by visiting the Unity website and following their instructions to complete the installation, making sure to have the latest Long-Term Support (LTS) version.
00:30 - 01:00: Creating a New VR Project Template The chapter discusses the initiation of creating a new VR project template. It starts with a recommendation to install the latest Long Term Support (LTS) version of necessary software. The process begins by selecting 'new project' and naming it 'VR base template', marking the commencement of template creation.
01:00 - 02:00: Setting Up 3D Core Project with URP The chapter introduces a base template for creating 3D core projects using the Universal Render Pipeline (URP). It guides the reader on setting up a new 3D core project with URP from scratch, emphasizing reusability and foundational setup. The focus is on establishing a project that can serve as a standard base for future projects within this framework.
02:00 - 04:00: Installing Universal Render Pipeline In this chapter titled 'Installing Universal Render Pipeline,' the process begins by setting up the project. The initial step involves adding the Universal Render Pipeline (URP) to the project. This is achieved by navigating to the 'Window' and 'Package Manager' within Unity. Users are then advised to select 'Unity registry' from the packages dropdown menu located in the top left corner. Doing so will display a list of all packages available from the internet, which includes URP.
04:00 - 05:00: Configuring URP Pipeline Asset The chapter titled 'Configuring URP Pipeline Asset' begins with a discussion on installing the Universal Render Pipeline (URP) in a project. The process starts with searching for the Universal RP package from a list and proceeding with its installation. The focus is on setting up and configuring the URP pipeline asset for rendering within the project.
05:00 - 08:00: Adding XR Packages The chapter titled 'Adding XR Packages' discusses the process of creating a pipeline asset in a URP (Universal Render Pipeline) project. It explains the reason for choosing URP, highlighting its versatility and cross-platform rendering capabilities. The transcript guides the reader to interact with the interface by clicking on 'assets', right-clicking in the assets folder, and navigating to 'rendering' options.
08:00 - 13:00: Importing Samples and Fixing Materials The chapter discusses the process of importing samples and fixing materials in a rendering project. It begins by explaining how to create a Universal Render Pipeline (URP) asset. This involves right-clicking, navigating to the rendering section, and selecting the URP asset with the universal renderer option. The URP asset is essentially a file that defines rendering settings for the project. Naming conventions for the asset are also briefly discussed.
13:00 - 16:00: Testing Scenes and Hand Tracking This chapter discusses how to manage different quality settings within a project using the URP (Universal Render Pipeline) asset in Unity. It explains the various settings available, such as quality, lighting, shadows, and post-processing. These settings allow developers to create different graphics quality levels (low, medium, high) seen in most games.
16:00 - 17:00: Conclusion and Next Steps The chapter titled 'Conclusion and Next Steps' provides a brief overview of setting up URP assets in a project. The narrator mentions the intention to release a more detailed video in the future. For the current setup, the default asset is used, and the process involves creating the asset, accessing 'Edit Project Settings', navigating to the 'Graphics' section, and configuring the scriptable render pipeline settings by adding the appropriate pipeline asset.
2024 Unity VR Tutorial (OpenXR and XR Interaction Toolkit) - PART 1 - Project Setup Transcription
00:00 - 00:30 [Music] so let's get started with setting up the first VR project in unity before we start make sure you have Unity installed on your system uh you can install it through the website and follow the instructions from the website to get set up once you have it installed and you have the latest LTS version installed on your
00:30 - 01:00 computer we can start creating the project it's highly recommended that you install the latest LTS version so we click on new project and then let's call this VR base template we are creating a template now
01:00 - 01:30 that you can reuse and create projects with this as the base so we'll call it we are base template and set up a 3D core project keep in mind that this project is going to be in urp but I now going to set up a 3D core project because I will be showing you how to set up urp from scratch as well let's create the project
01:30 - 02:00 project is now set up and uh we will start by first adding urp to our project let's go to window package manager and here in the top left in the packages drop down we select Unity registry which means it will list all the packages available to us from the internet you can see the list here and
02:00 - 02:30 here in this list we find Universal render pipeline so you can let's search for Universal the package is called Universal RP and we will now install it urp has now installed in our project now the first thing we are going
02:30 - 03:00 to do with a urp project is we will have to create the pipeline asset so the main reason we are using urp is because it is the most uh versatile render pipeline available right now and uh it provides a lot of crossplatform rendering capabilities with our projects so let's click on assets let's right click in the assets folder and go down here and find rendering so it's
03:00 - 03:30 right click create and we go down to the rendering section and we select urp asset with universal renderer we can give this a name we can just call this urp asset a urp asset is basically a file that defines a lot of uh rendering settings for the project so if I click
03:30 - 04:00 on the urp asset on the right here you will see the different settings that are available to us we have quality we have lighting we have the Shadows section and also the postprocessing section using these render pipeline assets we get to create different quality settings for our project so you might have seen in most games where you select the graphics quality low medium high so we create those settings using
04:00 - 04:30 the urp assets I will make another video explaining this in detail but for now we will just use the default one once the asset is created we go to edit project settings I'm sorry edit project settings and then we go to Graphics so in the graphics section you will see that the scriptable render pipeline settings the pipeline asset is empty so we click here and we add the
04:30 - 05:00 urp asset that we have just created we have added the render pipeline asset now now our basic urp project is ready we will now start with adding all the XR packages that we need to make our first XR Project work
05:00 - 05:30 let's go to window let's go to package manager let's clear that out and if I scroll down you will see a few XR packages here you will see XR plugin management XR interaction toolkit and XR hands these are the three main packages that you will need to set up the base project so the way we set up XR plug-in management is let's close the package manager we go to edit and project settings
05:30 - 06:00 and on the left menu here at the bottom we have the XR plug-in management section let me click on that and you will see the install XR plug-in management button here we'll click on that
06:00 - 06:30 once our project opens we will select we will open the project settings and go to EXA plugin management and install open open
06:30 - 07:00 XR once the open XR packages are installed you will see a couple of warnings here which we need to resolve we will find these in the project valid validation section and for now we will be ignoring the first warning but if you look at the second warning it says at least one interaction profile must be added please select which controllers you will be testing against in the
07:00 - 07:30 features menu how we do that is we go to the open XR Tab and you will see the interaction profile section here and here we will add the controllers that we are going to be using so I have an Oculus Quest 2 with me or meta Quest 2 we will be adding three main components and this works the same for any meta headset that you might have so I will add initially the Oculus
07:30 - 08:00 touch controller profile I will add the meta Quest touch Pro Controller profile I will also add the hand interaction profile so these three profiles will cover all of our use cases while developing on a meta Quest headset so now that we have added this let me just close this and go to the package manager because now we will be
08:00 - 08:30 adding the other XR packages that we need to set up our base VR project so in the package manager if you look at the bottom above XR plug-in management you have the XR interaction toolkit so we will be installing that
08:30 - 09:00 once that is done which is almost about now we will be adding the XR hands package as well
09:00 - 09:30 so our project now contains all the base packages needed to develop full a full-fledged VR application inside Unity but to help us a little bit further let's add some samples of these packages so it's easier for us to understand the packages better and also
09:30 - 10:00 perhaps reuse a lot of the components available there so let me click on XR interaction toolkit and the samples Tab and we will import the starter assets we will also import the hands interaction demo once this is installed
10:00 - 10:30 we will now go to the XR hands package and do the same in the sample section we will import the hand visualizer sample and once we have that imported we should be pretty
10:30 - 11:00 much done with all of our Imports for now so the samples that we just imported you will find in the sample section here in the XR hands folder you will find the hand visualizer and in the XR interaction toolkit you will find the hand interaction demo
11:00 - 11:30 and the XR interaction toolkit demo so this is the hands interaction demo here and you might see these materials here that are a bit messed up which we will just fix in a second so and in the XR interaction toolkit you have the demo scene of the X our interaction tool
11:30 - 12:00 gate so now you must have noticed that the materials here are a bit off so if I go to the hand visualizer scene especially you will see that the hands have a pinkish material so this basically means that the material cannot be rendered by the urp renderer because most of these materials in the package come as so in order to fix that
12:00 - 12:30 it's a very simple solution we go to the assets folder next to the search bar you will find a search by type button let's click on that and select all the materials and in this folder you will see the list of materials that we will need to convert into urp which can be identified by this pinkish color that we see here so let's select all of them and conver them to
12:30 - 13:00 urp so holding control you can multi- select them and I'll go to edit rendering materials and con convert selected built-in materials to urp so let's do proceed and as soon as I
13:00 - 13:30 do that you will see that all the materials are fixed there is one very important step that needs to be done after importing our hand XR hands package uh without which the hand tracking will not work and that is we have to go to edit we go to Project settings and we have to enable the hand tracking
13:30 - 14:00 subsystem and the Hand interaction poses feature groups uh please keep in mind that this is very important otherwise the hand tracking will not work so let me close that up and now we can start testing our scenes so let's test out the hand visualizer scene first before we enter play mode in unity uh there is a quick step that we we need to do in our headset so with the headset
14:00 - 14:30 connected over USB we enter the menu and we select Quest link once we open Quest link it shows us the connected uh PC and then we enter the quest link so this is the environment that we need to be in in order to play external applications uh in this case our Unity scene
14:30 - 15:00 so that is our hand visualizer scene
15:00 - 15:30 now we will also go to the samples and test out the interaction toolkit scenes so it's called hands demo scene where we can test out the interactions of the hands package
15:30 - 16:00 similarly we can also take a look at the starter assets of the XR interaction toolkit and these are all controller based interactions
16:00 - 16:30 excellent our base project is now ready and we are ready to start developing VR applications in the next video we will take a look at the different types of VR characters or rigs that are available to us by the open XR package we will also learn how to set up a fully functional character from from scratch by
16:30 - 17:00 ourselves if this video helped you out please don't forget to like And subscribe for more share this video with a friend if you think it's going to help them out if you have any questions drop them in the comments below and I will see you in the next one