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




Wednesday, March 26, 2008

'The Amish' and 'The English'







Ok, the article might sound silly to those of you who already know about the Amish people, but I recently visited Topeka in North-East Indiana and was amazed at these people! We were going to Topeka to visit a manufactured houses factory and before starting were warned by our Professor not to take pictures of Amish people as they don't like it.. I said "whatever".


The journey was amazing, the rising sun through the beautiful countryside reminded me of India ! We reached the factory and Mr. Shawn Way received us there, showed around the place etc. I saw the Amish people working there, distinguished by there beard and no mustache and clothes almost as if they were all in uniforms. As reminded I did not click any pictures and moved on. The energy of these guys and the speed at which they were working was amazing. We then left the factory for lunch. On our way I saw a horse cart, i could not believe my eyes, "I am in America or what?" And then I saw another one.. Upon asking Shawn said, "Amish people don't use technology in any form.." And we all were like. "What are you talking about?"

Rest of the evening was more like a questionnaire to Mr. Shawn about these amazing people... From what he told us:
Amish people are highly conservative Christians. They came from Germany in early 1700 and settled in USA. They don't use technology, that means they don't use cars, instead they travel in horse carts. The wheels of these carts have a iron lining and no rubber tyres as rubber again is an artificially created material. But they are allowed to travel in vehicles if they are not driving it. They don't use electricity in their houses, no heating and lighting through electricity. In a place like North-Eastern Indiana where the winters are so harsh, these guys heat their houses by burning wood. They have oil lamps in their houses for lighting. Anyways they get up early, work only till 2 pm and go to bed early, so they don't have to expend much on lighting their house interiors. They have no televisions or radios in their houses, and bare minimum of furniture. Roads are simply of compacted soil, like the one in the photo on the left. They wear very decent clothes and looks almost like they are all in uniforms. Women were gowns and a small hat. As far as the food habit are concerned they don't have restrictions, I saw them in Subway where we were having our lunch.


They don not accept any grants or aid from the government. They don't take any kind of insurance for health, property etc. They do farming and also work in factories around the place which is permitted according to their church. On asking what do they do of the money they earn, Shawn said, they just buy more and more land... They gift these lands in marriages etc.


Everything that is not Amish, is 'English' according to them. So they will call me or Youjung from Korea or Mr. Shawn a local.. all as 'English'. With no radio or TV or newspapers they hardly know about the world beyond theirs, that USA is on war and where India is on the map. I guess they speak Dutch and they have their own schools. Now, every Amish boy and girl is allowed to go check out the 'English' world sometime in their teens. They can live the American way, wear whatever clothes, do whatever they want to. Then they are given the choice of being in the Amish clan or becoming an English. Usually that will mean that individual is an outcast.





There is also a branch of Amish called the New Amish which simply means they allow use of technology to some extent. So, they have a small telephone booth setup outside the house commonly shared by few houses for contacting in emergency. Or even using rubber tyres for their carts. I am shocked and amazed how they are still living and maintaining their life style and sustained after so many years, that too in America. Now there are surely many more people at least many in India that are forced to live life like that, but its unexplainable why someone will not use technology even when one has the choice. And they are genuinely peace loving people and happy the way they are!!

The picture above is a nice irony, the increasing rates of gas in USA on one hand and the unaffected carefree Amish cart on the other; both co-existing in the most prosperous country in the world! One thing is certain, if happiness is the pursuit of mankind, technology may not be the answer.

(Disclaimer: The information I have published here may not be completely correct. But it is seen and discussed first hand with a local person. Also, respecting their culture, I have not clicked any photos of Amish people and so can not have them on this blog)