Sunday, June 21, 2009

Augmented Reality Tests

I've been trying out various AR solutions. All with varied success rates.

Flash and augmented reality is no where near as fast as some people claim. Sure if you have a high end Mac, then it's going to run great. But on my PC laptop with 1gb memory it's not that fast. In fact it's fairly choppy even with optimisations.

I started with this video tutorial. Which ran appallingly slow on my machine.

I then went to Mikkoh's blog and downloaded his demo. That ran a little faster. It also works straight out of the box without needing to download anything else.

After that I wanted to see if I could get multiple markers going. For that I downloaded FLARManager by Eric Socolofsky. The most annoying thing about getting it to run was getting a build of Flex for Flash Player 10 that wasn't broken. Aside from that, it's pretty well written and it's set up for optimisation.

I finally had two markers working:

Note the framerate. I was using 8x8 pattern files, running at half resolution, quality set to low and still not that fast.

I discovered that the marker files were actually text files and wrote my own marker maker. You can get a web cam based one from the web, but their output is pretty dodgy. I built it using Processing. All the ARToolKits seem happy reading any marker file with any extension: .txt, .pat, .bananas, .anything.

I tried without success to get Chung's Simple ARToolkit to work. At one point I had recognition of a very basic marker (which was pleasingly fast), but nothing since then. It just won't recognise my markers. The most fustrating thing about it is that he's set the JARToolKit object to private, so you can't access it directly and do anything else with it. Why!? No multiple markers! Why don't you trust me Chung!?

The original jARToolKit seems to be happy in the code folder of a normal Processing sketch, so I might see if I can rebuild the simple ARToolKit as a class in a normal Processing sketch. Though I'm skeptical about it seeing any of my patterns.