Archive for the ‘Processing’ Category

Hello, Cinder

Thursday, May 13th, 2010

As most of you know by now, I have been using a C++ framework called Cinder. It was created by Andrew Bell and The Barbarian Group. Last week, it was released to the public as an open source project.

With some help from Mike Creighton and Andrew Bell, I wrote a welcome to Cinder tutorial. It is a five chapter guide for getting started with Cinder. It highlights some of Cinder’s features and walks the reader through how to create the stippling project I posted a couple months back.

Source Code!

Included with the Cinder download are a bunch of sample projects to get you started. I haven’t been that good about releasing source code so hopefully I can make up for it now. The source for the following three projects are included in the samples folder.

Flint Ball (In the samples folder, it is called HodginParticlesRedux)

Earthquake!

Reaction Diffusion (using GLSL shaders) inspired by Toxi’s amazing work with RD

Fluid

Also, Andrew just finished porting Memo Akten’s MSAFluid library which is a rather lovely 2D fluid simulator. I used it to create a couple videos which use MSAFluid and a particle engine. Particles are deposited into the fluid and cause the fluid to move. The moving fluid then influences the movement of the particles creating a feedback loop. It ended up creating some nice examples of self-sustaining turbulence.

So there you have it. I am really excited to see Cinder out in the world. Check out the features and browse the projects in the gallery. If you have any questions or issues or compliments or suggestions, you can voice them in the forum. Happy coding!

Origins

Tuesday, April 6th, 2010

In 1998, I found my self on the verge of a frightening reality. I was about to graduate with a near 6-figure debt and a piece of paper certifying me as a ‘Sculptor’. And that is why I started working with computers.

I was slowly teaching myself Photoshop and Flash 3. I found the textbooks for learning these programs to be horribly boring. I recall very vividly one of the chapters in the Photoshop book directing me to draw a fuzzy selection around the fisherman in the image they provided. It was a misty vignette for a River-Runs-Through-It-inspired sentimentality, and I was bored.

Not surprisingly, I found that I was more driven and interested by the prospect of swapping heads in photos of people I knew. Eventually, swapping heads turned into adding penises. I was inspired by a friend’s personal art project. He would take a GAP or J-Crew catalogue and for a single one of the models, he would paste in a photo of the tip of a penis just peeking out the top of some smart khakis. He would then return these modified catalogues to the store and leave them in the stack for others to take.

