loading

Archive for May, 2007

eskimoblood

drool

fake still

Author: ghedolo

Keywords: processing.org

Added: May 26, 2007

flight404

Flock of birds, revisited

Return of the birds! Finally! Here is the video that a few of you asked to see. The original post of this project was about three months ago. I had always meant to make a video of it, but just didnt get around to it. But here it is (Vimeo only for now).

Also, found another neat trick. Reflective mapping with OpenGL. It ended up being a fairly easy trick, and it adds extra ooomph to the ripple code. Tutorial 11 is all you need to get going. It is as simple as it is pretty, but like the additive blending, be careful not to overuse it as it is just a ‘trick’. Before you implement it, think about whether you want to use it because its easy and shiny, or because it might actually help what you are doing.

Here is a generic implementation. Yay, Java Ripples!!! Nothing new there. But unlike the usual Java ripples you might have seen, this one doesnt rely on accessing the pixel array and shifting it based on the height map of the ripple. Its OpenGL environmental mapping using a texture as the reflection. For this example, its a texture I pulled off of Filter Forge. The ripples are created by webcam movement.

flight404

Flock of birds, revisited

Return of the birds! Finally! Here is the video that a few of you asked to see. The original post of this project was about three months ago. I had always meant to make a video of it, but just didnt get around to it. But here it is (Vimeo only for now).

Also, found another neat trick. Reflective mapping with OpenGL. It ended up being a fairly easy trick, and it adds extra ooomph to the ripple code. Tutorial 11 is all you need to get going. It is as simple as it is pretty, but like the additive blending, be careful not to overuse it as it is just a ‘trick’. Before you implement it, think about whether you want to use it because its easy and shiny, or because it might actually help what you are doing.

Here is a generic implementation. Yay, Java Ripples!!! Nothing new there. But unlike the usual Java ripples you might have seen, this one doesnt rely on accessing the pixel array and shifting it based on the height map of the ripple. Its OpenGL environmental mapping using a texture as the reflection. For this example, its a texture I pulled off of Filter Forge. The ripples are created by webcam movement.

eskimoblood

Simulated Feedback

An attempt at simulating video feedback effects, trippy recursive kaleidoscope stuff, no actual camera involved, sorry for the rough cuts - just a bunch of random snippets, built with Processing.

Technique inspired by Paul Prudence’s vvvv work: http://www.flickr.com/photos/transphormetic/sets/72157600095395068/ (He was kind enough to hint at just enough of his “secret” that I just had to know if I could get Processing to do something similar! Thanks Paul.)

Author: davebollinger

Keywords: opengl video feedback processing.org

Added: May 25, 2007

marius watz

New Processing sound lib: Minim

Minim, a new sound library by Damien Di Fede was just posted on processing.org. Sound has never been the strongest point of Processing, and with ESS and Sonia already in existence, that makes Minim the third attempt at providing sound functionality. But to be fair it should be said that Java on the whole has never been that good at sound, with Sun notoriously neglecting the media APIs.

Like ESS, Minim is based on the JavaSound API, but at first glance it seems like a more complete solution than either ESS or Sonia. It allows stereo input from either line-in or file (the others only do mono), it has beat detection and there is a class hierarchy for realtime sound synthesis and filtering. And there is more good news for those using Processing in Eclipse or other Java IDEs - Minim comes with full source, released under a GNU license. This should be mandatory for libraries, but sadly isn't.

I haven't tested Minim yet, but it certainly seems very promising. For my own purposes (realtime sound responsive visuals), the stereo option as well as the beat detection could come in very handy. I recently created a new performance for playing with Alexander Rishaug at Lovebytes last weekeend, if I had known about Minim I might have tried it then.

Here is an abridged feature list, taken from the Minim introduction:

  • AudioFileIn: Mono and Stereo playback of WAV, AIFF, AU, SND, and MP3 files.
  • AudioFileOut: Mono and Stereo audio recording either buffered or direct to disk.
  • AudioInput: Mono and Stereo input monitoring.
  • AudioOutput: Mono and Stereo sound synthesis.
  • AudioSignal: A simple interface for writing your own sound synthesis classes.
  • Comes with all the standard waveforms, a pink noise generator and a white noise generator. Additionally, you can extend the Oscillator class for easy implementation of your own periodic waveform.
  • AudioEffect: A simple interface for writing your own audio effects.
  • Comes with low pass, high pass, band pass, and notch filters. Additionally, you can extend the IIRFilter class for easy implementation of your own IIR filters.
  • Easy to attach signals and effects to AudioInputs and AudioOutputs. All the mixing and processing is taken care of for you.
  • Provides an FFT class for doing spectrum analysis.
  • Provides a BeatDetect class for doing beat detection.

My thanks to Damien Di Fede for contributing what looks like a very useful addition to the Processing arsenal.

Peter Kirn

Powerful Visuals for Newbies: Your First Shader Tutorial at C74

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.

Peter Kirn

Powerful Visuals for Newbies: Your First Shader Tutorial at C74

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 |
No comment

Add to del.icio.us

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

Processing.org Updates

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

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

Processing.org Updates

The Minim sound library by Damien de Fede added to the contributed libraries.

The Minim sound library by Damien de Fede added to the contributed libraries.

Douglas Edric Stanley

!shadows

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.

Douglas Edric Stanley

!shadows

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.

Daniel

Right Click Swarm

My 2002 (my goodness, that’s 5 years ago!) piece Swarm is part of Right click - Open source new art media exhibition at the Kapok gallery in Hong Kong. Swarm uses an implementation of Craig Reynolds’ flocking algorithm and the Processing source is available in my nature of code tutorials. The show also includes Josh Minor’s wonderfully addictive Video Pong.

I miss Hong Kong!

processing particleblobs

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

particleblobs.jpg

libraries:
blobdetection
traer physics

source:
particleblobs_pde.txt

Michael

processing particleblobs

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

particleblobs.jpg

libraries:
blobdetection
traer physics

source:
particleblobs_pde.txt