Virtual Reality

Lecture: Virtual Reality (Video)

Lecture: Networked virtual spaces (Video)

Demo: Lighting, Materials and Textures

Demo: Spatial Sound

Demo: Pickup Objects

Setting up Godot to work with the Meta Quest 2 takes a bit of work. Hopefully this process is a streamlined as possible. There are several steps that must be followed in order. If you make any mistakes you will probably need to start from the beginning, so try to follow the instructions and let me know if anything is unclear.

Video: VR Setup (Part 1)

Video: VR Setup (Part 2)

First, download the Oculus app to connect with the Quest headset. This actually doesn’t need to be done first, but it will take a while to download, so it’s good to get it started. Go to https://www.meta.com/quest/setup/ and scroll down to find the Download Software button. Once it is downloaded, install the app. When you connect the device to the computer via USB cable, there should be a dialog window in the Quest that asks to allow the connection. If you don’t see that let me know and we can fix it.

Now let’s get the Godot scene ready. There are a couple of addons we will need to add before opening the Godot template for it to work correctly. Let’s download those first.

Click to download Godot XR Tools.

This playlist has two videos made by the creator of Godot XR Tools that have an overview of some of the functionality. The library has been updated since the videos were made so not everything is exactly the same.

Click to download Godot OpenXR.

Extract both of these zip files. Each has a plugin located inside of it’s own addons folder. We need to combine them into the addons folder of our own Godot project.

Next, fork the VR_Scene_Template project and then use GitHub Desktop to clone your fork to your computer locally.

Inside the project folder, create an addons folder. Drag the godot-openxr and the godot-xr-tools folders into this addons folder.

Now we can open the project. Double click project.godot. Next we need to enable the two plugins. Go to Project > Project Settings > Plugins and click the Enable checkmark next to both plugins.

Now you should be able to open the Level1 or Menu files in the Scenes folder. If you get any error messages at this point, there may something wrong with the folder setup, and it will probably be best to start over from the beginning.

Now we need to connect the Quest to the PC through the Oculus app. When you open the app you will need to login. Let me know when you are ready and I will login for you with the Makerspace account. Under the Settings > General menu, make sure to click Set Oculus as active next to the OpenXR Runtime setting. Then go to the Devices menu. If the Oculus is connected via USB you should see the device, it should say “Connected”. If not, try unplugging and re-plugging the USB cable. If that still doesn’t work let me know. It can be iffy to get a connection.

Once your device is connected you may need to confirm the account by inputting the device code at https://meta.com/device. The Makerspace account needs to be logged in so let me know I will log you in.

If you don’t see a dialog window prompting you to open Oculus Link, you can find a button to open it in the Quest settings.

This probably won’t work the first time you try it. Remember the power of restarting everything.

Now, when you are in the computer view in the Meta Quest, you should see the Godot scene when you use the scene preview button. If this doesn’t happen, let me know and we’ll fix it.

Eventually, we will build an app that can be deployed on the Quest so it can be played without being plugged into the computer. I’ll add instructions here soon.

To start working on your scene, create a copy of the Level1 scene or make a new scene and Merge the FPSController node from the Level1 scene. When we build the app to deploy on the Quest, we will probably need to include all of our projects in one app to save time, so to make things simpler, create a folder inside the Scenes folder for you project using your name or something unique so we can make a project with all of the scenes together with no conflicts.

Dev Blog Post 1

  • While we’re still setting up our VR scenes, the first dev blog post will be used to describe the idea for your VR scene.
  • What is the theme of your scene? (Include graphics if helpful)
  • What objects will be in the scene?
  • Is there any interaction in the scene? (Besides basic movement)
  • What is the scale of the space?
  • How could sound be used in the scene?

Remember that your scene idea does not need to be a fully functional version of the scene, it can be a proof of concept. For example, you could model a scene for a virtual classroom, but would not need to add network connections or other functions for people to actually join the scene.

Building a Godot App

Video overview

Building a Godot app that can be installed on the Quest headset requires a developer account, which requires a registered credit card. To avoid that, we’ll be building an app together, which I can deploy on each headset, that contains all of the scenes made by the class. That way we can see the scenes deployed on the headset and use them without being plugged into the computer, without everyone having to go through the build process on their own.

To do that, we’ll use GitHub to make sure everything is synced up.

When you are done testing your scene via USB and are ready to commit your scene to the main project, you can follow these steps to upload your scene to the main project.

  • First, make sure your files are in a separate folder, with a unique name such as OwenScene or something that makes it clear its your project. This will be an easy way to avoid conflicts. If you have files that are not part of your main scene like materials and textures, add them to the folder.
  • Open GitHub Desktop.
  • In the left side panel, you should see Changes made to the project. If you recognize all of the changes, go ahead and commit them. If something doesn’t look familiar, you can uncheck it or we can take a look at it together.
  • To make a commit, write a message in the Summary bar, such as “Adds Owen’s Scene.” Then click the blue Commit to trunk button. This adds the current version of your scene to your own project repo.
  • Now make sure you Current branch is set to trunk and click Push. If you see any errors here, let me know and we can take a look.
  • Click on Repository > View on GitHub. This will take you to your default browser. You must be logged into GitHub to complete the next steps.
  • If you see your user name in the repo name on the top left, you’re on the right page. If you see owenbmcc/VR_Scene_Template, you’re looking at the main repo. Click on your own user profile and find your fork of the repo.
  • Here you should see a drop down labeled Contribute. Click on that and then click the green Open pull request button. This will add your scene to the main project.
  • GitHub will review the request first, if there are any issues, it will list them. If not, it should say Able to merge. If it looks good, click Create pull request.
  • I will review the pull request, and if it looks good, I will add it to the main repo, so the next time I build the app, it will include your scene.

In class, I’ll demonstrate building the app so we can see what that looks like. If you ever want to try this on your own, check out the Exporting for Android page on the Godot docs. That page will get you through everything up to exporting the project. To install on the device look at Use ADB with Meta Quest instructions.

Dev Log Post 2

Write a second blog post with documentation of the project.

  • Include images of the scene you created in Godot using screen shots or video from the Godot preview window.
  • Describe how much of the scene you completed.
  • Describe the overall user experience of the scene: What does the user do? How do they interact?

User Testing

In Quest 2 main menu, click on the Apps icon, (the grid of 9 dots), then choose Unknown Sources from the dropdown menu, one app will appear called MEA 300 VR. Click on there to launch the main menu.