Difference between revisions of "Homework3W14"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(Application (100 Points))
(Bullet Engine)
 
(13 intermediate revisions by one user not shown)
Line 3: Line 3:
 
For this assignment you can obtain 100 points, plus up to 10 points for extra credit.  
 
For this assignment you can obtain 100 points, plus up to 10 points for extra credit.  
  
This homework assignment is due on '''February 21st, 2014''' at 1:30pm. Thinh is going to do a Q&A session on '''Wednesday, February 12th''' at 4pm in lab 260.
+
This homework assignment is due on '''February 21st, 2014''' at 1:30pm. Thinh is going to do a Q&A session on '''Wednesday, February 12th''' at '''2pm''' in lab 260.
  
The goal of this project is to use the Leap as the only input device for a building block application.
+
The goal of this project is to use the Leap as the only input device for a building block application, which allows creating collections of building blocks such as in these images:
 +
 
 +
[[Image:blocks2-small.jpg|250px]]
 +
[[Image:blocks4.jpg|250px]]
  
 
==Leap==
 
==Leap==
Line 17: Line 20:
 
==Bullet Engine==
 
==Bullet Engine==
  
This project requires the use of a physics engine. You are welcome to use any such engine of your choosing, including a simple one that you write on your own, but we recommend the [http://www.bulletphysics.org Bullet Engine]. It has even been integrated into OpenSceneGraph through the [https://code.google.com/p/osgbullet/ osgBullet project]. There is excellent [http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World sample C++ code for the engine], as well as an [http://www.youtube.com/watch?v=fr3wDGfZX4g inspirational video].
+
This project requires the use of a physics engine. You are welcome to use any such engine of your choosing, including a simple one that you write on your own, but we recommend the [http://www.bulletphysics.org Bullet Engine]. It has even been integrated into OpenSceneGraph through the [https://code.google.com/p/osgbullet/ osgBullet project]. You are welcome to use osgBullet, but keep in mind that you will have to compile it into OSG before you can use it. If you would prefer to avoid that, feel free to just use the Bullet library directly, without osgBullet.
 +
 
 +
There is excellent [http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Hello_World sample C++ code for the engine], as well as an [http://www.youtube.com/watch?v=fr3wDGfZX4g inspirational video].
  
 
==Application ('''100 Points''')==
 
==Application ('''100 Points''')==
Line 25: Line 30:
 
The application needs to have the following features:
 
The application needs to have the following features:
  
* The playing field should be a plane of unlimited extent (<tt>btStaticPlaneShape</tt>). Give it a color, and optionally even a texture.
+
* The playing field should be a plane of unlimited extent (<tt>btStaticPlaneShape</tt>). Give it a color or texture it with an image of your choice.
* The user needs to be able to create building blocks of three different shapes, using at least two different Bullet shape classes. For instance: cubes, rectangular blocks and cylinders would satisfy this requirement (using <tt>btBoxShape</tt> and <tt>btCylinderShape</tt>).
+
* The user needs to be able to create building blocks of at least two different shapes, using different Bullet Engine shape classes. For instance: cubes and cylinders would satisfy this requirement (using <tt>btBoxShape</tt> and <tt>btCylinderShape</tt>).
* The building blocks need to have a user selectable color. There needs to be a choice of at least four colors, for instance: red, green, blue, yellow. There is extra credit for a color mixer (see below).
+
* The building blocks need to have a user selectable color. There needs to be a choice of at least three colors, for instance: red, green, blue. Extra credit can be obtained for a color mixer (see below).
 
* The building blocks need to be freely positionable in 3D space, both in location and orientation. There should not be any snapping to locations or angles. It should not be possible to place a block in a location that overlaps with an existing block.
 
* The building blocks need to be freely positionable in 3D space, both in location and orientation. There should not be any snapping to locations or angles. It should not be possible to place a block in a location that overlaps with an existing block.
 
* Once placed or dropped, the building blocks must follow the laws of physics, as applied by your physics engine. This means that dropping multiple blocks on top of one another will eventually make the tower tumble and fall over.
 
* Once placed or dropped, the building blocks must follow the laws of physics, as applied by your physics engine. This means that dropping multiple blocks on top of one another will eventually make the tower tumble and fall over.
 
* There needs to be a way to select previously placed blocks and move them to a new position and orientation.
 
* There needs to be a way to select previously placed blocks and move them to a new position and orientation.
 
* There needs to be a way to change the camera perspective. At the least, rotations around the playing field need to be supported.  
 
* There needs to be a way to change the camera perspective. At the least, rotations around the playing field need to be supported.  
* There needs to be an undo function, which deletes the last block created. It is not necessary to allow the deletion of more than the most recently created block.
 
  
'''Tip:'''
+
'''Tips:'''
  
In the lecture on Tuesday, February 11th the istructor will go over various examples of selection, manipulation and menu implementations for the Leap.
+
* In the lecture on Tuesday, February 11th the instructor will go over various examples of selection, manipulation and menu implementations for the Leap.
 +
* The Leap can track all 10 fingers, but loses tracking once the fingers can no longer be clearly distinguished. Try tracking just one finger (3 DOF), or thumb and index finger (5 DOF), which probably can get tracked more reliably.
  
 
==Grading==
 
==Grading==

Latest revision as of 14:10, 14 February 2014

Contents

Homework Assignment 3: Leap Motion

For this assignment you can obtain 100 points, plus up to 10 points for extra credit.

This homework assignment is due on February 21st, 2014 at 1:30pm. Thinh is going to do a Q&A session on Wednesday, February 12th at 2pm in lab 260.

The goal of this project is to use the Leap as the only input device for a building block application, which allows creating collections of building blocks such as in these images:

Blocks2-small.jpg Blocks4.jpg

Leap

This homework assignment requires the use of a Leap Motion input device. Everyone in class is going to get to borrow one from the instructor until the end of the quarter.

To use the Leap, you will need to first download the driver. If you use the lab computers the driver is already installed on the even-numbered PCs in lab 260.

You will find the official Leap documentation with sample code at this link.

Bullet Engine

This project requires the use of a physics engine. You are welcome to use any such engine of your choosing, including a simple one that you write on your own, but we recommend the Bullet Engine. It has even been integrated into OpenSceneGraph through the osgBullet project. You are welcome to use osgBullet, but keep in mind that you will have to compile it into OSG before you can use it. If you would prefer to avoid that, feel free to just use the Bullet library directly, without osgBullet.

There is excellent sample C++ code for the engine, as well as an inspirational video.

Application (100 Points)

The idea of this project is to create a 3D application, in which the user can place an arbitrary number of building blocks on a playing field and move them around. The Leap needs to be the only input device the user gets to use. Keyboard, mouse and other devices are not permitted.

The application needs to have the following features:

  • The playing field should be a plane of unlimited extent (btStaticPlaneShape). Give it a color or texture it with an image of your choice.
  • The user needs to be able to create building blocks of at least two different shapes, using different Bullet Engine shape classes. For instance: cubes and cylinders would satisfy this requirement (using btBoxShape and btCylinderShape).
  • The building blocks need to have a user selectable color. There needs to be a choice of at least three colors, for instance: red, green, blue. Extra credit can be obtained for a color mixer (see below).
  • The building blocks need to be freely positionable in 3D space, both in location and orientation. There should not be any snapping to locations or angles. It should not be possible to place a block in a location that overlaps with an existing block.
  • Once placed or dropped, the building blocks must follow the laws of physics, as applied by your physics engine. This means that dropping multiple blocks on top of one another will eventually make the tower tumble and fall over.
  • There needs to be a way to select previously placed blocks and move them to a new position and orientation.
  • There needs to be a way to change the camera perspective. At the least, rotations around the playing field need to be supported.

Tips:

  • In the lecture on Tuesday, February 11th the instructor will go over various examples of selection, manipulation and menu implementations for the Leap.
  • The Leap can track all 10 fingers, but loses tracking once the fingers can no longer be clearly distinguished. Try tracking just one finger (3 DOF), or thumb and index finger (5 DOF), which probably can get tracked more reliably.

Grading

On the due date, you will need to demonstrate your application with a Leap in the lab on a lab computer or your own laptop.

You will be asked to build a simple representation of the engineering courtyard with the CSE, Bioengineering and Calit2 buildings. Those three buildings need to be built out of multiple blocks each, with enough detail that others are able to unambiguously tell which building is which.

Extra Credit (10 Points)

Each of the following things is worth 5 points:

  • In addition to the three building block shapes, offer a shape editor: it should allow changing the parameters used to create the Bullet Engine's shapes: for instance, width, height, depth, radius, etc.
  • In addition to the four colors the user can choose from, offer a 3D color picker: this color picker should allow the user to mix any color the computer can represent out of the three base colors red, green and blue. Feel free to use the following image for inspiration, but don't let it constrain your creativity:

[1]