AR Shoebox Diorama

This project uses ARToolkit, Ogre3D, and Bullet physics engines to produce a (somewhat) convincing illusion of there being objects inside of a box. It's done in the style of shoebox dioramas, the grade school craft project. As this was my first time using any of these libraries, this code should be considered EXTREME pre-alpha quality. But it still shows off the following features:

  • Matches the 4 sides of the virtual box with the real one, this heavily depends on the quality of your webcam (I disabled some degrees of motion for mine)
  • Applies gravity and forces on the box to objects inside, this is limited by the wiimote (and a few bugs in the software)
  • Allows you to change the gravity, I included the 8 planets, the moon and space (use the number keys 0 = zero gravity, 1 = mercury, etc)
  • Allows you to change the scene in the diorama, I currently have 3:
    • Small Ninja (from Ogre3D) - Press N
    • 5 Large Robots (from Ogre3D) - Press R
    • A Pendant on a chain (my own custom art) - Press P

Some future ideas for this project include adding 3D sound, Dynamically updating the virtual scene's lighting, removing all but one of the virtual walls, adding more wiimotes and getting true 1:1 motion

Instructions:

  1. Download the Code Here
  2. The code is pre-compiled in the bin folder, if you want to compile it you'll have to get the bullet (v2.67), artoolkit, and OgreSDK libraries. Afterwards you'll have to deal with Visual Studio. Godspeed
  3. Build the shoebox as shown in the video below. For the current code it's important that the webcam and artoolkit marker are lined up in the center of the box
  4. Connect up your webcam and wiimote to your computer, run WiiMP.exe, place the wiimote flat and click WiiMP's "Calibrate Gyros" button. Then click the A and B buttons together on the wiimote to set orientation
  5. Attach the webcam and wiimote to your box
  6. Run the main program