FLARManager v0.1

macaroons and cubes, yum.

macaroons and cubes, yum.

i’ve been getting my hands into fiducial tracking at work over the last few months, and successfully implemented reacTIVision for an exhibit. amazing software, easy to use right out of the box, and very fast and accurate. (thanks martin & co!)

when i came across the GE augmented reality thingy, i realized that that kind of experience can finally happen online. i took a look at FLARToolkit, and was simultaneously excited and stymied — so much potential, but tricky to use and understand.

i came across Mikko Haapoja’s excellent starter tutorial and got a much better understanding of the system. after a bit more digging, i decided to try to make FLARToolkit as accessible as reacTIVision.

a couple weeks later, i finally have a small framework put together that makes steps in this direction. behold, FLARManager v0.1.

i had a list of goals with this, including, but not limited to:

ease of use: FLARToolkit is not the simplest thing to get up and running. FLARManager makes it easier, by encapsulating some of the hard bits, and providing plenty defaults for quicker setup. it also uses composition as much as possible, instead of inheritance, for maximum flexibility.

decoupling FLARToolkit from Papervision3D: i can think of lots of uses for marker tracking that don’t require Papervision3D, or even 3D for that matter. for example, how cool would it be to do this in an online app? also, Flash Player 10 offers 3D capabilities natively, and it would be nice to be able to take advantage of those as well.

marker management: similar to reacTIVision, FLARManager maintains a list of active markers, and dispatches events when a marker is added, updated, or removed. multiple marker patterns can easily be used, and multiple instances of each pattern are also no problem.

i managed to hit all those goals, and learned a lot about the FLARToolkit engine along the way. i also figured out how to get FLARToolkit running at a good speed (on my last-generation MacBook, i consistently hit 20-25fps, even with multiple markers on-screen). i even got to get my hands dirty with some of the new features of Flash Player 10, like the Vector class, and some basics on drawing in 3D in FP10.
ok, enough. again, link to the source:

FLARManager v0.1

Creative Commons License
FLARManager by Eric Socolofsky is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

i’ll leave formal documentation for another post; i took great pains to comment the hell out of the code, and if you want you can even make ASDocs out of them. suffice it to say you should be good to go if you just download the source.

oh, one more thing: there are four examples included in the zip, along with a Flex Builder project. the examples are all set up to be run as FB Applications. they are:

FLARManagerTest_2D.as: simple example that draws outlines around detected markers.

FLARManagerTest_2D_NoVideo.as: runs marker detection on a source loaded from a file (e.g. .swf / .jpg) instead of a camera. good for testing when it’s dark out, or when you’re cameraless.

FLARManagerTest_PV3D.as: the standard FLARToolkit + Papervision3D example, with lil’ cubes strewn around my kitchen table.

FLARManagerTest_Flash3D.as: a first stab at getting FLARToolkit to work with 3D in Flash Player 10. it’s not working yet, because i’m having trouble figuring out how to translate FLARToolkit’s FLARDoubleMatrix34 into Flash’s Matrix3D. any help here would be much appreciated!

one final note: big ups to mikko, squidder, saqoosha, and of course the libspark folks. thanks for getting the hardest part out of the way ;)

