Difference between revisions of "Homework3W13"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(Extra Credit (10 Points))
(Application (100 Points))
 
(13 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
For this assignment you can obtain 100 points, plus up to 10 points for optional work.  
 
For this assignment you can obtain 100 points, plus up to 10 points for optional work.  
  
The goal of this project is to create an application which uses the Razer Hydra to allow the user to build [http://0.tqn.com/d/collegeapps/1/0/L/2/-/-/ucsd_geisel_kafka4prez_flickr.jpg Geisel Library] out of building blocks.
+
The goal of this project is to create an application which uses the Razer Hydra to allow the user to build [http://0.tqn.com/d/collegeapps/1/0/L/2/-/-/ucsd_geisel_kafka4prez_flickr.jpg Geisel Library] out of building blocks. [http://www.houseofjapan.com/electronics/3d-virtual-building-block-system-works-without-markers-or-sensors The video on this web page] might inspire you.
  
 
==Razer Hydra==
 
==Razer Hydra==
Line 11: Line 11:
 
The Hydras can be picked up from the instructor's office, Atkinson Hall room 2125. The office door should be open all day. If the instructor is not in the office, please '''sign one of the borrow agreements''' and leave it on my desk, then take a Hydra from one of the boxes on the floor.
 
The Hydras can be picked up from the instructor's office, Atkinson Hall room 2125. The office door should be open all day. If the instructor is not in the office, please '''sign one of the borrow agreements''' and leave it on my desk, then take a Hydra from one of the boxes on the floor.
  
To use the Hydra, you will need to first [http://www.razersupport.com/index.php?_m=downloads&_a=viewdownload&downloaditemid=624 download the driver]. If you use the lab computers the driver is already installed.
+
To use the Hydra, you will need to first [http://www.razersupport.com/index.php?_m=downloads&_a=view&parentcategoryid=181&pcid=166&nav=0,166 download the driver]. If you use the lab computers the driver is already installed.
 +
 
 +
If the above driver doesn't work on your computer, you could try [http://www.razersupport.com/index.php?_m=downloads&_a=viewdownload&downloaditemid=624 version 1.00].
 +
 
 +
There is even an [http://www.ros.org/wiki/razer_hydra open-source Linux driver for the Hydra], which we have not tested, but it supposedly works.
 +
 
 +
The Hydra SDK can be downloaded through Steam, but it's much easier to just download it by its direct URL, which, thanks to Thinh and Arick is listed below for various operating systems:
 +
 
 +
* [http://sixense.com/windowssdkdownload Link to SDK (Windows)]
 +
* [http://sixense.com/macsdkdownload Link to SDK (MAC/OSX)]
 +
* [http://sixense.com/linuxsdkdownload Link to SDK (Linux)]
  
 
==Application ('''100 Points''')==
 
==Application ('''100 Points''')==
Line 17: Line 27:
 
Your application needs to have the following features:
 
Your application needs to have the following features:
  
* There needs to be a ground plane (for instance, created with osg::InfinitePlane), or some other surface which doesn't have to be flat, to build on.
+
* There needs to be a ground plane (for instance, created with osg::InfinitePlane), or some other surface which doesn't have to be flat, to build on. ('''10 points''')
* The mouse should rotate the world with the ground plane and the bricks on it, but not any of your menu items.
+
* Unless you use the Hydra for it, the mouse should rotate the world with the ground plane and the bricks on it, but not any of your menu items. ('''10 points''' for rotation regardless of method)
* Allow the user to create at least 5 different shapes of blocks, for instance with the osg::Shape Class, which supports Cone, Box, Cylinder, Sphere. There should be models for all possible shapes on the screen to choose from, for instance in a column along the right edge of the screen. Make sure you choose blocks appropriate for the task of creating Geisel Library.
+
* Allow the user to create at least 5 different shapes of blocks, for instance with the osg::Shape Class, which supports Cone, Box, Cylinder, Sphere. There should be models for all possible shapes on the screen to choose from, for instance in a column along the right edge of the screen. Make sure you choose blocks appropriate for the task of creating Geisel Library. ('''25 points''')
* The Hydra wands need to each have a cursor in different colors. Cone-shaped cursors would work well, but any shape will be fine.
+
* The Hydra wand need to each have a cursor. A cone-shaped cursor would work well, but any shape will be fine. If both Hydra wands are used, they need to have cursors in different colors. ('''10 points''')
* Allow at least five different colors to be used for the blocks, all of which should be clearly distinguishable from one another, the background and the ground plane. Display color widgets on the screen, for instance along the top edge of the screen. The color widgets could be displayed as colored spheres, but any other shape would also work. Make sure that task-appropriate colors are among your colors, for instance grey for concrete, blue for windows, green for plants.
+
* Allow at least five different colors to be used for the blocks, all of which should be clearly distinguishable from one another, the background and the ground plane. Display color widgets on the screen, for instance along the top edge of the screen. The color widgets could be displayed as colored spheres, but any other shape would also work. Make sure that task-appropriate colors are among your colors, for instance grey for concrete, blue for windows, green for plants. ('''25 points''')
* To place a block, the user should click a button on the Hydra's wand when the cursor is on a shape to select it and create a copy of it, which will attach to the cursor (and possibly replace it). Then, while the button is held down, the user moves the shape to the color widgets, and when the wand cursor gets close to one (distance origin-to-origin below a threshold) the block will assume that color. Finally, the block is placed on or above the ground plane by releasing the button. Wherever the block is put it will stay, even in mid-air. There is extra credit for physics simulations, see below.
+
* To place a block, the user should click a button on the Hydra's wand when the cursor is on a shape to select it and create a copy of it, which will attach to the cursor (and possibly replace it). Then, while the button is held down, the user moves the shape to the color widgets, and when the wand cursor gets close to one (distance origin-to-origin below a threshold) the block will assume that color. Finally, the block is placed on or above the ground plane by releasing the button. Wherever the block is put it will stay, even in mid-air. There is extra credit for physics simulations, see below. ('''10 points''')
* Blocks are allowed to intersect each other, there needs to be no collision detection.
+
* Blocks are allowed to intersect each other, there needs to be no collision detection.  
* The application should support both Hydra input devices, equally privileged. You will need to ascertain that the user can create blocks with both hands at the same time.  
+
* The application should support both Hydra input devices. It is up to you to decide what each wand will be used for. ('''10 points''')
 
* Only one button on each Hydra wand should be used for this application.
 
* Only one button on each Hydra wand should be used for this application.
  
Line 37: Line 47:
 
* Add physics simulation to the behavior of the building blocks: when you drop one, it should not just fall until it hits another block or the ground plane, but it should bounce off other blocks and the ground plane until it comes to a stop, like a real building block would. You are welcome to use an open source  [http://en.wikipedia.org/wiki/Physics_engine Physics Engine], but it may be easier to implement your own very specialized physics engine for this task.
 
* Add physics simulation to the behavior of the building blocks: when you drop one, it should not just fall until it hits another block or the ground plane, but it should bounce off other blocks and the ground plane until it comes to a stop, like a real building block would. You are welcome to use an open source  [http://en.wikipedia.org/wiki/Physics_engine Physics Engine], but it may be easier to implement your own very specialized physics engine for this task.
  
* Turn the blocks into Lego bricks. Put little cylinders on their top surfaces in regular grids like real Lego bricks, and make pieces snap to one another when they get close enough.
+
* Turn the blocks into Lego bricks. Put little cylinders on their top surfaces in regular grids like real Lego bricks, and make pieces snap to one another when they get close enough. If you put enough effort in it, you might be able to compete with [http://ldd.lego.com/download/default.aspx Lego Digital Designer]!

Latest revision as of 01:11, 22 February 2013

Contents

Homework Assignment 3: Building Blocks

For this assignment you can obtain 100 points, plus up to 10 points for optional work.

The goal of this project is to create an application which uses the Razer Hydra to allow the user to build Geisel Library out of building blocks. The video on this web page might inspire you.

Razer Hydra

This homework assignment requires the use of a Razer Hydra input device. Every team/individual is going to get to borrow one from the instructor for the remaining weeks of the quarter. If you work as a team, please take only one.

The Hydras can be picked up from the instructor's office, Atkinson Hall room 2125. The office door should be open all day. If the instructor is not in the office, please sign one of the borrow agreements and leave it on my desk, then take a Hydra from one of the boxes on the floor.

To use the Hydra, you will need to first download the driver. If you use the lab computers the driver is already installed.

If the above driver doesn't work on your computer, you could try version 1.00.

There is even an open-source Linux driver for the Hydra, which we have not tested, but it supposedly works.

The Hydra SDK can be downloaded through Steam, but it's much easier to just download it by its direct URL, which, thanks to Thinh and Arick is listed below for various operating systems:

Application (100 Points)

Your application needs to have the following features:

  • There needs to be a ground plane (for instance, created with osg::InfinitePlane), or some other surface which doesn't have to be flat, to build on. (10 points)
  • Unless you use the Hydra for it, the mouse should rotate the world with the ground plane and the bricks on it, but not any of your menu items. (10 points for rotation regardless of method)
  • Allow the user to create at least 5 different shapes of blocks, for instance with the osg::Shape Class, which supports Cone, Box, Cylinder, Sphere. There should be models for all possible shapes on the screen to choose from, for instance in a column along the right edge of the screen. Make sure you choose blocks appropriate for the task of creating Geisel Library. (25 points)
  • The Hydra wand need to each have a cursor. A cone-shaped cursor would work well, but any shape will be fine. If both Hydra wands are used, they need to have cursors in different colors. (10 points)
  • Allow at least five different colors to be used for the blocks, all of which should be clearly distinguishable from one another, the background and the ground plane. Display color widgets on the screen, for instance along the top edge of the screen. The color widgets could be displayed as colored spheres, but any other shape would also work. Make sure that task-appropriate colors are among your colors, for instance grey for concrete, blue for windows, green for plants. (25 points)
  • To place a block, the user should click a button on the Hydra's wand when the cursor is on a shape to select it and create a copy of it, which will attach to the cursor (and possibly replace it). Then, while the button is held down, the user moves the shape to the color widgets, and when the wand cursor gets close to one (distance origin-to-origin below a threshold) the block will assume that color. Finally, the block is placed on or above the ground plane by releasing the button. Wherever the block is put it will stay, even in mid-air. There is extra credit for physics simulations, see below. (10 points)
  • Blocks are allowed to intersect each other, there needs to be no collision detection.
  • The application should support both Hydra input devices. It is up to you to decide what each wand will be used for. (10 points)
  • Only one button on each Hydra wand should be used for this application.

Grading

On the due date, you will need to demonstrate your application with a Razer Hydra in the lab on a lab computer or your own laptop. You are going to have to build a simple version of Geisel Library.

Extra Credit (10 Points)

You can achieve 10 points of extra credit in one of two ways:

  • Add physics simulation to the behavior of the building blocks: when you drop one, it should not just fall until it hits another block or the ground plane, but it should bounce off other blocks and the ground plane until it comes to a stop, like a real building block would. You are welcome to use an open source Physics Engine, but it may be easier to implement your own very specialized physics engine for this task.
  • Turn the blocks into Lego bricks. Put little cylinders on their top surfaces in regular grids like real Lego bricks, and make pieces snap to one another when they get close enough. If you put enough effort in it, you might be able to compete with Lego Digital Designer!