MarcPelland.com
Welcome at » Getting Started with Augmented Reality / FLARToolKit

Getting Started with Augmented Reality / FLARToolKit

Setup

Getting a Dev Environment Setup

Create a new Flex 3 project inside FlashDevelop and name it HelloFlarToolkit. For simplicity sake, just copy the files extracted from the download of FLARManager into the src folder that was generated. Also make sure that you copy the resources folder from FLARManager to the root of your project folder.

If you are following along in FlashDevelop, just erase the Main.mxml file, right click FLARManagerTest_PV3D.as and choose Always Compile. You can also go ahead and delete the other 3 files in the base directory.

One last set for the environment, if you are in FlashDevelop right click on the project name and go to Properties. Make sure that you have Flash Player 10 selected under Platform and you set the dimensions to 640 x 480.

Now we are all setup to start creating our very own FLARToolKit example.

Markers

Augmented Reality uses markers to place the scene that we are going to create. Make sure that you have setup your marker, or used one of the default patterns that ship with FLARManager. As explained in the overview, you can go here: http://flash.tarotaro.org/blog/2008/12/14/artoolkit-marker-generator-online-released/ to generate your own marker.

Save your pattern file as pattern.pat and save it in the /resources/flar/patterns/ folder on your project. And make sure that you have printed out a copy for yourself to test with.

Now we are ready to use our app, once we make a couple minor changes.

Pages: 1 2 3 4

16 Responses




  1. great tutorial, thanks for putting this together. i was going to ask eric to simplify his ecplination a little but this pretty much clears it up.
    one detail though. i’m working in flash. cs4 FP10
    1084: Syntax error: expecting identifier before assign.
    in referance to
    var patterns:Vector. = new Vector.(|>);
    /////////////////////////////from code////////
    private function init () :void {
    // build list of FLARPatterns for FLARToolkit to detect
    var patterns:Vector. = new Vector.(|>);********THIS LINE
    patterns.push(new FLARPattern(PATTERN_PATH+”pattern.patt”, PATTERN_RESOLUTION));
    pattern = patterns[0];

    any ideas? id love to get this working.




  2. ** there is a line : var patterns:Vector.<FLARPattern> = new Vector.<FLARPattern>(); that isn’t displaying properly in the code block and i can’t figure it out… replace it with this previous line.




  3. hey there,
    that line is creating a Vector of objects of type FLARPattern, using the “postfix type parameter syntax”:
    http://livedocs.adobe.com/flex/gumbo/langref/Vector.html

    not sure what the (|>) is, that’s not in my code…?

    take a look at v0.2 and let me know if there are still problems (just comment on the blog post).
    http://words.transmote.com/wp/20090327/flarmanager-v02-for-flartoolkit/




  4. hey,
    that part isn’t in my code either. what is happening is my syntax highlighter on my blog is blocking the characters… if you look just below the code area I have posted the correction.

  5. juan_carlos




    hi marc, how´re you doing? Man, thanks for the great tutorial. On one hand, I have a small issue with the FLARManager, cause i can´t seem to make it work once I upload it to a server. I get the following error:

    Error: Error #2032: Error de secuencia. URL: ../resources/flar/FLARparams.dat
    at com.transmote.flar::FLARManager/onCameraParamsLoadError()[C:\Documents and Settings\TOSHIBA\Escritorio\FLARManager\v03\src\com\transmote\flar\FLARManager.as:324]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    But on the other hand, when I try to use your code I get a Flex Problem:

    A file found in a source-path ‘FLARManagerExample_PV3D’ must have the same name as the class definition inside the file ‘FLARManagerTest_PV3D’

    And of course, it doesnt run. :S any suggestions? maybe something I might be doing wrong?




  6. Great tutorial, I just had one comile error on line 108 of HelloFlarView.as.

    I changed the 0*000000 to 0×000000 to get it to compile.

    I just can’t get the movie to recognise my pattern – could this be a result of changing this line or jut a dodgy pattern?

    Thanks

  7. Sanjai




    Sweet! Very cool stuff Marc.




  8. This tutorial is great! I can easily understand what the tutorial want us to know or to learn. I hope many people will visit and see your tutorial on how to start with augmented reality flartoolkit.




  9. Thank you for sharing to us.there are many person searching about that now they will find enough resources by your post.I would like to join your blog anyway so please continue sharing with us




  10. Sweet! Very cool stuff Marc.




  11. Very interesting, but in the middle of this tutorial I lost the trace with those 2 links provided.




  12. Hi there,
    Really nice job,There are many people searching about that now they will find enough sources by your tips.
    Also looking forward for more tips about that




  13. I differ with most people here; I found this post I couldn’t stop until , even though it wasn’t just what I had been searching for, was indeed a great read though. I will instantly take your feed to stay in touch of future updates




  14. Hi there, I just wanted to say thanks for this informative post, can you please allow me to post it on my blog?




  15. You will also need FlashDevelop or another Actionscript editing tool. In this tutorial I am going to be compiling my code directly from FlashDevelop, but feel free to use the compiler/method of your choice.




  16. Heck yeah this is ecxtaly what I needed.

Leave a Reply

Captcha
Enter the letters you see above.