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.

Monday, May 11, 2009

Son of Genetic Algorithm Library

I was recently contacted about the genetic algorithm library I wrote a couple of years back. I remembered it having a bug or two so I decided to give it a quick polish before recommending it. A quick polish turned into a furious scrubbing. Then into total dismantling and then rebuilding with new parts. There were some gaping huge holes in the logic behind the framework of the last version but hopefully the new build is more reliable. Plus it not only works as a GA, but as a tool for splicing arrays of information as binary - that you the user can control how you see fit.

Genetic Algorithm Library for Processing or Java

When I get time I will alphabetise the reference and add some graphical examples. For now, I'm putting up the bare bones so it can be used and abused.

Also, a shout out to Konami Code Sites who were kind enough to add RobotAcid to their list. Go check it out for some geeky finger foolery.

Sunday, April 19, 2009

JQuery is Easier Than it Looks

As an unrequested favour to my new host, I decided to move the link list on the site over to JQuery. Originally the link list was an aggregate of at least 10+ php files that were then hidden by scriptaculous. And the mark up to get the hiding to work was pretty ugly. I've now switched to dynamically pulling in the link lists for a nicer page loading experience and for less demand on the server's cpu. And the script to pull this off is quite small:

// hide all divs
$(document).ready(function(){
$("div").hide();
});
// Accordion toggle categories and ajax load empty categories
function toggleContent(id) {
// id also serves as a file path for the file to be loaded
var div_id = "#"+id.substr(id.lastIndexOf('/')+1);
var jdiv = $(div_id);
// if div contains a noscript item, load content from id
if(jdiv.children("noscript").length > 0){
jdiv.html('loading...');
jdiv.slideDown("normal", function(){
jdiv.load(id+".php", function(){
// capture inner html and switcheroo with loaded text
var html = $(div_id).html();
jdiv.html('loaded');
jdiv.slideUp("normal", function(){
jdiv.html(html);
// hide all subcategories
$("div", div_id).each(function(){
$(this).hide()
});
jdiv.hide();
jdiv.slideDown("slow");
});
});
});
// otherwise just slide the div open and closed
} else {
$(div_id).slideToggle("slow");
}
}

Not to mention that it took very little time to learn, despite JQuery syntax looking fairly scary.

Saturday, April 04, 2009

I'm Back

After being royally raped by a Chinese virus I've moved hosting to Huevia and put everything back online. I'm leaving comments off because the blog was the first part of the site to get affected, and also I'm not uploading any cgi scripts until I'm certain it's safe to do so and I'm doing it right.

I would normally post some links as well, but I'm thinking using my regex powers to make a proper indexed page of links with a smart search box on the side. This is because Blogger's search tool is a bag of bollocks.

Also you'll notice that comments are off. I'd rather not have that avenue open to attack my site. If you want to nudge me then my email is:

Yes it would be nice if it were clickable. No junk mail in my inbox would be even better.

Wednesday, January 07, 2009

Pixel Pop

We've released a music game.

Pixel Pop

Thursday, December 04, 2008

Fat Cat

We've made a bullet-hell shoot em up.

Fat Cat

Enjoy.

Saturday, November 15, 2008

Surrealism

In an effort to get back to why I started working in digital in the first place, I set out to do some surrealist drawings. My intention in working with a computer was to get it to do the same kind of surreal work that I did long before my return to art education.

Needless to say, I got sidetracked.

Surrealist drawings

It's almost like the opposite of programming. This work is free and mindless, whereas working with a computer is intensely cerebral and structured.

The next game of mine to be released uses the Logo style path language I blogged about before. If I applied this path behaviour as thrust on particles instead of walking a line, I might have beginnings of how to teach the computer my particular drawing language.

Timeline of Internet Memes
The Daily WTF
Rat Brain Neural Network
Super Mario - wall climbing level (idea research)
Theo Jansen creates new creatures (TED Talk)
EA Cancels Tiberium article (and ensuing bitching in the comments)
Real Life Tron on an Apple IIgs
Lost and Found (short film)
Emmanuel Guibert\'s drawing technique
Keith Schacht & Zach Kaplan: Products (and toys) from the future (TED Talk)
The McCollough Effect
Fold It (protein folding science game)
Robokill (polished flash game)
A Series of Letters to the First Girl I Ever Fingered

SWFBridge AS2 to AS3 communication
Adding a fullscreen option to the context menu in AS3
Regex Tester
Regex Advice (forum)
Adobe Documentation on Regex Groups
Flex Documentation on Regex
How to poach an egg