Homework2W13

From Immersive Visualization Lab Wiki
Revision as of 03:44, 28 January 2013 by Jschulze (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Homework Assignment 2: ARToolkit

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

The goal of this project is to add inexpensive, but true 3D interaction to your application from homework project 1. You will use the ARToolkit API to allow positioning and orienting the pan with a hand-held ARToolkit marker. This project will require you to use a webcam, and to print out an ARToolkit marker on a piece of paper.

ARToolkit and osgART

You can choose to integrate the ARToolkit library directly into your application from homework project 1. There is excellent documentation on the ARToolkit web site. You could start by running their demo appliations.

The other alternative is to use osgART: The HITLab in New Zealand has already integrated the ARToolkit API with OpenSceneGraph. Download osgART and integrate it into your version of Visual Studio. Unfortunately, osgART only comes with Visual Studio 2005 project files, so they will have to be converted to your version of Visual Studio.

Webcam

Next you will need to get access to a webcam. You can either use your own, which can be an USB-connected device, or a camera built into your laptop. As long as it acts like a webcam in other Windows applications, it will work with ARToolkit. If you don't have your own webcam, the instructor is going to loan you one for the duration of the project.

Marker

ARToolkit works by tracking markers printed on paper. For this project, you will need to print one marker, which you should glue to a piece of cardboard, so that it is easier to hold the marker without deforming it. When the marker deforms, it will be harder or impossible for the tracking algorithm to recognize it.

Controlling the Pan

Once you have a marker which can be tracked with your webcam, you are ready to move the pan. Experiment with the placement of your webcam (or the angle of your laptop screen if your camera is built-in) to find a good camera placement so that it can see the marker when you hold and move it.

Your goal is to map the marker movements to movements of the pan in your kitchen scene. Find a good transformation to transform the marker coordinates and orientation to kitchen coordinates. You will need to be able to move the pan from the countertop under the open cabinet all the way into the cabinet.

Collision Detection

Whereas in the first homework project, you were allowed to move pot and pan through cabinet walls, this time you need to implement collision detection. Use OpenSceneGraph's intersection handling routines to detect when the pan intersects with a cabinet. When an intersection happens, paint the pan yellow and stop its motion until the user moves it away from the blocking surface.