Showing posts with label Flex. Show all posts
Showing posts with label Flex. Show all posts

Sunday, April 27, 2008

Envision Spaceship

'Envision Spaceship' is a Virtual Reality project designed to run in the Flex system. It is a part of the Computer Graphics Technology 515 course by Prof. Laura Arns at Envision Center, Purdue University. The project is a study of virtual environment concepts at the envision center to enhance students' understanding of Virtual Reality software and hardware for creating VR based applications.


So what's the Project about?

We have a Space-station in the atmosphere, orbiting around Earth. This station is supposed to launch spaceships to various planets. Our mission is to send a spaceship to Mars, collect some photographs and then move ahead to Uranus to install a telescope. A path has been defined and you should not deviate from it. There is a chance that you hit asteroids if you do so.
The mission has two objectives:

Stage I: Launch the Spaceship
The spaceship can be lifted using the wand after which it follows the wand till you release the trigger. On throwing the spaceship while releasing the trigger, if your speed of throwing is enough, the spaceship will start moving in space and else it will fall down on the space-station deck. Here we measure the speed of the spaceship based on the change in the position of wand just before releasing the trigger.

Stage II: Steer the Spaceship

Once in space, the spaceship's motions can be controlled by the users with the wand. The ship has to be steered along the identified path to take it to Mars and then to Uranus, dodging asteroids on the way. Users can move to the left, right and front. You can look around but you cannot move back.








Following were the 'Four Project Musts' :



  1. Must be in stereo on : Tiled Wall, FLEX or an HMD ( We decided to have our application running in FLEX, which is basically a cube with projector screens on 3 sides and bottom, coolest of the three display systems)
  2. Must have head tracking (Flex takes care of that with the installed IS900 trackers)
  3. Must have true 3D interaction such as having a tracked wand or glove. ( We have a tracked wand which allows you to grab objects and throw/release them)
  4. Must be able to travel/navigate around in the virtual world, beyond the confines of the 10'x10' space of the flex or tiled wall. (We have added features to our program that help users navigate through the virtual space)

Part I: Software


The 3D Models:


The Project has three basic 3D models. The modelling is done in 3D studio Max and the models are exported as OpenSceneGraph files. Following are the three models: Spaceship, Launching Station and the Solar System.



3D studio Max provides a highly customizable and user friendly interactive 3D modelling and animation platform. The 3D Max model can be exported to OSG (Open Scene Graph) to make it a VR application. We had to control each model separately and hence needed the models to be separate. The models were attached to different nodes and the nodes were controlled by transformation matrices in OSG. All models are called simultaneously in OSG and are able to interact with each other. Their relative positions and scaling had to be neatly done.

The OSG Program:

Open Scene Graph is a open source application for graphics programming of simulators, games or other VR applications. It works on a OpenGL framework allowing real-time handling of low level graphics. The OSG program had to be programed to allow us to do the following tasks:

  1. The wand's and ship's position should tracked. If the wand is within a defined area around the spaceship, the software allows you to select the spaceship by pressing the trigger. The spaceship will follow the wand now.
  2. The wands relative position is tracked, which is the distance it has travelled from its last position. This function called the WandRelativePosition is used to know the speed at which the wand (and spaceship) was moving while releasing the trigger. If this speed is enough, the spaceship will escape earth's gravity and travel in space, else it lands back on the deck.
  3. Once in space the user can navigate using the wand. The user will move in the direction the wand is pointing. While doing so, the same button will also accelerate the spaceship in the forward direction. The speed of navigation and the speed of spaceship has been matched so that it appears that the spaceship is a Avatar.
  4. The spaceship can be steered while moving ahead. Buttons on wand can be used to move to the right or left. This helps to stay on the trajectory indicated in the model. Also another button can be used to look around by rotating in the X-Z plane.
By far the OSG programming was the most difficult part of the Project. That is where the team spent most of their time struggling...

Part II: Hardware

The Flex is a cube that has projected screens on its four or more sides. In Envision center we have screens on 3 sides and one on floor. The cube can be opened through the cavecontrol application. Envision's VR Theater is a Fakespace FLEX system featuring three ten-foot by eight-foot panels for rear projection of large-scale 3D images. These movable screens can be easily and rapidly rearranged to form a semi-enclosed room with three walls plus a fourth panel as the floor. This arrangement creates a 3D immersive virtual environment.



Other Hardware includes the wand, head tracker and 3D goggles. The wand allows the users to navigate and to perform programed functions like grab the spaceship, release the spaceship, rotate view and steer the spaceship in space.




The head tracker tracks the position of the users head (eyes) within the flex. This helps to customize the view as per the user. That is, if you bend or move around, the view will change making the virtual environment more immersive.
Also, the 3D glasses allow users to see stereo view. So, each eye gets a different view, just like we see in the real world. This ability allows us to realize distances and 3D perspectives. The result is a really cool, 3D looking immersive Virtual Reality application!





Part III: Evaluation & Results



The Project was mostly a success and the application performed what it was designed for except for the grabbing function. But there is scope for further improvements. Following is the evaluation of the project:

  1. The wand grab function is not working currently. The volume defined around the spaceship for grabing the ship is a box which is probably not large enough for grabbing. Further investigation required.
  2. The speed of the spaceship has to match the user navigation speed. Currently the spaceship goes faster than the user and eventually travels far enough to dissappear.
  3. The spaceship is programed to just go back to its start position when left if the speed of throwing is slow. There could be a trajectory defined for the space ship as it falls depending upon the velocity while releasing, height of spaceship etc.
  4. The solar system can be modeled for realistically. Current version has restricted movements ans the scale is blown out of proportions, which makes it scientifically in correct. A better scientifically accurate model could be useful for making interactive learning program for kids.
  5. Text messages about the mission details, mission status etc could be added. Also sound effects can make the application more enjoyable.



Responsiblities:

Both the team members worked in unison from idea conceptualization to implementing the idea. The responsibilities for the project were shared fairly well and the division of responsibilities is not really tangible. Given below is a rough distribution of work.

Bhushan:

3D Max modeling (some models were downloaded from websites and editied to suite the application)

OSG Programming

Isam:

OSG Programming assistance

Script file related issues handling. Running the application in Flex.


We would like to acknowledge the guidence of Jack in the OSG Programing part.



Refrences:

Purdue University envision center for data perceptualization and visualization (http://www.envision.purdue.edu/facilities.html)


VR Juggler Programmer Guide and the Programmer Reference (http://developer.vrjuggler.org/)


Open Scene Graph website (http://www.openscenegraph.org/)



The Team:





Bhushan Bhalerao

Graduate Student,

Construction Engg. & Management

Email: bhushan@purdue.edu

Isam Badawi

PhD Student ,

College of Technology

Email: badawi5@purdue.edu


under the guidence of:

Prof. Laura Arns

Associate Director,

Envision Center for Data Perceptualization