0% found this document useful (0 votes)
22 views11 pages

Lab 1A - VR Project Setup

Uploaded by

denjay744
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views11 pages

Lab 1A - VR Project Setup

Uploaded by

denjay744
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Title: VR Project Setup

Objective(s):

By the end of this lesson, you will have a new unity project with a big empty room that
you will experience in VR.
Module Code
GD53002FP Tools, Equipment and Materials:

1 Personal Computer with Internet access


2 Unity 2021.3 LTS
3 Oculus Setup
4 Quest 2 VR headset

Duration
2 hours

1
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Instructions:

Step 1 – Open a new VR project.


The first thing you must do is create a new Unity project configured for VR.

1. Download and extract the Create with VR starter project:


Module Code • Click to download the file: Create with VR Starter Project.
• To extract on Windows: right-click the downloaded file and select Extract All.
GD53002FP
2. Rename and relocate the project on your computer:
• Locate the folder called “VR Room” inside the extracted folder.
• If you want, rename the project folder to “IndexNo_VR Room_[Your Name]”
• Move the project folder to a logical directory on your computer (e.g. a folder
called “IndexNo _[YourName]_IMP” on your desktop).

3. Add the VR Room project to the Unity Hub:


Duration • Open the Unity Hub.
2 hours • Add your VR Room Project to the list of projects in the Unity Hub. If you are not
sure how to do this, check out this tutorial on adding projects to the Unity Hub.
• If you see a warning icon next to the Editor version of your project, don’t worry.

• This just means that the project was created with a specific version of Unity that
you don’t have on your computer. If you have installed a version of Unity
beginning with 2021.3.X, the project will run perfectly.

4. Open the project in Unity 2021.3 LTS (Long-Term Support):


• From the Editor Version dropdown, select a version of Unity beginning with
2021.3, then select Open with 2021.3.X.
• If a window pops up asking if you want to “Change Editor Version?”, select
Change Version.

2
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
• If a warning pops up that you are Opening Project in a Non-Matching Editor
Installation”, select Continue.

Module Code
GD53002FP

• Your project should now open in Unity.


Duration • If there are yellow warning messages in the Console window about some of the
assets, you can ignore them or clear them.
2 hours
• This process will take some time (maybe 10 mins). Feel free to go for a break!

5. Explore the contents of starter project and how differs from a empty project:
• From the top menu, select Window > Package Manager.
• In the left panel of the Package Manager, locate the packages installed in this
project (with checkmarks next to them), including:
o OpenXR Plugin
o Universal RP (Render Pipeline)
o XR Interaction Toolkit
o XR Plugin Management
• Note: to filter and view only packages currently installed in the project, from the
top-left corner of the Package Manager window, select Packages: In Project.

You should now have your new VR starter project open to an empty scene and
understand which packages allow for compatibility with VR.

3
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Step 2 – Open and explore the starter scene.
Before you run the project, you should choose a more interesting environment to
experience in VR.

1. Rename and open the Starter Scene:


Module Code • From the Project window, open the Scenes folder.
GD53002FP • Rename the “Create-with-VR_Starter-Scene” as “00_[Your_Name]_Room”.
• Double-click on your renamed scene to open it.

2. Explore the contents of starter project and how differs from a empty project:

• From the Hierarchy, select the XR Rig object and inspect the XR Origin
component.
• Select XR Rig > Camera Offset > Main Camera and inspect the Tracked Pose
Duration
Driver component.
2 hours • Select either the LeftHand Controller or RightHand Controller object and
inspect the XR Controller component.
• Select the Input Action Manager object and inspect the Input Action Manager
component.

You should now have your new scene open. You should also have a broad
understanding of the components of the scene that make it different from a typical
Unity scene.
Note: This scene and its settings have been pre-configured in this starter project
since they are required for VR development in this course. If you want to learn how
to configure a VR-ready project similar to this from scratch, there are instructions in
this tutorial: Create a VR Starter Project from Scratch.

4
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Step 3 – Add a room and background.
This empty scene would be boring to explore in VR, so you should add a room that
will be a bit more interesting and will provide more perspective when you’re in VR.
1. Add a room to the scene:

• In the Project window, expand Course Library > _Prefabs > Rooms.
Module Code • Drag one of the Room_[style] prefabs into the Hierarchy.
GD53002FP • From the Hierarchy, delete the Plane object.
2. Add an environment outside the room’s windows:

• Open the Course Library > _Prefabs > Environments folder.


• Drag one Foreground object and one Background object into the Hierarchy.
3. Adjust the sunlight in the room:

Duration • Change the X and Y rotation of the Directional Light object to change the
way sunlight enters your room.
2 hours

