
WOW! Today I saw something that definitely needs some props. FLARToolkit!!! Augmented reality through Flash within Flash.
Just get a white piece of paper and draw a black square on it and hit this link:
http://saqoosha.net/lab/FLARToolKit/2/
I actually found this link while trying to find a Java Open Source implementation of Augmented Reality to use to maybe with my Flash/Processing code.
For those who don’t know what Augmented Reality is check this video out, it will explain it much better than I ever could:
I actually thought this couldn’t be done real time in Flash. But like you can see from the screen shot the Flash app is running at almost 45fps. Which is CRAZY!!!
Here is another example of the FLARToolkit:
I definitely have to play with this library. If you want to play around with it too you can get the library from here through SVN:
http://www.libspark.org/svn/as3/FLARToolKit/trunk
Here is the post where I originally found this stuff:
http://saqoosha.net/2008/10/18/1585/
I do not speak Japanese but if you do and you find some more information about FLARToolkit please contact me. From what I’ve understood it’s actually been ported over from a Java Augmented Reality engine called NyARToolKit. Must’ve been a TON of work so props to Saqoosha
20 Comments, Comment or Ping
Hi there,
You can try it yourself on :
http://www.strafwerk.nu/ar/
Just print out the marker, works smooth with a nice 3d model of a car.
November 18th, 2008
Sweet thanks man for the link. I also saw another link at Draw Logic:
http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/
The actual example is here:
http://translate.google.com/translate?hl=en&sl=ja&u=http://saqoosha.net/2008/08/31/1221/
It looks neat cause it looks like the screen darkens when it recognizes the marker.
November 18th, 2008
Shoot… Looks like my webcam isn’t working right now. I’ll try to check out your example when I get a chance. I gotta run to work now.
November 18th, 2008
Great, let me know how it works for you!
November 18th, 2008
hey, gotten it to work yet?
I have the source files but I’m not sure how to use them in flash…..
same translation issues
November 20th, 2008
Hey Adam… No unfortunately I haven’t had a chance to play with this stuff yet. Been busy at work and some other projects I’ve had to work on.
Hopefully over the weekend I can play around with the library. I’ll post some of my experiments when I get to them.
Sorry dude.
November 20th, 2008
Great Blog!
January 13th, 2009
Cool!! good job! i am doing AR also. Hope can share it later.
January 15th, 2009
Has anybody got a whole zip file including everything as really stuck on this!
January 29th, 2009
Hello I was practicing with the code published thanks. I moved and trying to add
flv video, but not to keep the video. the music plays, and when the show Patt
the video appears and disappears immediately. you could help me with this?
package {
import flash.events.Event;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
import org.papervision3d.lights.PointLight3D;
import org.papervision3d.materials.WireframeMaterial;
import org.papervision3d.objects.parsers.Collada;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.view.BasicView;
import org.papervision3d.objects.primitives.Plane;
import org.papervision3d.materials.VideoStreamMaterial;
import org.papervision3d.objects.DisplayObject3D;
import org.papervision3d.cameras.Camera3D;
import org.papervision3d.objects.primitives.Sphere;
import org.papervision3d.render.BasicRenderEngine;
import org.papervision3d.scenes.Scene3D;
import org.papervision3d.view.Viewport3D;
public class RASuite extends PV3DARApp
{
//private var mCollada:Collada;
private var universe:DisplayObject3D;
private var plane:Plane;
private var _plane:Plane;
private var videoCristina:VideoStreamMaterial;
private var quality:uint = 8;
private var nc:NetConnection;
private var video:Video;
private var ns:NetStream;
//private var viewport:Viewport3D;
private var scene:Scene3D;
//private var camera:Camera3D;
//private var renderer:BasicRenderEngine;
public function RASuite()
{
this.addEventListener(Event.INIT, this.onInit);
this.init(‘Data/camera_para.dat’, ‘Data/patt.hiro’);
//plane = new Plane(videoStreamMaterial, 1600, 1200, quality, quality);
//plane = new Plane(videoStreamMaterial, 320, 240, quality, quality);
//scene.addChild(plane);
//camera.target = plane;
}
protected override function onInit():void
{
super.onInit();
this.removeEventListener(Event.INIT, this.onInit);
var customClient:Object = new Object();
customClient.onMetaData = metaDataHandler;
nc = new NetConnection();
nc.connect(null);
var wmat:WireframeMaterial = new WireframeMaterial(0xff0000, 1, 2);
wmat.doubleSided = true;
this._plane = new Plane(wmat, 80, 80);
this._baseNode.addChild(this._plane);
ns = new NetStream(nc);
ns.client = customClient;
ns.play(“cristina.flv”);
video = new Video();
video.width = 320;
video.height = 240;
video.smoothing = true;
video.attachNetStream(ns);
videoCristina = new VideoStreamMaterial(video, ns, true);
this.plane = new Plane(videoCristina, 80, 80);
//this.mCollada = new Collada(“tank.dae”);
this.universe = new DisplayObject3D();
this._baseNode.addChild(this.plane);
this._baseNode.addChild(this.universe);
}
private function metaDataHandler(infoObject:Object):void
{
trace(‘metaDataHandler’,infoObject);
}
}
}
February 24th, 2009
Awsome tool kit….Love to see how it will work in flash 10. Here is what we did for Earth Hour.
http://earthhour.org/earthinyourhands
Oh yeah added a few easter eggs in it. Make sure you click on the flash element and type in deathstar and press enter. Had to be done.
March 24th, 2009
Hi
is there any way i can add mouse interaction to that cube i tried adding addeventlistener to different faces of cube it works fine for papervision3d but not for AR. Any help
gingers crossed.
July 24th, 2009
How to make somthing interactive like earth hour
Any help
July 24th, 2009
Found Adobe has now a training page on AR:
http://www.adobe.com/devnet/flash/articles/augmented_reality.html
September 15th, 2009
Reply to “Flash Augmented Reality FLARToolkit”