Saturday, June 13, 2009

I'm not a machinimator, but I play one on the web

This isn't strictly machinima related. However!

A while back I found out about a neat program called 'Animata'. Nifty 2d puppeteering programming. Sort of like Anime Studio, but without the drawing tools, and performed live instead of keyframed.

Anyway, I wanted to use it. Thing is, it was never written as a product for public consumption. The creators used it for their own performance needs and afterwards decided to release it into the wild. So there's no support beyond the user group. Now admittedly, the creators are very active on that list, offering quick response to questions. But there's no manual, no readme, and just a few basic tutorials.

The thing is, to do any actual puppeteering you need another application that can send OSC messages. Don't know what OSC messages are? Neither did I.

That brings me to the point of this post. The internet. Or rather, how things have changed in my lifetime. My entire experience with Animata is conditioned on the tremendous role in my life of the internet.

How did I hear about Animata? On somebody's blog. Where did I get it? I downloaded it. How did I finally figure out that I needed another program to act as a puppeteering controller? By posting a question to the email list. How did I figure out what OSC messages are? Google. Of course.

But it doesn't stop there. You can't just download a OSC compatible puppeteering app.

[Hold on a sec, let me google that to be sure. Dang, its seems that there's Touch Designer. I'm going to have to d/l that and check it out. Its a programming environment, but it sounds like its a much higher level environment than Processing, which is what I"m using. More on that in a moment. Touch Designer is only WinXP only, Vista with caveats, and I'm bi-curious mac and pc. So its not an ideal solution for me, but hey, its free (non-commercially).]

To puppeteer with Animata, you've got to create something that sends appropriate OSC messages. I gleaned from the fora (there's that internet again) that PureData and Processing, two open-source programming environments, are popular options. Max/MSP is another, but it's proprietary and expensive. Once again off to the internet to download both PD and Processing. Take a moment, to consider the 'open source' movement, of which both PD and Processing are stellar examples. The internet is the oxygen that sustains it; without the internet, no open source software, shareware, freeware or donation-ware would be remotely possible. Certainly what I'm doing right now.

As it turned out, PureData wasn't working on my mac. Off to the forums in search of help. Alas, this time I was foiled; no help was forthcoming. I was bummed because I really liked the look of its graphical, rather than text-based, programming metaphor. Ah well, Processing was the winner. I can only handle learning one programming language at a time anyway. And though I used to write code all the time, and used to have pretty decent C chops, object-oriented programming is rather mystifying. It was just a theoretical construct back when I was stuffing 6502 machine code into the memory (a whopping 48KB; my 4GB laptop has 87,381 times more memory!) of my ATARI 800 with POKE statements!

Anyway, back to puppeteering with Animata. So I know that I should be able to write an interface for Animata using Processing; first thing I have to figure out is how to send OSC messages. Back on the internet, I learn about and download an OSC library for Processing. After much pulling of hair, a query to the mailing list set me straight (there was a typo on one of the few tutorial pages for animata), and I was able to control bones and joints in Animata using the mouse in a Processing app.

So now I'm cookin'! Next brilliant idea is to use my midi keyboard as a controller. Now I have to figure out how to use midi from Processing. By now I'd gotten good at this combing the internet for this sort of stuff, and in fairly short order got it all going on. Of course, I had to download a couple more libraries for Processing and update Java on my mac, but I got there!

From here there lies a fork in the road ahead. On one side I can start writing a midi implementation, which would be cool because that would allow me to use midi sequencers to help control the puppets' animation. On the other side is motion tracking; creating a system to control puppets through a video camera. I'm starting with the midi; its easier code to write, and I really like the idea that off-the-shelf sequencers can help me animate!!!

The video camera idea sounds incredibly cool. The reverse shadow theater example on the Animata website is terribly cool, but after doing a bit of internet searching I suspect that it will suck up a lot of my psychic resources. There's something called EyesWeb, but its Windows only (see above), and non-trivial.

Meanwhile, today I crossed the first hurdle. I wrote a Sketch (that's what programs are called in Processing) that translates key presses on my midi keyboard into skeleton animation. That opens the door; all the main conceptual obstacles have been cleared. Learning Processing woud have been impossible without the internet. Not long ago the only way to have learned a programming language like this would have been from a book; today I can use the awesome online documentation available at Processing.org.

[Seriously, if you're interesting in good website and documentation design, check out the site. the language is fully documented and cross-referenced with code examples that execute in-browser. What an asset when trying to figure out how to do stuff with it!]

The next big step is to really master Animata, which, as I mentioned comes with no documentation. (I think I volunteered myself to start a wiki about it.) The rigging process in particular is challenging. Stay tuned!