Virtual Reality Framework

08AugLinner751R
A younger version of me at the time I was working on this project.

Introduction

In the summer of 2008, I was hired to develop a virtual reality framework for the Calvin College Computer Science Department under the supervision of Drs. Joel Adams and Keith Vander Linden.

Joel Adams and Josh Holtrop had already built the virtual reality (VR) system in Fall 2006 for Josh's senior design project. They had ordered the hardware, written the software, and even built an example application. My project's goals were to design and develop an object-oriented framework using the system so that introductory computer science students would be able to create their own virtual reality applications.

The Project

I wanted to design the framework to be easily understood and extended by intro students who had only recently learned how to program. We decided to write it in C++ and eventually made Java bindings for it so students in several of the intro-level courses would be able to use it. I kept the framework simple and followed the best coding and design practices. Example objects included a VirtualWorld class that contained all objects that a user could interact with, a Tracker class to keep track of the Position3D and Orientation of any motion trackers and to communicate with the hardware, a Display class for visual output, and a Lightsaber class to describe the lightsaber weilded by the user. All objects were designed such that they could be extended later with minimal effort, such as if the lab later obtained better hardware.

"If a picture is worth a thousand words, then a movie is worth a thousand pictures, a simulation is worth a thousand movies, and a framework is worth a thousand simulations."
—My personal adage for scientific computing

I learned a lot about software design, from low-level driver code to communicate with the VR headset and motion-trackers, all the way to user interfaces via the Simple DirectMedia Layer (SDL) library. I learned a few things about dynamic computer graphics using OpenGL. By the end of the summer, I had not only finished the framework, I had written a few example applications both to highlight the capabilities of the framework, to hint at new applications, and so that future developers would be able to see how a new VR application could be built.

Demo Applications

My favorite application was the Jedi Trainer, which was the flagship application for the VR system. This app was a greatly expanded version of the original example application by Josh Holtrop, but now was running on my framework. In this game, users hold a lightsaber and try to deflect oncoming missiles shot from a moving training droid, as Luke Skywalker does in Star Wars: Episode IV – A New Hope (see the video clip below). In addition to rewriting it from the ground up using our VR framework, I fixed some graphical and driver issues and allowed it to be projected from a second screen, so the user's friends could see what they were seeing. Throughout the summer, I gave tours of the lab to visitors and prospective students, so I took a little time to make the game more exciting and immersive.

Of the other demo applications, the simplest was designed to demonstrate user interaction possibilities. Although the user's movement in the real world is limited by the VR system's headset being tethered to the ceiling, the user could navigate in the virtual world by only moving their body slightly in a given direction. In another application, the user could place atoms (represented by colorful spheres) using their hands. If they brought the atoms close enough together, they would bond together and molecules could be constructed and visualized.


The content of this page was last modified on Thursday, 17 February 2022 23:53:38 (UTC).

I wrote the HTML and CSS for this website by hand in order to teach myself web design. It may not be the flashiest web page, but I am proud of it!