Wednesday, 12 May 2010

Multiple AR Markers....Issues


After successfully loading an image to a single marker I needed to load multiple images to multiple markers. This is where I had some difficulty. I managed to find an extension of the FLARtoolkit called FLARManager, that is designed to enable multiple marker for multiple content display. I was lucky enough to find a further tutorial that showed how to create one 3D cube just like before but by using multiple markers it would create multiple instances of the one cube and assign a new color to each new instance. I needed to use something similar to this but rather than create multiple cubes, I needed multiple flat planes that would allow me to assign a different image to each rather than a colour. The tutorial was from http://rawkes.com/blog/2010/01/26/tracking-multiple-augmented-reality-markers-flarmanager-and-papervision#download

I managed to combine the work I had done previously with the image and the marker with the tutorial above and managed to get multiple markers to display the image from the previous post. The problem was that each marker displayed that one image so if I had three images on screen at once all three would be displaying the same image. I needed to find a method of assigning an image to each marker. After days of struggling and frustration at the lack of progress I went to see Ben Reynhart at Mutant Labs. He helped me out massively with this issue and showed me what was going wrong. I was close with my code in the sense that I had to assign an image to the detected marker, but just wasn't calling the function correctly. After seeing him it worked perfectly and each time a numbered marker was detected the corresponding image I set up would display to that marker alone! Next job was to replace the external image with web images, fortunately the BitMapFile material of PaperVision3D used to display the extenal images supports http urls so it was just a case of replacing the file paths with urls.

No comments:

Post a Comment