Mixed Reality With Unity XR Toolkit - Part 1 : Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what is up everyone and welcome to a new mix ready tutorial so in my previous video I did a four-part tutorial Series where I show you how to build a mix ready application for the quest 3 with path through scene Collision depths and even AR Shadow with even at the end a patreon exclusive tutorial where we made together this awesome XR archery game Link in the description by the way but to do all of this we use meta own developer kit The Meta integration so a good question is if I want to make a mix application am I obligated to use their SDK and the answer is no because in this video I'm going to show you how you can use open XR with the unity XR interaction toolkit to do mix r on the quest 3 as well but first why would you use the XR interaction toolkit Over The Meta integration so Unity XR interaction toolkit is Unity own toolkit to make XR game it has some great interaction like grab Ray and more which I've covered on this tutorial series on how to make a VR game on this YouTube channel but more than be able to use all of this in mix vary the exr interaction to get is cross platform that means that with what I'm going to show you on this video you can easily Port your game to other mix ready headset like P4 ol lens or possibly the Apple Vision in the future which is not the case with the meta itation that only works on meta headsets now keep in mind that using the unity X Out kit restricts some specific feature that we can use for example the depth API and using the bathr in the unity editor is not yet working but maybe it will be the case in the future so anyway now that you know more about the use case of this setup without further Ado let's get started with the tutorial okay so let's get started on our XR tutorial so as you can see right now I've already done a VR setup on this project and the goal here that I'm going to do in the next minute is to turn here this VR project to be a nixar project that works with path through and that we will be able to use with our Quest three now basically as you can see what I did was create a very simple XR origin with and presents on the left and right hand I also have this cube in front of me and this Cube has a nixar grab interactable which mean that I will be able to grab it oh and by the way because there is no ground over there I don't want the cube to fall to Oblivion so I set here the rigid body to is chematic to stop all of the force that are applied on this Cube by the way if you want to know how to make this yourself this is actually the result of the two first episode of my tutorial series on how to make a VR game so anyway as you can see if I maximize this windows and click on play there we go I can see my hand and the project is working in virtual reality I can also grab and release the cube so now the next step is to turn this project and make it work with path through for mix R okay so to create a mix R project with open XR and unity XR interaction toolkit we need Unity above 20 22.3 which is the case as you can see I'm using 2022 3.7 F1 but any version above this will work then if I go to Windows package manager then here go to in Project here are all of the packages that are inside this project and if you follow the two VR tutorial that I show you you should have here the XR prant management install any version above this one will work you should have the XR interaction toolkit install any version above this one will work still and here the open XR plugin which will be needed now to make this project work with mix R what we need is to install two other packages the first one is the AR foundation for this we can go to Unity registry and search for AR Foundation at the top there you go you should see this version so AR Foundation 5.0.7 but unfortunately this version is not supporting here the mix vary on The Meta qu 3 so we need a version that is actually above 5.1 now to do so instead of clicking here on install we can copy here the name so come. un. xr. AR Foundation click on the plus button add package by name and here you can just paste or write it for yourself the name of the package and now if you click on ADD it will download a more recent version of the IR Foundation than the one that is presenting on the package manager there you go as you can see it has correctly installed AR Foundation version 5.1.1 but of course any version above this one will still work okay so now we have here the AR Foundation to do some AR stuff on our packages but we still need a bridge to go from The Meta headset to be able to talk to both the AR foundation and open XR and this bridge is called the unity meta open XR package P now you can add it here by clicking on the plus button add package by name and here you need to write come. unity. xr. meta- openen XR there if we click on ADD there you go itun install you the leaders version of this package okay there you go if we remove the search over there and that we go here on the unity open XR meta package we can see that it is correctly installed and that all of the dependent see so the open XR and the AR Foundation are also installed so now everything should work and we are now ready to use this packages to create or mix R game from the unity XR interaction toolkit now by the way at this point there is already some prefab and stuff that are made by unity to help us create a mix R Rig for example if I go to the XR interaction toolkit then to samples if you have a version of the XR interaction toolkit above 2.5 five you should see here some starter asset for The Meta XR now I'm using the version 2.4.3 which is why I'm not seeing anything there but anyway if you in the same case as me you can click on the plus button add package by name and add the com. unity. xr. interaction. toolkit package here by the name and this should update the XR interaction toolkit with the leaders version which is 2.5 in my case but of course ear version above this one should work there you go you should see with this new version as you can see here the AR starter ass set which are made for mix relity with the XR interaction toolkit now in my case I will simply click on import over there and I have some error over there on the console Windows this is because I also need to update the starter asset in my case okay here you go now no more error everything is updated to the latest version I can close this windows and now if I go to samples XR interaction toolkit 2.5.2 we can see here the AR starter asset that we just downloaded and there is actually an AR demo scene which you will be able to test or there is also some prefab ears with ar fether plane which will be able to display some plane detection there is the XR origin which works for AR and another prefab which I will talk about in a future episode now in our case I will not use here the XR origin prefab my goal here is to show really what change between this prefab which is configured for XR and the one that we have right there so the very basic one for VR game so that you will be able to upgrade any of your VR game to make it work with path through or mix R in general now it is not worthy that there is also some samples made by unity that features mix R for example you have here the mix R example for meta openxr quick start guide and you have have also more generally speaking the AR Foundation samples which contain some open XR scene that work with the quest through to display multiple feature that you will be able to find like plane detection or the spal anchors now anyway you will be able to find them in the description below but now that all of the packages are correctly installed and that you know more about where to find some information about Unity XR with qu 3 Let's configure our project to make it work and update here the XR origin now for the project settings now that we have the package we need to go to edit project settings and then if we go to XR plug-in management as you can see by default I have the open XR set to both desktop and Android and now because I'm using a 3 and I want to see path through I will need to enable here The Meta Quest feature group there we go next we can go to open XR and as you can see all of the meta Quest features are added and in the interaction profile I can see both The Meta Quest touch Pro controller and the Oculus touch controller profile so here make sure that you have the same setting as mine next on top of the XR plug-in management setting there is some settings under player that we need to configure so let me click over there so the first thing we need to make sure is to set the color space from gamma to linear there you go then we can disable the autographics API and here make sure that you have both vcan and open GES 3 that are inside the graphics API also so make sure that vcan is set at first here there you go if we go a bit down below here make sure that the minimum API level is set to 10 and that the target architecture is armm 64 there you go now these are all the settings that you need to have on the players now let me close this windows and as you can see in this project I'm personally using the universal rendering pipeline now if you are using the universal rendering pipeline there is some more settings that you need to to do to make sure everything works properly so here if we go to edit project settings again then to Graphics you can see here the scriptable rendering pipel settings that is used so if we click on it it should highlight it in your project and here to make a mix right works you need to make sure here that both the Teran all and the HDR are disabled then on the same settings if you click here on the renderer list first element it should highlight another settings page and if we click on it we also want to uh here disable the postprocessing there you go okay and that's about it in terms of settings now with this everything should work just fine now if you have any problem with this setem let me know in the comment section and I will try to help you but now what's left for us to do is to set up here the XR origin now the first thing we need to do is add a n session so we can right click go to XR and there you should see here the AR set session now if you don't see it it's just an empty game object which has two components an AR session and a AR input manager beautiful now on the XR origin XR rig we can click on ADD component and add a n plane manager now for the plane prefab let's click here and search for plane here select the asset and make sure that there is no hidden package by clicking here and you should see the AR fether plane so let's select it now basically the AR plane manager will be able to display a plane on the wall and on or floor which is something that we will use in the Future Part of uh this tutorial but anyway now let's go to our main camera and on the main camera what we need to do is set the background type from Skybox to solid color we can then change the color to Black and here make sure that the alpha value is at zero so basically everything here needs to be Z 0 0 and zero beautiful okay finally we need two component here on this camera the first one is a n camera manager and the second one is the AR camera background and there you go with this everything should be fine and mix ready should work with the packages that we install the setting that we've done on the project and finally the setup on the XR origin B SC we need to click on play to find out now just on a side note here by default if I click on play it will not work inside the unity editor this is not a feature that is available right now so to test the path through we actually need to build now I'm going to go to file build settings here make sure that the Android platform has been selected and that you can see here your Oculus qu 3 on the device and there you go now let's click on build and run okay and here you go guys as you can see path through is working with the unity XR interaction toolkit so I have still here the feature from the unity XR kit I can grab and move Cube all around but I can see my surrounding with the qu three so all of the dots are actually the material that is used on the plane that are spoon for each one of the walls around me on the floor but also on my desk so basically it will read the scene model that meta has and will spawn a plane according to the room that you have around you now by the way of course you don't maybe want to show the ples like it's the case right now so to just fix this right now you can just uncheck here the AR plane manager but the plane detection is something that I'm going to show you in the next tutorial so make sure to leave a like and click on the Subscribe button to not miss it when it will be released as always a big shout out to my patreon for supporting my work and if like them you want to get access to the source code of this project and exclusive content like this awesome exr archery game that we made together join us the link is in the description below now thank you for watching and I will see you very very soon [Music] [Music] bye-bye
Info
Channel: Valem Tutorials
Views: 13,604
Rating: undefined out of 5
Keywords: valem, vr keyboard unity, valem vr, valem tutorials, virtual reality, vr, VR, xr, valem tutorials vr, vr tutorial, vr tutorial for beginners, vr tutorial unity, unity, unity vr, unity vr tutorial, beginner, basic, learn, vr programming, easy, how, to, howto, gamedev, vr dev, vr development, indie gamedev, beginner xr tutorial, how to make a vr game, unity xr toolkit, vr basics tutorial, vr tutorial beginner, vr unity beginner, xr toolkit unity
Id: nyFRuN1CYAI
Channel Id: undefined
Length: 14min 19sec (859 seconds)
Published: Sun Dec 10 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.