look forward to seeing what you all do with this!


  1. [...] FLARManager – 易於控制FLARToolKit及Papervision3D的工具 [...]

  2. ericsoco says:

    opening the FLARManager Flex Builder project:

    some people have asked where the Flex Builder project files are. they’re in the root folder of the source posted here, but they’re hidden files, so you may not see them.

    to open the Flex Builder project:
    - open Flex Builder
    - File>Import…
    - Flex Project

    in the Import Flex Project dialog,
    - select Project folder
    - Browse… to the FLARManager_v01 folder (root of the downloaded, unzipped zip)

    then follow the steps as normal to create the FB project.

  3. [...] Socolofsky’s very new FLARManager. This sounds awesome, but requires either CS4 or Flex Builder set up to target FP10. Here are 2 [...]

  4. ericsoco says:

    note: FLARManager v0.1 requires FB 3.0.2 / Flash Player 10 to compile.

    maybe i jumped a bit too far ahead here. ultimately, i’d like FLARManager to be compatible with Flash Player 10′s native 3D capabilities, so i used the Vector class extensively. however, the included FLARManagerTest_Flash3D.as example is the only thing that really *needs* FP10, so i should go back and remove the Vector usage and release a version that compiles to FP9.

    in the meantime, if you’re ready to start developing FP10 content, this is a great opportunity to do so ;)

    basically, all you have to do is upgrade to FB 3.0.2, install FP10 debugger, and the FLARManager FB project included in the zip will take care of targeting FP10 and should compile successfully.

    to update Flex Builder to 3.0.2:
    - open Flex Builder
    - Help>Search For Flex Builder Updates
    - Flex Builder Update 3.0.2 should be in there.

    if you’ve already installed FB10 debugger, make sure that you uncheck the FB9 debugger install option when it appears during the FB 3.0.2 process. if you haven’t, after installing FB 3.0.2, get FP10 debugger from here:


  5. [...] t%2Fcategory%2Fflash%2Fflartoolkit%2F&sl=ja&tl=en&hl=en&ie=UTF-8 http://words.transmote.com/wp/20090309/flarmanager-v01/ [...]

  6. Justin says:

    Good work man! I posted a reply on my blog too, but wanted to say cheers for this – with the new performance gains in Flash its great that Java and C libraries are being ported over, but many need an API cleanup and some tweaks for the Flash specific methods. decoupling the engine from PV3D is a good move also.

    Keep on rocking Actionscript.

  7. Andy says:

    I dont have flexbuilder,how can i use this in flashdevelop? i cant set it up .

  8. ericsoco says:

    i don’t use flashdevelop, so can’t really help you there.

    but all the source is there. there are four classes you can use as an application/main class, they’re listed toward the end of my post. just choose whichever of those you want and you should be able to build from there.

    i’m not sure how to target FP10 with flashdevelop either. if that doesn’t work for you, use the FP9 version of FLARManager that i posted here:

  9. Andy says:

    Ok i try… thanx for reply :-)

  10. Javier Patiño says:

    Hello.. I have Adobe Flex Builder 3 for mac…but I cant create the proyect..this version works for hte proyect?

  11. ericsoco says:

    @javier — yes, i’m also using FB3 for mac and pc, and it definitely works for both. follow the instructions i wrote in an earlier comment to this post.

  12. [...] download FLARManager (using v0.1 in this tutorial) from http://words.transmote.com/wp/20090309/flarmanager-v01/ . FLARManager actually comes with a build of FLARToolKit in it and you can get it for AS3/FP9 or [...]

  13. [...] FLARManager – 易於控制FLARToolKit及Papervision3D的工具 [...]

  14. greymoth says:

    Hi. I’m working on a project using the java-based augmented reality system. Wondering if anyone has ported this code over to java?

  15. ericsoco says:

    @greymoth — yes. nyatla, who’s been working on the alchemy branch, is also the author of NYARToolkit.

  16. greymoth says:

    @ericsoco – thanks for the fast reply. I am currently using NyARToolkit for Java, from the link you sent. I was asking particularly about a Java port FLARManager. I was wondering about managing multiple markers in NyARToolkit, in Java. I need this functionality, and will have to create it if it doesn’t already exist. (I expect will be looking closely at your FLARManager class.) Thanks.

  17. ericsoco says:

    @greymoth — ah. right. no, i don’t have a java version. if you create something like FLARManager for NYARToolkit, please share your results! and, i’m happy to answer any questions you have about design/architecture of the framework. it’s a bit messy in its current state; there’s a chance i’ll be revising some fairly substantial chunks of it in the next month.

    also, please be sure to get the latest version (we’re commenting on the blog post for the very first release….that was a looong time ago).

  18. designjockey says:

    Hey guys,

    I am really new to Flar and I’m trying to get it working following some tutorials online. I referenced Lee Brimelow’s video tutorial on Flar Manager to start getting upto the point where I get the video camera up, but, I am using the XBOX Live camera so I am not sure if it is because of that, all I see is just a black screen, I right click and allow but nothing happens… I uploaded the swf file, so if you guys have any suggestions or if you guys can hit the URL below and see if it works for you it will be helpful.. thanks guys!


  19. ericsoco says:

    @designjockey — looks like you have the wrong path to some resources, particularly ge.pat.

  20. designjockey says:

    @ericsoco – thanks bud! I saw that I didn’t upload the ge.pat file up to the server, now it works… btw, did it throw an error about the pat file or how did you find out? I am curious to know because I didn’t get any errors or anything, just a blank black page.

  21. jordan says:

    hi, i need your help to make my AR project, could you help me ?thank you

  22. foxcun says:

    is that possible to change that box into collada .dae object? . .
    so multi marker multi object. any suggestion for it?

Leave a Reply

Additional comments powered by BackType