Create Your Own Virtual Apartment in 1:1 Scale on Oculus Quest 1 & 2 (TUTORIAL)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone and welcome to altvr at this youtube channel we are showing you alternative and experimental applications in virtual reality and in this episode which is a tutorial episode we're going to show you how you can partake in such creative endeavors yourself so a few weeks ago we released a video where i had recreated my physical apartment in vr and we didn't just recreate it we also calibrated it or synchronized it in one to one scale to my real apartment and this has some really interesting effects because normally you when you're playing a vr game you have maybe two or two by two meters available of play space but in this way we are able to utilize our whole apartment so you can walk between the rooms you can lean against the walls you can lay down on your couch um yeah it's just a really interesting way of experiencing vr that is more tactile and immersive because you can uh use real navigation and um yeah in a powerful way so um we are releasing this tutorial because a lot of people wanted to be able to do this yourself and we are super excited to see what you guys will create by this because this is only the template right we use this to create a memory palace but you may want to turn your apartment into a first person shooter game or a puzzle game or just have 20 different tvs around in your virtual apartment or whatever so we are making this as um yeah call for experimentation we are really interested in seeing what people will create by this and therefore we are also making this tutorial very accessible you don't need any prior knowledge before going to this tutorial we are going to show you everything and it's not too hard i promise so let's just get going the first thing you're going to want to do is to download unity now you can find unity at this url which i put in the description or you can just google download unity and get to this page once we are on this page we get two choices either choosing a unity to download or download the unity hub we're going to download unity hub so when you have downloaded unityhop installed it and opened it you're probably ending up in the preferences pane where it says something about you requiring a license to use unity or you are in the general overview of the project in the installs either way we're going to have to activate our unity license by creating a unity account now this is still free unless you are making like a hundred grand and selling vr apps so not to worry we're just going to go to the account pane here and go to sign in where it says that if you don't have a unity id please create one if we click there we just have to register our email etc usernames and so on to create the unity id so do this and then log in now once you are logged in to the unity hub you should be able to see your initials up here which means that you're now logged in and things should be fine you may however have to activate your license and you do this by going to the settings and going to license management where you either activate the license here or you notice that here is your personal license now it's time to install unity itself so you can do this by going uh back from the preferences and into installs now i already have a few versions here but i'll install one just to show you how it's done you go to add and you can choose the latest official release which in our case or in my case is 2019 for now this is really important you do not have to download visual studio but you can if you do this is an ide for software development what is important however is that you make sure to include android build support this is because oculus quest is an android device and we're going to need this to build an application to it it's also really really uh stressful to add this later on so make sure that you do this now so make sure this is in place and then just click next and yeah that should be it now once you have installed unity you should be able to see it here in the installs and there should also be a small icon indicating that this version of unity also supports building for android now you can go up from the installs up to the projects and we're going to define our project finally so go to new and choose 3d and then call this something sensible like yeah virtual apartment and click create now this will open unity inside our new defined project all right so once we are inside our project in the editor i should explain what these various things mean so in the center of our project here we have the scene view and this is showing how our virtual environment is appearing from yeah sort of like a godly perspective and we see right now it's quite empty we only have the horizon behind here we have a light which is glowing a particular way and we have a camera while i'm clicking at the camera i can see a camera preview and what is important to realize is that the camera inside the virtual environment that we're creating is basically the eyes of the observer inside the scene so what you're going to see when you are trying out your app for the first time will be the perspective of the camera so we can see the camera preview here but we also have the game view here which is showing um where the camera is looking so we can also choose these things from the hierarchy on the left so if i'm clicking on my camera you see it lights up and the same thing with the lights now we also see that i can change the position of the camera and of the light and i can either do this through the scene view or in the inspector on the left which is opened for each object as i click it in the hierarchy so this is really nice just to know that we can change the position of things inside the scene this doesn't really require any programming of course we can do it through scripts as well but we will won't be covering this so this is how we are going to place our various walls doors and objects through either moving it about like this or changing values in um yeah inside the inspector on the right so um for now we don't really know what we're going to create this is going to depend on your apartment so what you're going to need is to measure your apartment and find out this measurement then we're going to take it to the next level all right so now you got your measurements for your apartment and if you have them written down in front of you you're ready to go to the next step so within the hierarchy here um on the left side we have the possibility to introduce three-dimensional objects into our scene view which we can then modify so if you right-click within here you get the option to introduce new 3d objects so we're going to start with a plane which is going to be our floor now it isn't super important that this matches your exact floor within all the walls etc so i'm just going to put 10 um along these at the x and z axis and yeah we basically have a really large area to work with so the next step would be to get up some walls now in my case my walls were approximately 5 meters long for each of the room with some variants but to do this i'm going to right click and 3d object and i'm going to select a cube we could also select i'll show you a quad which looks kind of more like a wall right but i found that it's easier if you have ai elements like robots etc inside your virtual apartment that they escape so having a cube and then giving it some more depth is better so if we have this we can reset its position so that it's in the middle of the space and i find that a depth for walls is yeah which would be here 0.1 is quite appropriate now regarding scale what i find is really great about unity is that scale is basically in meters so if you want um five meters for instance i'll just type in five and that should equate to approximately five meters also now having done this we see that the wall seems to be yeah long enough but it's not very tall it's quite short so to change this we are going to change the value of the y-axis not from just one meter but to yeah anything you like you don't really have to measure how tall it is inside uh your actual apartment if you prefer to have some more room above your head in the virtual then just go for it i'm going to choose about three meters i think something to notice here is that when i did this it increased um its height sort of in both directions as it were so the wall is now going beneath the grid as you can see here which is now above us so um there's probably a fancy unity way to do this to make it line up there but i don't know it you can just drag it up so another thing we should do is also just reset the position of the plane let's see yeah then it looks more appropriate and we can also use that as a reference of course for where the floor is so now that we have this wall the rest is kind of intuitive we just need to make more walls and we need to make one wall for each of the walls in the apartment and that's just about it then we have the outline and can start introduce elements into it and actually make it into a vr game so um to do this you can for instance if you have walls of similar size which we usually do you can just duplicate these cubes you can choose them in the hierarchy and for instance do control d there are also some nice hotkeys to know in terms of manipulating the transform variables here so e for instance will give you the rotation so before you're sort of able to rotate these things in your mind and actually know the rotation position um it's maybe useful to drag it along this line and you can see okay that's 93 degrees i'll just write in 90. and if you click w that takes you back again to the normal um transform position which you can make and drag it back so if i do this for instance i'll basically have um yeah the start of my living room and you might want to have to make doors we're not going to make super fancy doors right now more like holes in the walls but this will be determined by your actual measurements so before the next step you'll just have to recreate your apartment in this manner create the walls design it for the scale for instance five meters or whatever you have and actually place these around as they appear in your apartment so if you've made your walls rotated them and positioned them so that the configuration looks something like your apartment then you should be good on your way in my case it looks something like this here's my living room there's the bedroom this is more like a hall and this is where i'm sitting right now and this is the kitchen and i just yeah i've excluded the bathroom because i'm not going to use vr in there but whatever for you now it's still very white it's unfurnished there's not a lot of stuff going on so we're going to try to make this a bit better for instance we can start with the floor just to show you how this is working so we're going to need a texture for the floor um we're just going to use an image it works quite well um and yeah you can just go to google and search for these things so i've typed in floor textures seamless seamless is important because then we can reuse it and download so there are different sites for this and you can have subscriptions and whatever i just like to prototype very easily and very quickly so i just go straight to google but then yeah download that image and i'll show you how you can put it in to your unity assets so the assets is in the project pane down below here the only pain i think that we haven't really been discussing that much that we'll use and yeah you have different folders i have too many disorganized folders down here but you can create your own folders and add files so you can basically take your file i download mine to the desktop and you can drag it in here so to add this to for instance the plane that makes our floor we can just highlight it and drag it over so that's very simple however it appears that it's trying to fill this image across the whole plane which of course looks a bit weird so it looks like i'm living in yeah a small dollhouse or something to change this you can select it over here and go down to tiling because here we have the possibility to replicate the image across the whole plane um x amount of times instead of just one time so if i put in 10 by 10 here it looks a bit more normal like a normal pocket floor the same thing goes for the walls you just have to apply a texture that you like to the various walls and play a bit with the tiling and offset i can give you an example i choose this wall add the texture and again you may want to play a bit with the tiling there's also an offsetter if you find that it doesn't work exactly in the various corners and instances you can just play around there so you can do this with all your various walls and then we'll start with furnitures alright so if you feel happy with how your walls are looking and your floor um i didn't really change much here then we can go on to the next step which will be adding furniture for instance like couches tvs bookcases or in if you have a special idea in mind maybe you don't want your apartment to look like your real apartment at all um yeah you can find what you're going to populate your environment with so to do this the most easy way you can go to polly.google now here is a lot of user generated content as well as just content from google themselves that are free to use especially if you for instance in my case making a video i might have to credit the artist but apart from that you can just download and use it luckily for a lot of these they are very low poly which means that they have few polygons less triangles for your oculus quest to render which is also very useful but for instance we can search for um couch or sofa yeah and there we have one right by danny bitman and we can just download this i prefer obj file that works well you can just drag it straight into unity now these come in a zip folder so you just have to unzip it first uh winrar trial yeah and then you have the folder here so you can just drag this whole thing into your assets and where did it go there we go so again you can just drag it inside your virtual apartment again in regards to scale objects are not the same as walls they do not adhere to any form of real scale at least it doesn't seem so and it also varies so some objects may be seriously ten thousand times larger than your apartment in this case we were quite lucky um it looks like uh decent couch maybe it's a bit small but you'll notice that better when you actually place it um here i think i'll have to maybe double um this one on all its axis to make it a bit more appropriate yeah but then you'll just place it so um you can do this with all the objects that you want in your apartment there is a lot of things that google poli for instance bookcases yeah you have a lot of stuff or um oh you can have a nightstand and even your gaming computer i think yeah exactly so you can just do this and um yeah furnish your apartment and we'll take you to the next and actually last step being able to step inside your creation because now we've gone through how it is like to actually use the unity editor to create a 3d environment and we just need to be able to step inside of it so that's the last step all right as you can see i have inserted a bit more 3d objects into the apartment like a table chairs a carpet fireplace and yeah a lot of stuff so i hope that you've done the same because now we've come to the last step of the tutorial which is to integrate this yeah into your vr headset so um you may remember from the beginning that we had a camera inside the scene we're not going to use the traditional camera that unity operates with um instead we're going to use an oculus camera so you can delete that one i already have so there's no cameras rendering when you've deleted it you can go to the asset store and now we're going to download something from this integrated store into unity which is free and is something that oculus is yeah providing for developers so that they can um yeah develop for oculus so you can go into this it's just the first thing that's going to pop up and um you can probably for you it will say download or import for me it says update but it's the same thing and yeah once we have this inside i'll show you what you're going to do with it okay so if you've downloaded your oculus assets from the asset store and imported it into your project you should be good to go you can then find your oculus folder in the asset folder um let's see here and you can go into the subfolder vr and further into prefabs now here i'm going to choose the ovr camera where you can insert this into my scene so there we go and this is really the trick of synchronizing or calibrating your apartment you're going to place the virtual camera where you are going to start the application in um real life in your actual apartment so for me i'm going to put it between these two doors let's see here something like that and that means that this is the exact spot that i'll have to start the application at okay one more thing that we should do is to add controllers to our camera rig so we are already in the prefabs folder here um if not you can just go to assets oculus vr and prefabs and there you can see the ovr controllers now if you find your ovr camera rig again in the hierarchy here or in the scene view we can open this and we see that there is a left hand anchor and a right hand anchor and we can just add the controllers within these so now we've done that if you click at the one for instance now i'm in the left hand but i see that in the inspector here this is the remote that is being tracked is the right one so i need to click the left now it says mixed and i'll take off so now the left is left here and let's see the right is the right uh yeah so then we have the controllers set up we're not going to use any interaction like i said but it's really nice to be able to see your hands inside the environment all right so we're ready to build the project to our oculus quest you need to plug it into your computer using usb cable when you've done that you can go to file and to build settings right now i am in unity 2021 3 f1 if you have an earlier version of unity you may have to do some other choices but there are plenty of videos showing you this i think it should be relatively similar however i just chose 2020 because i know there are some new settings and most people are probably using the latest version so um the first thing is that we can see the scenes we have in our build we only have one scene in my case this is called the main scene but to add scenes to your build you can just click add open scenes if you are inside your scene right now also you may remember that we installed the android build tools in the start of this tutorial this is when we get to use it so um don't choose pc mac or linux standalone choose android and here you can also hopefully see the oculus quest that you have connected to your computer when you have chosen android here and you've added your scene um to the build and you hopefully have your oculus quest running um we should change some other settings in the player settings which are down here to your left and the first thing you're going to want to do is to go down to xr plugin management now this is quite new um if this is the first time you're doing this which it probably is since you're watching this tutorial you may have to click install up here first but when you've done this it's very simple you have to choose oculus when you have chosen oculus in your xr plugin management we can go up to player over here here there are a lot of options which you can play with you can give yourself a company name product name version name and if you scroll further down you can also see that yeah a package name and a version again but what is actually important to fill in uh is the minimum api level and i think with the xr plugin management the minimum api level has to be 23 but the target api level you can always just have on automatic which is the highest installed there are a lot of other settings as you can see here but we're going to try to keep this short and yeah if you want to take a deeper dive there are lots of other tutorials on builds on youtube so you can just lock this now and then we can hit build and run all right so then that was done just gonna check here in the console build complete with a result of succeeded this means that we can actually try it on the quest so i got mine here and i'll just show you how i'm actively um using this method that we talked about to calibrate it so that it actually is matching okay so for this part of the tutorial you're going to need your oculus quest and one controller so we grab this and then you're going to choose the spot that you chose as your calibration point in the virtual environment as you may remember for me this was between these two rooms so basically when you have the application open which should be launched by unity you need to put the headset exactly where you had it in the virtual apartment now i'm going to put it on the floor and i'm putting my hand right there so it activates the motion sensor having done that i keep my controller and i push down this oculus button right here which makes it reset the camera to that position after that it is calibrated and i can put it on all right we did it we're finally at the end we're in the virtual apartment uh there's the calibration spot we used and yeah this has some great benefits um you can do this you can lean your controllers towards things uh you can go around you can sit down in the couch like this and yeah i mean it's a new way to appreciate virtual environments um and if you actually implement something in here that you can use you have a giant giant play space in my case of like 60 square meters or something yeah and it's a good feeling to be able to go between the rooms now in the very poor kitchen i need to make something in here yeah but we can go into the production room as well and again sit down in the couch i haven't done much with the tv in front of here um but yeah it would be interesting to have different applications in different rooms and yeah just whatever there's so many things that we can do and i hope that when you experience this yourself um you can turn to some ideation and actually um yeah make some great stuff but yeah that's basically it um i hope you enjoyed this tutorial if you did please click like to the video and also subscribe to the channel if there are more tutorials you guys would like to have then yeah just give me a shout out and i'll um try to make this so thank you again and please subscribe to the channel if this is your kind of thing all right cheers
Info
Channel: AltVR
Views: 339,845
Rating: undefined out of 5
Keywords: 1:1, calibrated, oculus quest, oculus quest 1, oculus quest 2, oculus quest 2 ar, oculus quest 2 developer mode, oculus quest 2 gameplay, oculus quest 2 games, oculus quest 2 home environment, oculus quest 2 passthrough, oculus quest 2 unity, quest 2, quest 2 passthrough, synchronized, tutorial, unity oculus quest, unity oculus quest 2, unity tutorial, unity vr, virtual apartment, virtual room, vr apartment, vr home, vr house, vr room
Id: TcyOVd6awZY
Channel Id: undefined
Length: 27min 13sec (1633 seconds)
Published: Sun Aug 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.