You should now have room, foreground, and background objects in your scene from
the course library, with sunlight entering the room at the desired angle.

5
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Step 4 – Run the app with the Device Simulator.
You can test the scene with a Device Simulator. This simulator allows you to test the
app in-editor using the mouse and keyboard, rather than having to connect to a
device and put it on. This can be helpful for quick tests.

Module Code 1. Add the Device Simulator to the scene:


GD53002FP
• From the Project window, open Samples > XR Interaction Toolkit >
[version] > XR Device Simulator.
• Drag the XR Device Simulator Prefab into the Hierarchy.
• Click Play to test the simulator.

2. Experiment with the keyboard and mouse controls:


Duration • Note: The simulator requires a mouse with clickable scroll wheel.
2 hours • To control the camera: hold right-click.
• To control the left controller: hold Left Shift or toggle with T.
• To control the right controller: hold the Spacebar or toggle with Y.
• To pan around with a device: move the mouse.
• To rotate a device: hold the middle mouse button.
• To reset the position and ro tation of devices: press V.
• If you’d like a helpful guide, download the PDF of the Rig Simulator Shortcut
Cheat Sheet.

3. See more controls available for the device simulator:

• From the Hierarchy, select the XR Device Simulator.


• In the XR Device Simulator component, double-click on one of the Action
variables to open the Action Editor.
• Expand the Actions to view their Bindings.
• From the left Action Maps panel, select either Main or Input Controls to view
additional action mappings.

4. Important: disable the Device Simulator if you do not plan on using it:

• Select the Device Simulator object then disable it in the Inspector window.
• Having the device simulator active when running the project on your device
will cause problems.

6
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications

Module Code
GD53002FP

Duration • You should now be able to look around your room with your mouse and
keyboard using the Device Simulator.
2 hours

7
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Step 5 – Test in VR through Unity
To run the project on your device through Unity, you need to install the correct plug-in
for development. OpenXR is an open-source API that connects Unity to supported VR
hardware devices. It is recommended that you use this plug-in, since it allows you to
deploy to multiple devices through a single, standardised API.
Module Code
GD53002FP 1. Install the OpenXR Plugin for desktop testing:

• From the top menu, select Edit > Project Settings, then select the XR Plug-in
Management panel from the sidebar.
• In the Windows, Mac, Linux tab, select OpenXR from the list of available Plug-
in Providers to install that plug-in.

Duration
2 hours

2. Resolve any warnings by setting up an interaction profile.

• After adding the OpenXR plugin, there may be a warning or error icon that
appears next to the plugin Name.
• If there are no warnings or errors, you can skip to step 3 below to connect your
device through the Quest Link Software.
• If there is a warning, click on the warning icon to open the OpenXR Project
Validation window, which will tell you that you need to add an interaction
profile for the device you’re using.
• Select the Fix All button to open the OpenXR settings panel.

8
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
• In the Windows, Mac, Linux tab, make sure the Oculus Touch Controller
Profile appears in the list of Interaction Profiles.

Module Code
GD53002FP

Duration
• There should no longer be any warnings in the XR Plugin Management panel.
2 hours
If there are, select them and follow the recommended steps to resolve them.
• If you are having trouble resolving warnings or errors, or if you need help
troubleshooting, check out this detailed documentation on configuring the
OpenXR plugin.

3. Connect your device through the Quest Link Software:

• Make sure your device is plugged into your computer using a compatible cable.
• Make sure the Quest App is running and has successfully recognized your
device.
• If you have not yet downloaded the Quest App, you find it on the Link Setup
page.

9
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications

Module Code
GD53002FP

Duration
2 hours

4. Test the project on your device:

• Make sure the XR Device Simulator in your scene is disabled. If it is enabled,


your head tracking will not work.
• Select Play in the Unity Editor and put on your headset.

On a Windows computer, you should now be able to quickly test your app on your
device through Unity.

10
Copyright © ITE 2023
Higher Nitec in Immersive Applications & Game

LABSHEET 1A
Module
Immersive
Applications
Summary

• New Features:
o Project is set up.
o Scene set up with Room.
o Tested with Device Simulator
Module Code o Run on device.

GD53002FP • New Concepts & Skills:


o Pipelines for different types of hardware
o Packages required for VR Development
o VR scene vs typical Unity scene
o Rig Simulator vs on-Device testing
o Tethered testing
Submission
Duration
2 hours • Make sure your Unity Project folder is named as IndexNo_VR Room_[Your
Name]
• Zip the Unity Project folder.
• Submit on to MyConnexion.

- End -

11
Copyright © ITE 2023

You might also like