Homework3W14

From Immersive Visualization Lab Wiki
Jump to: navigation, search

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]