FLAR Manager – Project file for Multiple Markers loading Multiple Collada files

Well, i decided to go one step further and give the whole project away for those who are having trouble figuring it out. Download attached file and check it out.

Please leave concerns / comments :) Thanks.

NOTE: THIS IS A FLASH BUILDER 4 VERSION.

P.S Please acknowledge if you decide to use the code.

DOWLOAD http://www.looneydoodle.com/MultiMarkerMultiCollada.zip

  • ike
  • Kitsune65

    HI!
    I downloaded the Multi marker/collada.
    Created a flash file with launchMultiMarker in the Class description
    When I went to compile I received and error. Please see below. Any suggestions would be greatly appreciated!

    /Users/reynardine/Desktop/MultiMarkerMultiCollada-1/src/org/libspark/flartoolkit/support/pv3d/FLARCamera3D.as, Line 122 1020: Method marked override must override another method.
    /Users/reynardine/Desktop/MultiMarkerMultiCollada-1/src/org/libspark/flartoolkit/support/pv3d/FLARCamera3D.as, Line 41 1017: The definition of base class Camera3D was not found.

  • http://www.looneydoodle.com lOOney dOOdle

    @ike That is my school blog.
    @kitsune65 Update your flar library, you should be fine.

  • WARlock

    Appreciate everything, but I updated everything (I hope) and when I test scene in Flash CS5 Pro I just get a blank screen in what I hope is Flash 10.1 player as that is what I set the prefs to in the *.fla. Thoughts?

  • WARlock

    **fixed**
    Flash CS5 was the issue. I got it working somewhat but with some DAE issues and texture loss. Checking it. I just find Fla format easier, don’t ask me why. I’m going to adapt this a bit and see what I come up with.

    lOOney dOOdle, let me know if you ever need help with modeling.

    Congrats on this btw, great share.

  • Thangaraj

    Iam trying for Multiple Marker Multi Collada from your site.

    iam working in Flash IDE, when i Publish my FLA it showing the error

    Point.as 5007: An ActionScript file must have at least one
    externally visible definition.

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    intrinsic class as3d.geom.Point {
    var x:Number;
    var y:Number;
    var length:Number;

    public function interpolate(pt1:Point, pt2:Point, f:Number):Point;
    public function distance(pt1:Point, pt2:Point):Number;
    public function polar(len:Number, angle:Number):Point;

    public function Point(x:Number, y:Number);
    public function clone():Point;
    public function offset(dx:Number, dy:Number):Void;
    public function equals(toCompare:Object):Boolean;
    public function subtract(v:Point):Point;
    public function add(v:Point):Point;
    public function normalize(length:Number):Void;
    public function toString():String;

    }

    Plz Help Me, Thanks in Advance.

    Thangaraj.S

  • http://www.looneydoodle.com lOOney dOOdle

    @Thangaraj My version is compiled for Flash Builder (previously Flex)
    Recompiling FLAR in FLASH might fix your problem.

  • Thangaraj

    Hi
    I recompiled all the files and updated my Flarmanager…..
    The final output in swf is Black Screen and this following errors.

    [FLARManager] Initing camera ‘USB Video Device’.
    [FLARManager] Initial camera validation complete…
    TypeError: Error #1034: Type Coercion failed: cannot convert Vector.@7918841 to Array.
    at com.transmote.flar::FLARManager/checkForInitComplete()
    at com.transmote.flar::FLARManager/onPatternsLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.transmote.flar.pattern::FLARPatternLoader/checkForLoadCompletion()
    at com.transmote.flar.pattern::FLARPatternLoader/onPatternLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    [FLARManager] Secondary camera validation failed for camera ‘USB Video Device’. Reiniting camera.
    Error #2044: Unhandled error:. text=Camera not found. Please check your connections and ensure that your camera is not in use by another application.Complete()

    Thanks

  • http://www.looneydoodle.com lOOney dOOdle

    The error seems pretty straight forward to me. You need to make sure your webcam is connected and all the drivers are installed properly.

    P.S A webcam can only be used by one app at a time, so make sure another application is not using it.

  • volker

    hey really nice, this thing.

    i test and it is really nice,
    but if i want to change the pattern,
    nothing will be detected anymore.

    thats really odd.
    perhaps someone can help me out
    thanks

    best volker

  • http://www.looneydoodle.com lOOney dOOdle

    @Volker

    You need to make sure the patters are named right in all the places. Check out FLAR Manager’s documentation for further info

  • Omar Espinosa

    Hello!

    It’s a great effort you’re doing in here. I’ve been trying to work with multiple markers for a while and I wanted to test your code, but I don’t know if it is my camera or what but i’ve been unable to test your app, it just won’t track the marker D: Nor in your app that’s on this website neither on my Flash Builder project, is there anything I’m missing, the application launches and prompts for access to my webcam, and I’ve already tested other AR apps and they work fine, hope you could assist me. Thanks in advance and keep up the good work ;D

  • http://www.looneydoodle.com lOOney dOOdle

    @omar I ve found that it takes time to start up at times, but i cant really comment on your question till i know what kind of error you are getting. If you are not getting any errors, check if all the files are in order since it parses all the markers before it starts up, also check your models and make sure its not too big (file size).

  • http://www.pasesycortes.com NBA

    Does this work with videos too? If not, how could I :) ?

    Thanks

  • http://www.looneydoodle.com lOOney dOOdle

    @NBA Videos do work, you just have to integrate the video tutorial from gotoandlearn.com into this code.

  • http://www.pasesycortes.com NBA

    Cool thanks, I’ll check it out :D

  • steff

    Hi! First of all, thanks for your project file!
    I’m also experimenting a lot with FLAR at the moment and also tried Lee’s tutorial at gotoandlearn and stuff. But somehow I can’t figure out how to get a decent framerate and fluent performance when displaying 3D Models or Papervision Objects. Also the marker detection is not very stable. When I use the FramerateDisplay (as in Lee’s tutorial) I only get a framerate of about 5 when 3D Objects are displayed. (Also when I run your project).
    Did you experience this as well?

    Also my textures are getting lost when I export my own Collada Files. I managed to display external DAEs but when I export my own Models from Maya or 3DsMax my textures get lost when displayed in FLAR. Did you use external models or did you export your own from a 3D Modelling program? If so, could you tell me your export settings?

    I also want to inform you about some minor mistakes (don’t know how to call them) in your MultiMarkerMultiDae.as file I took from your project zip-file. In line 84 you are loading a dae file called “alien.dae” and in line 94 it’s “model14.dae”. These two files don’t exist in your assets folder. The scout_flat.jpg texture is missing as well.

  • steff

    ** I also posted this on eric socolofsky’s blog **
    http://words.transmote.com/wp/flarmanager/comment-page-5/#comment-13846

    3D Collada export solved – wireframe bug fixed (for 3DsMax and Maya)

    As I assumed it had something to do with the path of the texture files. Looking for the path of the texture images in my DAEs and replacing it by a relative path didn’t do it. So I came across this plugin (http://www.opencollada.org/) which is able to export the texture files as a relative path. I used all the settings that are explained here http://blog.papervision3d.org/2008/03/19/exporting-collada-from-maya-settings/ and it worked.

    Next problem: The DAE exports with animations but my alpha and scaling animations just won’t show up in my FLAR app. pfffff

  • http://www.looneydoodle.com lOOney dOOdle

    @Steff

    The models are not in there because the people who modeled it are not ready to release the models yet.

  • http://www.looneydoodle.com lOOney dOOdle

    @Steff

    Your textures issue is most probably the exporter settings thing. You might want to look into the openCollada exporter. Pop me an email if you need hands on help.

  • Alex

    This is great stuff. I’ve been working with your package and just trying to swap out models, which has been problematic… All of the models I’ve created started in Sketchup, then I export to collada, and everything turns up FUBAR.

    I have also been unsuccessful with getting single models to display as their respective marker hits the camera…only in the big PDF, and only off of my iPhone, as I haven’t had access to a printer.

    So my questions are:

    Do single models work, or does it only work with the whole set.

    Is there a way to use sketchup models, or a better way to export them?

    To use my own models, do I just drop them in the assets folder and rename?

  • http://www.looneydoodle.com lOOney dOOdle

    single models work.
    use the opencollada exporter
    just drop in your files in the assets and rename.

  • Alex

    So I’ve got everything working to a point.

    I have 12 markers running 12 models, however, no textures come through…only wireframs.

    I’ve created the models in 3DS Max and exported to OpenCOLLADA (.dae) … have the textures in the same directory … but still nothing… thoughts?

    Thanks.

  • http://www.looneydoodle.com lOOney dOOdle

    The only thing i can think of is your export settings. Send me a screenshot and i ll see if you are doing something you are not supposed to be. I ll post a screenshot of my settings as well.

  • http://www.looneydoodle.com lOOney dOOdle

    @Alex Any thoughts on sharing your code? I just finished a 12 marker 12 model implementation as well.

  • Im Zulkifli

    hey looney , i download it and i create fla file , but it seems have some problems.

    1017: The definition of base class Camera3D was not found.
    1020: Method marked override must override another method.
    Warning: 1090: Migration issue: The onEnterFrame is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘enterFrame’, callback_handler).

    hope u can help me thanks ;)

  • im zulkifli

    looney , i already update also , the error keep coming , one by one..i do appreciate if u can upload the workable one , thanks

  • http://- May

    Hi there! i appreciated much on your kindness for sharing this work with us here.thank you!
    i’ve tried executing this source code and everything went well, EXCEPT that those 3D models remain “sticking” on the screen even after the markers are all removed. i’ve tried making some changes but it was to no avail. would you mind giving me some guidance for how this could be solved?
    Much appreciation.

    Regards,
    May

  • http://blog.fathah.net Fathah Noor

    Your code works great for me, after a little retuning ;)
    Even after I can imported your project file into FlashDevelop, recompiled it, and successfully run!
    Thanks a lot! :)

  • http://blog.fathah.net Fathah Noor

    @Alex: Did you copied your DAE files from another folder before? If it was true, I think the problem is in the DAE file, not the code. By default, OpenCOLLADA will export 3D model and its textures with absolute paths to the folder, we need to rewrite those paths again manually. Just open the DAE file using text editor then look for and tags.

    @Looney: I need more than 12 markers. For now from 64 markers combination of 3 rows and 3 columns black/white box, FLARToolKit/FLARManager only detects 12 of them are unique markers… :(
    Do you have any references to make FLARToolKit/FLARManager more powerful to distinguish those 64 markers? Thanks before… :)

  • http://blog.fathah.net Fathah Noor

    @Alex: Did you copied your DAE files from another folder before? If it was true, I think the problem is in the DAE file, not the code. By default, OpenCOLLADA will export 3D model and its textures with absolute paths to the folder, we need to rewrite those paths again manually. Just open the DAE file using text editor then look for library_images and init_from tags.
    /br
    /br
    @Looney: I need more than 12 markers. For now from 64 markers combination of 3 rows and 3 columns black/white box, FLARToolKit/FLARManager only detects 12 of them are unique markers… :(
    Do you have any references to make FLARToolKit/FLARManager more powerful to distinguish those 64 markers? Thanks before… :)

  • salikawod

    I have the same problem as Zulkifli

    1020: Method marked override must override another method.
    Warning: 1090: Migration issue: The onEnterFrame is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( ‘enterFrame’, callback_handler).

    i would apreciate if u could help us in this problem
    waiting for your reply.
    Salikawod

  • David

    I hate to be the village idiot, but I’m having troubles just installing all the libraries to simply run an example. I have the same problem as Kitsune65; but lOOney dOOdle’s answer to just “Update your flar library, you should be fine” isn’t working. Am I missing something? What flar files am I updating?

  • http://www.looneydoodle.com lOOney dOOdle

    This version of the code is for an outdated version of flar manager, i ll be updating the code hopefully by the end of the week. That should fix all your issues, i ll try to put in some step by step instructions to run it as well. Sorry havent been able to reply for quiet some time now.

    @Fathah: 12 markers took a huge toll on the sys resources, dunno if 64 markers would work in a regular setup. But the concept is the same, let me know if you got somewhere with it.

    @sallkawod: The error is not from my code, send me a screenshot.

    @David: Wait till this weekend, new version is coming up.

  • http://blog.fathah.net Fathah Noor

    @Looney: about the marker, now I still use those 12 markers, still looking for ways to increase the number of unique markers.

    Anyway, I have tried the latest version of FLARManager (v1.1), implemented your method to display multiple markers and colladas. I have uploaded the FlashDevelop project file to my blog here (http://blog.fathah.net/2011/02/flarmanager-v11-flartoolkit-dan-away3d.html). It worked fine until today, when I upgraded my Flash Player to version 10.2.

  • salikawod

    Its running now
    ur source is awesome
    but thanks btw

  • PattiziA

    Hi dear, Could to send you multiple tracking file. because now I lovely to learn how AR work, but I try to do by myself for two months but nothing well. so I want you to help me how it do. who can help plz send to my email. Thank you

    xerophyte_tree@hotmail.com

  • Alessandro Previti

    hi! THX FOR THE CODE!
    I imported the project in flashbuilder and ran it;
    the program loads but when i put the marker in front of me nothing happens… what am i doing wrong?

  • newbie

    pls help me on how to compile it… make it .fla

  • http://www.looneydoodle.com lOOney dOOdle

    I ve never tried to.

  • http://www.looneydoodle.com lOOney dOOdle

    Not really sure, check the console.

  • Shivendra(newbie)

     i am implementing your code but following error is shown when i run it please help

    TypeError: Error #1034: Type Coercion failed: cannot convert org.papervision3d.core.geom::Lines3D@e627d41 to org.papervision3d.core.proto.GeometryObject3D.
        at org.papervision3d.objects.parsers::DAE/buildNode()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dobjectsparsersDAE.as:1288]
        at org.papervision3d.objects.parsers::DAE/buildScene()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dobjectsparsersDAE.as:1372]
        at org.papervision3d.objects.parsers::DAE/onMaterialsLoaded()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dobjectsparsersDAE.as:1652]
        at org.papervision3d.objects.parsers::DAE/loadNextMaterial()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dobjectsparsersDAE.as:1629]
        at org.papervision3d.objects.parsers::DAE/onMaterialError()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dobjectsparsersDAE.as:1706]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at org.papervision3d.materials::BitmapFileMaterial/loadBitmapErrorHandler()[E:StudiesFinal Year AR Projectmaths modulesrcorgpapervision3dmaterialsBitmapFileMaterial.as:260]

  • http://twitter.com/lOOneydOOdle Arunram Kalaiselvan

    check the model and make sure its okay. 

  • Lafran

    1020: Method marked override must override another method.
    Warning:
    1090: Migration issue: The onEnterFrame is not triggered automatically
    by Flash Player at run time in ActionScript 3.0. You must first register
    this handler for the event using addEventListener ( ‘enterFrame’,
    callback_handler).

    there was errors occured while i publish into swf file using FLASH CS4 , could u give a solution? or am i have to using FLASH builder as my IDE?

  • Ghostnars

    He forzado el código y ha funcionado, gracias por tu ayuda

  • http://twitter.com/lOOneydOOdle Arunram Kalaiselvan

    de nada

  • Sakol Tee

    I just new for flash builder. How can I open your flex project?

  • Khan

    Please can you give a step by step on how to use your code ?

    This would be much appreciated :D

  • http://twitter.com/lOOneydOOdle Arunram Kalaiselvan

    Read the documentation

  • http://twitter.com/lOOneydOOdle Arunram Kalaiselvan

    Read the post

blog comments powered by Disqus