Augmented Reality Test.
Download the Marker File Here.. crunkMarker2.png
Try the Demo Version (Requires a Webcam) Please give it time to load
Lores Model CLICK HERE (1.02MB) is 16798 Triangles…
Hires Model CLICK HERE (5.06MB) is 68412 Triangles…
Recently i have been seeing lots of hype happening around the AR (Augmented Reality) Tech… so as i was looking around the web i came across this amazing Action-script Class library made by Saqoosha called FLARToolKit
History : FLARToolKit is an AS3 ported version of NyARToolkit, which is a Java ported version of ARToolKit. ARToolKit was originally developed by Dr. Hirokazu Kato, and its ongoing development is being supported by the Human Interface Technology Laboratory (HIT Lab) at the University of Washington, HIT Lab NZ at the University of Canterbury, New Zealand, and ARToolworks, Inc, Seattle.
FLARToolKit recognize the marker from input image. and calculate its orientation and position in 3D world which equals to doing all the hard-work as far as AR Technology is concerned.
The FLARToolKit currently works with a variety of Flash 3D Engines like Alternativa3D, Away3D, Papervision3D, and Sandy3D etc. my personal choice here is papervision 3d since i have used it before and through what ive seen is just plainly amazing :)
So for this example i have used…
Flash as the main program here loaded with the FLARToolKit Library, Papervision3D 2.0 for the view-port rendering, lighting and 3d geometry display. Blender for making Geometry and exporting Collada (dae) files. ARToolkit Marker Gen for the custom marker generation.
FLAR Process Theory
The FLAR theory process follows some very simple steps.
1. Flash Displays Webcam Data - Since u cant do AR without a Webcam.. the first step is to get ur webcam feed in Flash through the Camera.getCamera();
2. Applies Camera Correction - FLARToolKit comes with a binary camera parameters file which it loads to correct lens distortion from your webcam. Calib_camera2 is the software used to generate this file and it is existent from the original ARToolKit. Most examples u see online state that the default camera_para.dat that comes with the Toolkit works for everything.
3. Finding Matching Marker - The Marker is a .pat (pattern file) that FLAR will continuously be scanning for. The pattern file consists of four 16x48 matrices, one for each direction and 48 is for RGB color information. There is an Air app created by Saqoosha for easy marker creation here..
4. Marker is Detected - As the marker detector basically basically scan through the bitmapData from the web cam feed and comparing it to the provided marker pattern from the marker file. On marker detection, FlarToolkit will will built a transformation matrix around the marker and create a Flar Base Node to sit on top of it.
5. FLAR Base Node - The FLAR base node is just a ground plane of which all the geometry u want to show will be created, The transformation matrix will hold all the data required to properly orient ur 3d data in comparison to marker orientation.
6. 3D Render Engine - And finally the visual part , at this level with a bunch of papervision classes , like viewport3d and lights, we can finally display the desired geometry.
here are screenshots of the actually model, with color applied :)