Archive for May, 2007

Powerful Visuals for Newbies: Your First Shader Tutorial at C74

Thursday, May 24th, 2007

My First Shader

No, wait! You, too, can do this! Then show everyone your shader code and feel like a bad-ass. Or, better yet, get a GLSL shader code tattoo.

Shaders, snippets of code for processing pixels and 3D points on your 3D card’s GPU, are cool — that much you may know. You may even know that you can use shaders — designed for 3D applications — to perform powerful video-processing tricks, as well, at high speeds, even on a relatively lowly laptop. How to actually build your own — that may be elusive. So, at long last, Cycling ‘74 has published a great, beginner-friendly (even for non-programmers) tutorial on building your own shaders:

Your First Shader

The author is Andrew Benson, who is my hero as far as coming up with great Jitter examples. (Every time I’m looking for some model for a technique I have in mind, I keep stumbling on his sample patches in the Jitter folder and still more in his By the second page, you’re already building your own custom, glitchy visual filters. Great stuff.

Now, of course, this tutorial isn’t limited to users of Max/MSP/Jitter, but Max is really an ideal environment for testing shaders. (It can even work well as a prototype environment before going elsewhere.) This code will work in Processing, though, and I could see using a combination of those two tools (still working on my own workflow there).

We’ll be practicing our shader chops, because there’s definitely a need for more information like this. This sentence says it all: “If you want to learn more, I highly recommend poking around the “jitter-shaders” folder and grabbing the official GLSL specification(PDF) or the GLSL Orange Book.” Good advice, and the example Jitter shaders included with the program will already do a lot of what you’d like need. But, as fair warning, the Orange Book and other official OpenGL documentation can make your head hurt, fast. (There’s a reason “… for Dummies” isn’t on the end of the title.) I still recommend picking up a copy, but there’s definitely a need for at least intermediate documentation. Being something of a dummy myself, I may be able to help. , , , , , , , , , , ,


© Peter Kirn for Create Digital Motion, 2007. |
Permalink |
10 comments

Add to del.icio.us

Want more on these topics ? Browse the archive of posts filed under News.

New software from Moving Brands added to the exhibition and the Minim sound library by Damien de Fede added to the contributed libraries.

Thursday, May 24th, 2007

New software from Moving Brands added to the exhibition and the Minim sound library by Damien de Fede added to the contributed libraries.

!shadows

Wednesday, May 23rd, 2007

I’m preparing for my presentation on Processing this Sunday at Flash Festival 2007. For this conference I’ve adapted a very sturdy presentation system I started in Lingo way back in 2000. The conversion has been relatively painless, except for the occasional details.

Thanks to Marius Watz and VitaFlo I’ve been able to make a nice Mac OS X full screen application that can open other windows on top of it. Usually Processing runs full-screen applications Java-style, i.e. on top of all other windows, including the dock & menu. But since I want my Applet to be a launching-pad for several websites, videos, and applications, I needed a different solution. Marius’ proposition only removes the menu & dock; this allows for many different solutions for what I want, several of which I’m exploring this week.

But one thing that was bothering me was the operating system’s imposed drop shadows. Mac OS X adds these love-em-or-hate-em shadows for a pseudo(d*3) look, but because of my design choices I wanted them gone. I first tried Window Shade X, but that was lame because it’s a system-wide hack. When you think about it, it’s just a simple application parameter; for example, applications built directly in Apple’s Cocoa environment have drop-shadows as an option that you can just check off from within Interface Builder:

Drop Shadow checkbox in Interface Builder

So after a quick search in Apple Developer Forums on removing drop shadows in Java, I found the following code that is fairly easy to adapt to any Processing Applet :

import com.apple.cocoa.application.NSApplication;
import com.apple.cocoa.application.NSWindow;
import com.apple.cocoa.foundation.NSArray;

public void setShadow(String windowTitle, boolean isShady)
{
  final NSApplication application = NSApplication.sharedApplication();
  final NSArray windows = application.windows();
  Enumeration e = windows.objectEnumerator();
  boolean done = false;
  while (!done && e.hasMoreElements()) {
    NSWindow w = (NSWindow)e.nextElement();
    if (w != null && windowTitle.equals(w.title())) {
      w.setHasShadow(isShady);
      w.invalidateShadow();
      done = true;
    }
  }
}

You just have to include this code into your applet, and then call:

void setup() {

  size(500,500);
  setShadow("", false);

}

There should also be a way to remove shadows via the info.plist, but I wasn’t able to get the right combination.

If you analyze the above code, basically what you have is a hook to the Cocoa platform that looks through all the windows for the one that contains your Java applet. Once you’ve found it, you can easily deactivate its shadows.

processing particleblobs

Wednesday, May 23rd, 2007

a short sketch with processing that visualizes a person’s outline as particles.

particleblobs.jpg

libraries:
blobdetection
traer physics

source:
particleblobs_pde.txt

Song Cycles

Tuesday, May 22nd, 2007

I’ve had an idea about personalized visualizations rattling around for a while. It always seemed like a pretty good idea.

Anyway, here’s a quick sketch of a semi-rowdy song:

It’s basically a spiraled spectrogram. It’s a bit silly at this resolution, but oh well. Here’s a slower track:

You could, hypothetically, recreate the song from these images. It’s kind of a neat way to (possibly) own a physical copy of a piece of media which is no longer physical.

Any takers?

Later: I reworked the code to be resolution independent (When does my large format printer get here?). Here’s a special treat for anyone who has been put in a crowd of high-class people, then acted “real rude” to by the very person who brought them there.

I’m planning to print these 13.5″ by 13.5″ — the same size as an LP sleeve. I’m, honestly, a little bit excited about it.

One day workshop in the ArtScience program at Royal Academy of Art in The Hague.

Monday, May 21st, 2007

One day workshop in the ArtScience program at Royal Academy of Art in The Hague.

BD4D London, this Friday.

Monday, May 21st, 2007
1.5 years since their last event, By Designers For Designers returns to London’s ICA this Friday, this time featuring the following people & their short presentations:
Motion designers Rob Chiu and Chris Hewitt from Devoid of Yesterday.

The interactive work of Karsten Schmidt (erm, that’s me… :) at toxi.

Steve Price from Plan B studio.

Exploring interaction between man and machine with Andreas Muller of Nanika / Hi-Res.

Marc and Tommi, ex-hi-res creatives who are starting a new and exciting venture together.

Interactive media artist and researcher (and fellow contributor to MB’s KEF installation) Chris O’Shea.

Tim Nolan of Spent 2000.

Mark Hough: design and moving image.

More info & tickets here: BD4D and ICA

If you fancy coming along, make sure to book ahead to avoid disappointment. I’ve been told seating is strictly limited and at least 1/3 of tickets are sold already…

Maybe see you there?!

Penner Easing für Processing

Sunday, May 20th, 2007

Da ich auf Arbeit gerade Fuse zu tun habe, dachte ich mir es wäre ja keine schlechte Idee die Easing Funktionen von Robert Penner mal nach Processing zu portieren. Aber wie so oft ist schon jemand vor mir auf die Idee gekommen. Das ganze ist sicherlich noch ein wenig ausbaufähig da man im Moment immer den Start- und Endwert sowie die Schrittzahl und den aktuellen Schritt angeben muss. Besser wäre es wenn man wie bei Fuse eine Liste von Start- und Endwerten übergibt und das ganze dann von allein läuft.

sojapanese

Saturday, May 19th, 2007
sojapanese.jpg

Recent personal sketches with as3.
I thinsk as3 is too complicated to code casual visual sketches.

Now Im writing library named skechbook. Its something like proce55ing, handy and dirty, classes for daily casual skeching.

sojapanese_study1.jpg

sojapanese_study2.jpg

sojapanese_study3.jpg

sojapanese3.jpg

sojapanese2.jpg

sojapanese_study9.jpg

Steve Cooley and Derek Scott will be demoing Processing integrating with OSC and Pure Data at the Maker Faire in San Mateo, CA. http://makerfaire.com/pub/e/136

Friday, May 18th, 2007

Steve Cooley and Derek Scott will be demoing Processing integrating with OSC and Pure Data at the Maker Faire in San Mateo, CA. http://makerfaire.com/pub/e/136

Shoot an Iraqi

Wednesday, May 16th, 2007

As you may or may not have noticed, I was teaching last month at the Chicago Art Institute. I met some pretty amazing people while there, but the person who really stood out for me was the very charming Iraqi artist Wafaa Bilal (cf. http://www.crudeoils.us/) who was preparing an interesting online performance entitled Domestic Tension: all throughout the month he has been living at the Flatfile Galleries where — via a locally housed server — you can chat with him, watch a live video feed of his life in the gallery, and shoot at him with a collective remote controlled gun.

Now, if you somehow think this is either lame (your call) or disturbing (whatever), you should at least know that while Wafaa is enacting this mostly symbolic performance in (relative) comfort as an art student in the United States, the rest of his family is very much enduring the real deal back home — and with very real casualties. So while it is symbolic for us in one way, it is symbolic in an entirely different way for him.

It is also interesting to frame this performance within the larger context of the displacement of the American discourse on casualties and friendly fire in Iraq: there is no longer the whimpy media smoke-and-mirrors proxy-debate that skirted shamelessly around the issue of cadavers within the video frame. The original debate (constructed pro and con by the pentagon) on how to honor lost american solders, has now transformed into a count not only of full cadavers and dead football players, but of all the missing body parts that will never be coming back. And on the backs of those incomplete bodies, we are finally feeling the weight of the enormous the narrative of the Iraqi body count, and particularly the breadth of this body count, i.e. it’s no longer about numbers, it’s about demographics.

Although I tend to yawn at on-line performances, especially heavy-handed ones, somehow I fell for this one. I suppose it’s the ambiguity of the whole thing (and the good nature of Wafaa) that warms me to it. Of course this work references some far more hardcore pieces of Chris Burden such as when he locked himself in a locker for several days, shot at planes, or had a collegue shoot him in the arm. Wafaa is also making some very broad strokes towards other famous works in the construction of an American mythology, for example Beuys’ I like America and America Likes Me.

But when it comes down to it, I have actually only seen the Burden performances via short crappy videos which grow their semiotic gravitas precisely out of of the crapiness of the video qua deficient document. Much of the 60’s and 70’s performance art has been tainted by this documentation process. I’m thinking precisely of the spic-and-span Los Angeles exhibit last year at the Pompidou Center where the contrast was particularly annoying. Coming back to Wafaa’s current plight under the gun makes me wonder to what degree the crappy webcam refreshing every n seconds helps to construct the mythology of the performance.

I had promised to Wafaa that I would post something about this performance, but I couldn’t get a decent enough connection until now to check it out myself. Watch the following video from Day 8 to get a sense of their troubles keeping the gun online:

Build by EasyDesign ! ////////////////////////////////////////////////////////

Wednesday, May 16th, 2007

Happy Art

Build by EasyDesign ! ////////////////////////////////////////////////////////

Wednesday, May 16th, 2007

Happy Art

nasa worldwind java in processing

Tuesday, May 15th, 2007

finally. nasa world wind java is out. i was wainting since january to play with it. it’s great that they moved from .net to java in order to get platform independent.

the sdk is very easy to use but the examples are horrible. three classes with a lot of swing and awt garbage. only 10 lines of code are really needed to get it working in processing.

import gov.nasa.worldwind.*;
import gov.nasa.worldwind.awt.*;

void setup()
{
size(500, 500, JAVA2D);

WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setSize(width, height);
this.add(wwd);

Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
m.setShowWireframeExterior(true);
m.setShowWireframeInterior(false);
m.setShowTessellationBoundingVolumes(false);
wwd.setModel(m);
}

you have to get the worldwind sdk and extract it. create the folders worldwind/library in processing’s libraries folder and copy the file worldwind.jar into it:
libraries/worldwind/library/worldwind.jar

next i will get it working on my movableScreen..

worldwind_01.pngworldwind_02.png