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!

7 comments:

CD@Machinima Studios said...

Great to see you are challening yourself with Animata and all that OSC stuff. Great to see all that experience written up on your post.I'm very interested in using Machinima for pupettering as well and came across Animata a while ago. Never have done any project with Animata mainly because it's 2d and I want to do pupettering in a 3d environment. I look forward to Friedrich Kirscher's new Moviesandbox2 toolset which will allow that and will be released until later this year. So far I have managed to get my Wiimote generate OSC messages.
Got that working with Processing now but first used the VVVV toolset
to play around with OSC.
Good luck with your Animata project .
--
CD

klipper said...

Thanks for reading!

I am really impressed that you've gotten a Wiimote to send osc. Dang! Now I've gotta get me one.

How'd you do it?

I share your enthusiasm for MovieSandbox2. UT2004 was the 2d main machinima environment I worked with. Machinimation Studio was the first. I can't really bring myself to go back to it now though, with so many cool technologies out there (Mass Effect, GTAIV, iCLone, etc etc). I'm practically on tenterhooks waiting for Friedrich's system.

klipper said...

CD, I sympathize with your feelings about Animata's 2D limitation. I'd love a 3D version. [Who knows? If my coding chops get up to snuff, maybe I'll try something in Blender's game engine!]

However, 3D rendering and realism have never been priorities for me. Being able to create nuanced performances has always been my main interest.

CD@Machinima Studios said...

There are many way's you can get the Wii data to OSC. First there is a program called GlovePIE which allows a lot of external controller devices to be converted to different output (keyboard, MIDI, OSC ..) that has Wii support. As well a lot other tools now have some add-on's to support Wii. I used vvvv and Processing so far.
Blender GE looks like a very interesting tool for Machinima as well. There is so many out right now to look at that it's easy to loose track to get projects done.

To me 3D does not lead only to relalistic rendering which has indeed not that high priority to me as well as it lead to a lot of 'uncanny valley' problems. But you can work with 3D and so called NPR (non-photorealistic rendering) and that opens a totally new world to machinima.

klipper said...

You're too right about the 'uncanny valley' effect. NPR is the way to go! (See Pixar's 'UP'.)

Also about there being too many tools out there!

I'm always falling victim to that. As I code away in Processing and figure out how to use Animata, I'm NOT finishing my iClone project, or figuring out how to create GTA IV machinima, or finish a project I started LAST summer.

Perhaps a fitting coda to my paean to the benefits of the internet would be a caveat that it can cause serious ADD.

John said...

Hi there,

I've just started down the same path with Animata, only I'm using vvvv to generate my OSC messages. I feel happier with vvvv because of it's all drag and drop node based GUI (MAX MSP style) - And I don't come from a code background.

The vvvv documentation for creating OSC messages is good, and I can send OSC between two running vvvv applications.

But, as you pointed out, the Animata documentation is lacking.

Did you find any good resources? I can't find anything!

I would really appreciate any pointers in the right direction, good URLs..

My email is burnt.toast at ntlworld dot com

Good luck for your projects,

And yes, long live the internet!
J

klipper said...

Thanks for reading! I remember checking out vvvv a goodly while back, when I was still mac-only. I'm glad you reminded me of it now that I've got a Vista box. Apparently there's a minor issue getting it running under Vista, but I should have that sorted soon. I too like the drag-and-drop style, and would have started with PD (PureData) rather than Processing if I could have gotten it working on my mac. Of course, the awesome documentation for Processing is a check in the plus-column.

Now Animata is cross-platform, I've got to revisit a lot of my old assumptions.

I haven't got too much insight to share into Animata, but I started a wiki at http://usinganimata.wikia.com/