After a few dozen heads and a few hundred penises, I decided I should start working on portfolio pieces. The work I had been doing wasn’t quite appropriate. I needed something else. I decided on creating a fake corporation and I would do some logo options and create different styles for business cards and potential websites. I played around with some fake pharmaceutical product names like “Pill-ex” and “Labrosine” and “Engorgetech”. Nothing quite felt right. Until shift-9. The ‘(’ character of the Zapf Dingbats font. The airplane icon.

The airplane changed everything. This little four-engine wonder was perfect. It would be the seed from which my fake company would grow but I still needed a name. Something related to airplanes and the internet and perhaps it should have a number in the name and hmm… What should it be?

I had always loved flying. It might be related to my father being a navigator for the U.S.Air Force and us growing up next to an Army/Air Force base. Flying was this strange thing that made my insides feel funny and my ears pop and I could finally see what the tops of clouds looked like and then we would land and I would be someplace new and exciting. Flying was fun. Until I grew to be 6′5″. Then it stopped being fun but that is a gripe for another day.

My fake company would be an airline. It would be both an airline and a specific flight, or maybe just a store that sells flight-related stuff. I recall my first logo attempts looked a lot like this.

Never content to blindly follow a fad, I chose to tweak the Helvetica ultra-light meets Helvetica black logotype formula with the addition of some Din Mittelschrift digits and the super awesome Dingbats airplane. And drop shadow! I never thought far enough ahead to understand why I had chosen ‘404′, aside from the fact that it was a number associated with a file not being found. I think the number was just in my mind so I went with it.

Skip a couple years ahead to the summer of 2001. I was thinking about making version 5 of my Flash experiments portfolio site. All of the previous versions were related to the airline theme somehow. The first couple versions of my portfolio showcased some movement experiments that were based on the visuals seen on the control tower radar screens. By the third version, I had switched to a navigation structure that was based on the seating arrangement on commercial jets. Each new project was represented by a taken seat, which unfortunately made it seem like I had nothing to show because there were a couple hundred empty seats and only a small handful of taken ones. After version 4 had been online for a long while, I decided I wanted things to take a slightly darker turn.

It was around that time I started to become fascinated by the idea of dying in a plane crash. Not to say I wanted to experience it personally. I was interested in death by flying because unlike gunshot wounds or car crashes or cancer or AIDS, the time that elapses between finding out you are likely about to die and actually dying is sickeningly long and horrifically short at the same time. Assuming the plane doesn’t run blindly into a mountainside, you are looking at a couple minutes of having to ponder just how much fire you will have to endure before the sweet release.

With a gunshot or car crash, the worst part is over before you even have a chance to think about how horrible it might be. I am generalizing of course. This little musing doesn’t take into account someone who is being held at gunpoint, or more topically, someone in a Prius. ZING!

With a degenerative disease, you have a prolonged misery but even with a worst case scenarios, you usually have at least a few days to be able to mend some relationships and say your goodbyes. In the plane about to to crash into the Pacific, you don’t even have the luxury of being able to make a phone-call. Maybe a few might get through on their cell phones but most will die with full awareness of how horrible it is going to be for relatives and loved ones to not be able to hear some final words. On a side note, I think planes should come with personal recorders in each seat so in the event of an impending crash, the passengers have a chance to save their parting message into the black box.

By the time I got around to thinking about version 5, I decided to take down version 4 and leave nothing at flight404.com until I could figure out the next steps. By now, I had established a minor reputation for doing some interesting things with Macromedia’s Flash. Upon finding a 404:file not found page at my site, numerous people asked via email what had happened to the site. “Where has flight404 gone?” and “What happened to flight404?”.

That is when I decided to base my next site on the idea of a plane catastrophe. Flight404 was going to disappear and a lot of people were going to die. The story was this:

Flight404, carrying 218 passengers and crew, has experienced what seems to be a supernatural event. At approximately 4:48 pm EST on September 6, while on route from Boston’s Logan Airport to Gatwick Airport outside London, Flight404 vanished into a clear blue sky approximately 40 miles off the coast of Newfoundland.

At a press conference held at Logan Airport, a visibly shaken member of the NTSB offered the following statement.

“As far as we can determine, the entirety of the Boeing 777, along with the seats, luggage, clothing on the passengers… basically, anything not biological, disappeared at around 27,000 feet, dropping the passengers and crew into the Atlantic.”

This new version of Flight404 was going to be a narrative. I would still post Flash experiments, but it would be intertwined with my personal search to try and find out why and how this event transpired. I began to research. I looked on eBay for people that were selling flight data recorders. Surprisingly, there were several. I ended up buying one from an ex pilot for American Airlines. He was very nice and gave me a bunch of airport maps. I asked him very odd questions like, “So… if a plane were to disappear over the Atlantic, how would Flight Control find out about it and what protocol do they follow to deal with this event,” and “If you were flying a plane nearby a plane that suddenly disappears, would you be required to divert your course and investigate?”. He didn’t give me very good answers.

Flight Recorder with water-activated sonar beacon.

Maps and approach vectors for most major airports around the world.

I had the first few bits of the story written. I would say that I was contacted by some of the family of people lost on Flight404 asking that I look into the events and try to find out what happened and if there was a government coverup. I created a few Flash sketches to add to the portfolio section of the site. These projects were also navigated to using an airplane floor-plan. I also had projects to represent the position of the pilot and first officer. I gave everyone names. I even wrote out the transcript for the cockpit voice recorder for when the black box would eventually be found, oddly not at the bottom of the Atlantic but in a field 10 miles north of Boston.

I had the homepage animation all set. After everything loaded, white dots would begin to fell from the top of the screen and when they hit the bottom of the screen, they would turn into gravestone markers. I had the first bit of the narrative written. I had a handful of projects in the portfolio section. I was ready to launch but there was a bug in my navigation that I could not figure out. I had some weird sorting issue for the projects so if I clicked on project 15D, 14D would try to load but I just couldn’t find this simple indexing error. I decided to postpone the launch. I would go to sleep and figure out the bug the next day. That was September 10th, 2001.

Two weeks later, President Bush raised the White House flag back to full mast so I decided to launch the site. I put a lot of work into this site and I wasn’t going to scrap it just because some terrorists decided to crash some planes. I put a notice on the home page indicating my feelings on the subject. I explained that I had been working on the site concept for over three months and that I had intended to launch on the 10th. I didn’t want to throw away all that hard work and start from scratch. I wanted to get on with my life.

Fairly quickly, the site made the rounds on the usual Flash forums and the comments were somewhat scathing. I was told that I was sick and that I was trying to profit from an act of terrorism. I was accused of taking advantage of an American tragedy. I was eventually interviewed by the New York Times. I got a $3000 server bill in the first month and eventually my site was shut down until I could pay off the debt.

It lasted for a few months. The storyline got more and more convoluted and I wrote myself into a decent sized hole. I quit updating after cops escorted me off a parking garage roof in downtown Boston. I had been shooting video of the planes taking off from Logan airport, which is a couple miles away. Some people on the upper floor of a nearby hotel saw me and decided I looked suspicious enough to warrant calling the police. I got annoyed. Version 6 arrived soon after.

GAFFTA: Transpose

Tuesday, February 23rd, 2010

I just posted some information that shows I haven’t been sitting on my ass doing nothing and not posting. I have been busy, I swear!

Here are the fruits of my last two month’s labors.

http://roberthodgin.com/gaffta-transpose/

RobertHodgin.com

Monday, January 11th, 2010

I have launched a portfolio site.

roberthodgin.com

Cymatic Ferrofluid

Wednesday, December 9th, 2009


Picture by munkt0n

This black oil is the reason I code. Not literally but it has had a profound impact on what I find myself coding. In 2002, I bought a small amount of ferrofluid off the internet. It was around the time when I started to learn Processing. I began asking for advice on the Processing forum on how to translate the formulas for magnetism into code. I received a great deal of help and after a couple days, I had a working 2D prototype. I have been using some version of this prototype ever since. You can see the prototype here but it was written for a pre-beta Processing so the code is pretty old. If you are looking for source code, I recommend Shiffman’s tutorial on forces.

The reason the black oil appealed to me was that it allows you to visualize the invisible field surrounding magnets. Its like a three dimensional execution of the iron filings test but much more mesmerizing. I instantly wanted to know more about them. Why do they behave the way they do? Why are they spaced out just so? What insane amount of math is going on behind the scenes?

I recently came across a similar looking phenomenon when looking for late night distraction on YouTube. Cymatics is described by wikipedia as being “the study of visible sound and vibration”. Below is an image of how vibrations from audio can create non-newtonian structures in a cornstarch and water solution.

If I wanted to create a similar looking structure, I would fill a space with magnetic particles (which would all push away from each other) and corral them with a central gravitational force (which would pull them all towards the center). It would look like this:

It is not a bad solution, but it doesn’t really have any personality. It just looks like the result of a circle-packing exercise. Not only that, it isn’t descriptive of the process I am trying to model. With the ferrofluid, there was no central gravitational force tying everything together.

Recently, I revisited the magnetism code. Somewhere in a flurry of ‘what if‘ guesses, I tied the mass/charge ratio to the particle’s distance from the origin. It ended up working surprisingly well.

As a particle moves towards the center, it would gain mass. If it moves towards the edge of the threshold, it loses mass. I added a hint of Perlin noise to break up the circular boundary. It is mesmerizing to watch the particles fall into place. Something about it feels right.

The next step was to disguise these particles. I added them to the multitouch project I have been working on (which I will talk about in my next post). In addition to the goo being distorted by touch, it can now be distorted by the magnetic particles. Every particle tells the mesh at the corresponding location to distort itself by an amount equal to the mass of the particle. Additionally, each particle creates large but shallow surface ripples. Again, the larger the mass, the larger the ripple. This creates a lens distortion which keeps the mesh surface dynamic.

This project also uses webcam input as a simple environmental reflection. I realized I could get a simplified subtle global illumination effect by having the webcam pull in color and brightness directly from the output, creating a highly decaying feedback loop. In short, I draped a piece of white paper over the laptop webcam so that the camera only saw light coming off the monitor.

Here are a couple short renders. They reflect realtime performance. I hope to have videos with audio soon.

Cymatic Fluid from flight404 on Vimeo.

Cymatic ferrofluid, lighting test from flight404 on Vimeo.

Cymatic ferrofluid from flight404 on Vimeo.

Next up, I will talk about the process I used for creating the goo itself. Perhaps eventually, I will be able to code my own cornstarch monsters. Stranger things have happened.

Homage to Radiolab

Thursday, November 12th, 2009

As I mentioned in a previous entry, I am working on an application to be presented at the V&A Decode exhibition opening in December. I was asked to rework the Solar piece so that it could be audio responsive in real-time.

During the development, I realized my usual habit of listening to music was not going to serve me well. As far as I know, the gallery will not be blasting The Knife throughout the space. I switched off the music and started making beep boop blah blah blah noises into the microphone but this got old, fast.

I put out a call on Twitter for podcast recommendations. A couple people were strongly in favor of WNYC’s Radiolab. I decided to give it a go and man… it is all I have listened to for the last three weeks. Im completely addicted.

I took a snippet from the episode entitled “Musical Language” which features a beautiful soundscape created by Jonah Lehrer. In the episode, Jonah and Robert Krulwich are analyzing the notion that sound is “touch, at a distance”.

Solar rework from flight404 on Vimeo.

Many thanks to Jad Abumrad and Robert Krulwich and the excellent Radiolab team for giving me so many hours of intelligent distraction.

Find out more about the podcast at: http://www.wnyc.org/shows/radiolab/

Hopefully, you will be entertained enough to support: http://www.wnyc.org/support/

The Classics Presents: Le Petit Dummy

Tuesday, November 3rd, 2009

Reposted from The Classics Presents site.

Three months ago, Bill and I decided to create an iPhone app. We had an idea in mind and though the idea was most definitely low-brow, we thought the challenge worthy of our efforts. So down into the gutter we climbed to begin working on the app that would become Le Petit Dummy.

Everything was going as planned. We were making great progress. Then it happened. Something entirely unanticipated. The more time we put into developing the app, the more it became respectable. Lo, our gutter-born brainchild was maturing! It sprouted wings of respectability and soared. The depths whence it came were now but a speck. It defied our intent and expectations and blossomed into something magical.

So, what does it do? What DOESN’T it do!

How many times have you longed to see the famous neo-classicist Jacques Louis David sing a scat rendition of Mouret’s Rondeau? If you are anything like me, the answer to that question is easily in the thousands. Well, my friends, long no more…

Too highfalutin? Okay. How about this? You could combine two disparate memes to create something greater than the sum of its parts.

Must go faster indeed! Perhaps you and TiVo want to collaborate to mock someone you saw on a Chevy commercial.

Not your thing, you say? You’d rather poke Kanye in the mouth as he tries to vocalize his innermost thoughts, you say? Be our guest.

Maybe a talking hotdog is more your thing. There’s an app for that!

Got a pet monkey? Does it often misbehave? Wish it could vocalize self-pity? Your wish is granted.

So many possibilities! Le Petit Dummy does it all! Well, it doesn’t do GPS turn-by-turn navigation but maybe we can work that into a 2.0 release.

Le Petit Dummy is available from the app store now. Enjoy, and don’t forget to tweet your new Twitter avatars.

Long time no see

Tuesday, November 3rd, 2009

One would think that me being technically unemployed would mean that I would technically have more time to post to this blog but one would technically be mistaken. I have been even busier in the last two months than I was in the several months prior. Doing my own thing has definitely revitalized my artistic efforts. In December, I am showing work at V&A (London), Wing Luke (Seattle), and GAFFTA (San Francisco). I thought I would write a bit about each.

Victoria and Albert Museum

I was contacted a couple months ago about contributing to the Decode exhibition. I will definitely be in good company. Among the contributors are Aaron Koblin, Jonathan Harris and Sep Kamvar, Golan Levin, Daniel Brown, Daniel Rozin, and many others. According to the site, Decode “will show the latest developments in digital and interactive design, from small screen based graphics to large-scale installations.”

They asked me if I could make a real-time audio reactive version of Solar. I created Solar two years ago. It originally came about because I was working on a demo for a talk I was to give at UCLA. It quickly became one of my more popular works. It features a magnetism and gravity sandbox where particles react to the intensity of the audio. Creating a compelling real-time version is definitely a challenge. The original Solar render probably ran at about 0.5 to 1.0 frames per second. Getting that up to between 30 and 60 fps is not going to happen easily.

Thanks to some great advice from Andrew Bell, I was able to create a robust version that still had a nice visual density but would still run at a good clip. It involved using instances of the parent sphere and child particles instead of calculating a set of particle positions for each sphere. Since I was definitely CPU bound (the magnetic repulsion calculations can get really heavy really quickly), this turned out to be a great way to still show tens of thousands of particles but only need to do repulsion calculations on a set of a few hundred.

Decode 01

Decode 02

Gray Area Foundation for the Arts

Im still not 100% certain what I will be showing at GAFFTA but it will likely be a series of prints based on modifications of the Solar engine I worked on for V&A. I created a tangent project called Moment of Fission. For this project, I place a few hundred charged particles in an extremely small space and then run the simulation. The particles don’t want to be that close so they instantly start moving away from the centroid. I trigger a render shortly after the particles start their rush to expand into unoccupied space. Below are a couple images from the series. More images can be seen in my Fission flickr set.

GAFFTA 01

GAFFTA 02

Wing Luke Asian Museum

The Wing Luke is having a show called Cultural Transcendence. I chose to try and recreate a memory I have of my time in Japan. My father met my Japanese mother when he was stationed at Okinawa for the Air Force.I lived there for only two years, between the ages of 3 and 5. I recall little of that time. My only strong memory is of a trip my family took to Mount Fuji. I remember climbing the gentle slope at the base of the mountain. It was very foggy and the path we took meandered through dense bamboo. There was an old man selling walking sticks from a wooden shack. My father bought one. I cherish that memory fondly.

A couple years ago, I asked my mother about the time we spent there. She laughed and said we had never gone to Mount Fuji. The memory I had was totally fabricated. We were actually in a public park just outside Tokyo. Mount Fuji was visible in the distance. It was not foggy. There was no bamboo. I had apparently made the whole thing up.

Fuji 05

In this piece, Mount Fuji always remains far away but looms over the landscape. It is always partially obstructed by bamboo and mist and other weather effects. Sometimes you can only see it because it is silhouetted by the passing full moon. It is a moody piece running in black and white.

Here is some test footage I shot off the monitor. Okay, the wind speed is cranked up too high but it should give you a decent idea of how the final piece will look.

Fuji test footage from flight404 on Vimeo.

Busy busy! I will post better documentation after the pieces are shipped and in place. Im excited for all of them. I am particularly excited for Fuji because I have been working on it for a few months. It is starting to feel right.

Change is in the air

Tuesday, September 8th, 2009

I just wanted to leave a quick post about my departure from the Barbarian Group. They put up an awesome and flattering blog entry on the TBG website. I am in the process of writing up my version which includes a stroll down memory lane and will hope to have it posted shortly. I was with the Barbarian Group for over 7 years which is a good 10x longer than any other job I have had. It has been a fantastic experience and I want to extend my gratitude to all the Barbarians. Look for a much more in depth post about this in the next couple weeks.

What now? Finishing up an iPhone app and working on a couple gallery pieces. Busy busy! Exciting times ahead!

Vague Terrain, v. 14

Tuesday, August 4th, 2009

My Radiolaria studies were included in the most recent issue of Vague Terrain. Many thanks to Paul Prudence for asking me to participate.

Here is the official press release.

Vague Terrain 14: Biomorph

A selection of artists, architects and writers were invited by guest curator Paul Prudence to contribute work that dealt with biological, botanical and morphogenetic ideas and processes. Vague Terrain 14: Biomorph provides an exotic selection of contemporary computational art, process-based illustration and speculative architecture. Some relevant keywords: “cellular automata, bacterial aesthetics, emergence and genetic algorithms.”

Contributing artists include: Daniel Widrig, David Lu, Emma McNally, Jonathan McCabe, Kat Masback, Marc Fornes (aka THEVERYMANY), Michael Hansmeyer, Robert Hodgin (aka Flight404), Wilfried Hou Je Bek and academic research directed by Alisa Andrasek of Biothing.

View the issue at http://vagueterrain.net/journal14