ARPuzzle
From DigitalBlacksmith
This page is dedicated to Eva's 2007 Science Fair project.
Contents |
[edit] Poster
Click here to see the poster we used at the science fair.
[edit] Concept
A simple AR application is used to help a person put together a puzzle..This was Eva's science project for her school science night.
Here is a video of the final demo:
Here is a first cut demo:
[edit] Application Overview
I am using an extension of my ARMAR project.
Application base: Valve Source SDK Mod
Modeling: Maya
Demo Overview:
- The demo will be set up on a table.
- A single virtual puzzle_controller (PC) will be tracked by artag fiducials lining the table.
- The PC is a special class that is designed to manage the individual virtual puzzle pieces
- A special camera will be set up on the side in a red box area where the user can place a single puzzle piece
- When the user places a piece in the red box, the PC will recognize it and highlight then fade the virtual piece in its designated position
- The user then quickly moves the real piece to match
- When PC can also demo other pieces (possible adjacent?)
- A HUD will show the complete puzzle, without the lines -- ala when you use a real puzzle you look at the box
Puzzle:
Here is the puzzle we are using..
Experiment:
A between subjects experiment will measure the time it takes to complete the puzzle in each scenario.
[edit] Demo Design
[edit] Modeling
[edit] Object Model
Here is or mapping of pieces to objects...
[edit] Modeling in Maya
We used the map above to create a 3D model in Maya for each piece.
We scanned the top of the puzzle box, and placed it in the background. We then used an orthographic layout and created polygon planes for each piece. We then used vertex editing, and face selection, to shape each polygon plan until it resembled the piece in size and shape. We next used Maya's extrude tool to give each piece some depth. We repeated this process for each piece.
We then turned to texturing. We created a single Phong material that would be shared by each piece. This material was a large 2048x2048 TGA file that had the puzzle image in the center, with a gray matte border (about 200 px width). We next created a UV set for each piece using Maya;s automatic UV mapping tool. Using the UV texture editor, we manipulated each piece's UV so that the top face 'fit' its corresponding piece in the image, and the other 5 faces were in the gray matte area.
[edit] ARTag Coordframe
We ended up using Mark Fialla's 'base0' coordinate frame (included with the ARTag library). We found that the smaller fiducials and dense constellation allowed the best tracking.
[edit] Valve Source Compiling
We followed the procedure here to export from Maya to Valve mdl files.
Here is the qc file we are using:
//Static prop qc
$modelname "puzzle\e5.mdl"
$model "body" "e5.smd"
$cdmaterials "models\puzzle\"
$hboxset "default"
$surfaceprop "item"
//$scale 10
$keyvalues { prop_data { "base" "Item.Small" } }
$illumposition -0.001 0.001 4.100
$sequence idle "e5_idle" loop fps 5.00
$collisionmodel "e5_phy.smd" {
$concave
$mass 1.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
$upaxis Y
[edit] MOD Coding
Here are some screen shots of the preliminary mod test:
[edit] Hammer World Modeling
To test the application, we added one of the puzzle pieces to a map as a prop_physics_override. This works pretty well.
We discovered that setting the prop_physics_override "Physics Impact Force to Overide" will keep the pieces in place even when the player bumps them. Like super glue...
