Goodbye Jamario Moon and Hello FlarToolkit/Flash Augmented Reality Papervision3D

Goodbye Jamario Moon and Hello FlarToolkit/Flash Augmented Reality Papervision3D

With Jamario Moon being dealt away to Miami just last week, it seems fitting that I revisit an old project Paper-Robo and resurrect Paper Jamario Moon.

I finally got a chance to sit down and play with FlarToolkit. For those unfamiliar, FlarToolkit is a open source library that allows you to manipulate 3D objects using a pattern (like QR codes), a webcam and Flash.

Thanks to Mikko Haapoja and Saqoosha for some awesome start up guides:

I had to jump through some Flex hoops to get through some of the demo examples to work. Apparently you can only use the following syntax in Flex to embed binary files:

“[Embed(source=”../lib/mypattern.pat”, mimeType=”application/octet-stream”)]”

Since I haven’t used Flex before (I use FDT), I got around embedding these camera calibration and pattern binary files by using loaders. If you are using loaders, be sure to add MIME types on your server for .dat and .pat files. Other than that I didn’t change the original source code too much, other than replacing the basic cube primitive with a collada model. I also threw in some animated MD2 quake models (Boba Fett and Starscream) for good measure.

Briefly to use this library you need two binary files, a calibration file “.dat” for a webcam and a pattern file “.pat” representing your printed pattern. You specify a desired accuracy, and using a detector class you can determine if the marker is FOV of the camera. If the marker is detected you add whatever 3D object you want to a Flarbasenode, which is a Papervision3D Display Object. The Flarbasenode can then be translated/rotated using information from the detector class.

Try it yourself:

Download and print pattern


Test the application here (Webcam required)


Here is some sample code and other resources to jump start your Augmented Reality project:

Here’s a good repo of free animated MD2 models Project:

Sample Code:

Air application to make binary marker files: