Sunday, June 22, 2008


Virtual Ball Pit from Kevin Atkinson on Vimeo.

Update: This is effect is currently being used by the band The Killers in their onstage visuals during their current world tour. It's deeply satisfying to see it being used in a high-profile setting.

I quite like how this one turned out. I've been playing with real-time physics libraries for a while, both 3d and 2d, and I've been wanting to do something for a while, but I've found it surprisingly difficult to come up with anything that grabbed me. But a couple weeks ago I had a brainwave and wrote this in just a couple days.

For those interested in such things, I didn't use Erin Catto's Box2D, which seems the current champ in developer mindshare in this tiny niche. I started out using it, and it's quite nice, but it just wasn't fast enough when I used enough circles/pixels to generate an intelligible representation of the video stream (there're about a 1000 used in the demo above). Luckily, I chanced across Scott Lembcke's chipmunk physics library which uses some kind of fancy-pants geometric hashing to speed up collision testing, and it works quite nicely in real-time with 1000 pixels/circles.

As ever, I'm impatient with the whole documenting process, which is why these demos are a tad perfunctory and under-(non-?)rehearsed at times. So yes, if you listen close, you'll hear me say to my wife, "I just want to get this stupid thing up on the web...."

P.S. Some people have told me they have trouble with the vimeo video, so here's a link to the (ghastly, artifact-riddled) youtube version.

P.P.S. Here's quicktime of the vid.

P.P.P.S. if you liked this one, you'll probably like these as well:

The wobbly effect!
the flowy-fluid effect!
The wavy effect!
The freaky time-shifting effect!

10 Comments:

Anonymous Anonymous said...

So what did you end up using along with chipmunk, if not Box2D?

3:44 PM  
Blogger The Method Artist said...

I used Chipmunk as a drop-in replacement for Box2D. The vision stuff is OpenCV, plus a little of my own secret sauce.

Not to knock on Box2D, which seems to have more features that chipmunk, and it may well be there is some way to make it go faster. And in general, it's no slouch in the speed department, either.

4:18 PM  
Blogger doswheeler said...

ow, now that was pretty fascinating wasnt it. Very cool stuff indeed.

JT
http://www.Ultimate-Anonymity.com

5:36 PM  
Anonymous Anonymous said...

That's freaking awesome. One question, though: why are you pitching to directors? There's not a lot of need for real-time effects when you're just going to be spending tons of time in the studio anyways. You should be hitting up areas where being live matters: concert production, nightclubs, etc.

5:58 PM  
Blogger The Method Artist said...

Hey, thanks Anonymous. Good point about the live vs. studio thing. As a matter of fact, I'm hoping shortly to launch a biz based on real-time interactive effects. The music video thing is a fun, but not terribly dependable or lucrative, although if it leads to commercials work, there is a decent payday.

My hunch is that interactive video is poised to go mainstream very soon.

6:02 PM  
Blogger Kert said...

That is AWESOME!!! I love it. That is one of the coolest ones yet :)

6:12 PM  
Blogger The Method Artist said...

Yay, I got a Kert comment! Thanks, man! And you know how to call them, too.

6:18 PM  
Blogger Matthew said...

That's really awesome work. You should work for Apple, these effects are kinda like what they ship with iChat, iLife, and the likes.

10:12 PM  
Blogger pTymN said...

I ended up just porting the spatial hashing into my own Box2D respository. Erin Catto won't use it in Box2D, because it reqires fine tuning based on the size of objects in the world.

5:54 AM  
Blogger The Method Artist said...

That's really interesting, ptymn. Did you find it gave you a significant speed boost when dealing with large numbers of objects?

9:43 AM  

Post a Comment

<< Home