FLARManager v0.2 (for FLARToolkit)

finally found some time to brush up recent changes to FLARManager. new bits include:
 

Flash Player 10 3D example now works! sorta. translation is off a bit in some areas of the screen (not sure why…?) but converting a FLARToolkit matrix to a FP10 3D matrix seems to be working properly.

camera output mirroring can be toggled in FLARCameraSource; set to true by default. this flips the camera image horizontally so that it appears like a mirror to the user.

FLARCameraSource now supports non-4:3 aspect ratios.

a few minor bug fixes (including one that caused REMOVED events to not fire properly), and a few other code cleanups.

 
download here:

FLARManager v0.2

Creative Commons License
FLARManager by Eric Socolofsky is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License; please provide attribution to the author in any projects using this source.
 

read this post for general info on FLARManager.

14 Comments

  1. technodai says:

    Hey Eric, nice work! Really interested in the ratio fix in particular. Will hopefully be displaying on some big, wide screens soon!

    Cheers!

  2. ericsoco says:

    yeah, let me know how that goes — i wasn’t entirely sure how best to implement that, along with the downsample ratio, to keep things as simple as possible, because there are three things to consider: the mode at which to run the camera (which i decided to default to 640×480), the downsample ratio (which remains defaulted to 0.5), and then the size at which to display the image.

    what i didn’t provide access to is the placement of the clipping rectangle within the video source; it automatically sizes to one dimension and centers on the other. if you need to offset that instead of centering it, try shifting video.x/y in FLARCameraSource.init.

    let me know if you run into any trouble.

  3. Javier Patiño says:

    Hey great contribution. I can not understand why in Xcode and Visual Studio Artoolkit to handle multiple patts only need an external file and is working separately. instead on flartoolkit are in array and can not be assigned separately.

  4. ericsoco says:

    sorry javier, i don’t quite understand — are you saying that ARToolkit will automatically load all the pattern files you have in a certain directory?

    if i’m understanding you correctly, the problem is that flash cannot gain access to a directory listing without a server-side script. it would be possible to write something, in php for example, that collects all the filenames within a directory and passes them into the swf on init, but this is outside of the scope of FLARToolkit.

  5. Javier Patiño says:

    Look.. I have an iMac and I use Xcode to develop in arttolkit, and we use one file where artoolkit search load all the patterns from a directory. and I see the page http://www.squidder.com/flardrums/ and I download all files from the internet and they use one file like on Xcode to load the pattfiles… “application.config”.. this file has this content

    16
    50

    assets/flar/camera_para.dat
    assets/flar/snare.pat
    assets/flar/kickdrum.pat
    assets/flar/ride.pat
    assets/flar/crash.pat

    assets/audio/snare.mp3
    assets/audio/kick.mp3
    assets/audio/ride.mp3
    assets/audio/crash.mp3

    So they can call all patterns separately…thats why I say….

  6. Javier Patiño says:

    Ok up dont show all code…I upload the file here http://www.suitecreativa.com/aapplication.config.zip take a look

  7. ericsoco says:

    oh, yeah, sure you could do that with FLARManager. it’s just putting the assets in a separate text file. note that with squidder’s setup, you’d have to make changes to that .config file every time you added/removed a .pat to the folder.

    i chose not to do that for readability — i want FLARManager to be as easy to pick up as possible, even for coders who haven’t progressed to the level where they understand how to load an external text / xml file. but, it’s also extensible, so if you want to separate out the asset list and load it into the FLARPatterns array in your own way, that’s completely your option.

  8. Javier Patiño says:

    I can put videoStream in a plane or a cube… but I’ll like put differents videos acoording to patt?

  9. ericsoco says:

    sure, just set up a NetStream instance for each stream you want to use, and switch between them based on the FLARMarker.patternId you get back in your FLARMarkerEvent.MARKER_ADDED event handler.

  10. Javier Patiño says:

    ok… look how I call some specific marker? var materialsList:MaterialsList = new MaterialsList({all: videoCristina}); - should I replace “all” for some marker?

  11. Javier Patiño says:

    can you make me an example please….I dont understan how ca I do…thanks

  12. Javier Patiño says:

    Hello.. I Have a problem with FlarManager 02… dont recognice DV cam in my Mac just USB cam…. thanks 4 u help

  13. Javier Patiño says:

    Hello.. I have a problem when I try to load a Dae without Collada.as…If I load with DAE.as give me an error… with some doubleside and effects…. why this errors?

Leave a Reply

Additional comments powered by BackType