Classroom VR


Virtual classroom designed with virtual reality in mind

About


This was my final project for CS 428 (Virtual and Augmented Reality) at the University of Illinois at Chicago during the COVID-19 pandemic. I used Unity 2019.4.1f1 and VRTK 3 to create a virtual mockup of our classroom at human scale, and while there were several different VR libraries available at the time, I used VRTK 3 since it had it great cross-platform libraries and tons of documentation compared to VRTK 4.

Overview of the classroom
Overview of the classroom

For the models, I had to rely on good ol’ Blender to help me quickly construct various models for my classroom scene. I’m definitely happy I got to learn more about using Blender more effectively, but creating human models is something I cannot do. Fortunately, I was able to use MakeHuman to help ease the creation of human models.

Virtual Jon waiting for class to start
Virtual Jon waiting for class to start

Since class was conducted remotely, we were tasked to recreate our classroom in our own unique way. Moving around is done by teleporting, since that works best to minimize motion sickness, and I also added a bunch of models that I normally interact with in my daily life, like a washing machine…but inside our classroom. All the smaller objects are grabbable and can be carried around and placed down wherever since every object has collision attached to them. To make the VR experience feel a little more real and fun, an interactable vending machine and jukebox was added. You can play tunes and dispense a literal can of “flat” cola that can be carried and placed wherever.

Interactable vending machine and music jukebox
Interactable vending machine and music jukebox

Lastly, the wall behind where my character is sitting has various light switches can be interacted with to change the lightning in the room. I opted for fun lighting, like red, blue, and rainbow. It’s cool to see how light alone can greatly change the atmosphere of a scene. For example, red lights make being in the classroom a super spooky experience.

Interactable light switch with various colored lighting

So what have I learned?


It’s one thing to code a virtual reality application, but to understand why certain methods are done is far more important. For example, character movement via teleporting versus walking using a control stick. Most games out there don’t use analog sticks as a method of movement in VR because your brain is confused about how you are moving without actually walking physically. This results in motion sickness and can even give you a headache, but if you remember earlier when I mentioned how teleporting minimizes motion sickness, that’s because frame rate also plays a huge role. Running a VR application at 90fps is the minimum recommended standard for a user to enjoy a VR experience. 60 frames-per-second can pass, but only a portion of users can tolerate such a low frame rate, so it’s best to tackle a much larger group and aim for that sweet 90 frames.

Build instructions


  1. First get the source code for this project by clicking the GitHub button below. Once you are in the repository, click the green “Code” button and select either “Download ZIP” or if you have git installed, go ahead and clone the repo. VRTK 3 is already included in the project, so no need to go out of your way to import that library.

  2. Make sure to have Unity Hub downloaded on your computer and activated with a license. On the left, go to “Installs” and, on the top-right, click “Install Editor”. You should see an “Archive” tab, go there and click the link that says, “download archive”. In the archive, look for Unity 2019.4.1 and click the blue “Unity Hub” button.

  3. After it’s installed, in Unity Hub, on the left sidebar, click the “Projects” section and on the top-right, click “Add”. Navigate to the source code you downloaded in step 1 and add from the root of the folder. A bunch of stuff will be imported, so go grab something cold to drink, and relax for a bit.

  4. Once the import is finished, go to the folder “virtualuic-evl”, then in there click “Scenes”. You should see a scene titled, “EVL”, click that and after it loads click the play button above to load and run the scene.

:octocat: Github