Shaders in Processing 2.0 – Part 1   3 comments

The new OpenGL renderers in Processing 2.0 (P2D/P3D) rely extensively on GLSL shaders. Although in most common situations the use of shaders is invisible to the user, Processing includes a new PShader class that allows to apply custom shaders to the drawing of the sketch. This post describes the shader architecture in Processing 2.0, and the common interfaces that custom GLSL shader code needs to include in order to be accepted by the OpenGL renderers in Processing.
Update: With the release of Processing 2.0 final, some of the contents in this post are outdated, please check this tutorial for a detailed description of the finalized shader API.

Read the rest of this entry »

Posted August 2, 2012 by ac in Programming

Tagged with , , , , ,

OpenGL in Processing 2.0 alpha 5   14 comments

The march towards the 2.0 version of Processing reached an important milestone with the alpha 5 release, available for download since last Friday. The detailed list of changes is here, while the wiki offers a more in-depth discussion of the new features and ongoing changes. A major update in alpha 5 is the inclusion of the new OpenGL renderer for the desktop and Android modes, called P3D, which has been rewritten from the ground up in order to offer improved performance. I will describe some important elements of P3D in this post.
Update: With the release of Processing 2.0 final, some of the contents in this post are outdated, please check the new reference, and tutorials – specially those about P3D, PShape and shaders – for a detailed description of the finalized API.

Read the rest of this entry »

Posted March 26, 2012 by ac in Programming

Tagged with , , , , ,

A couple of GSVideo tips   18 comments

GSVideo is a Processing library I have been working on for almost four years now (!). It improves video support in Processing by using GStreamer as the underlying multimedia toolkit. The latest release is 1.0.0 and it should be used exclusively with Processing 1.x (the alpha releases of Processing 2.0 already include a simplified version of GSVideo as the built-in video library). Two problems users typically face with GSVideo and about which I receive emails from time to time, are (1) using GSVideo in Eclipse, and (2) exporting GSVideo applications from the Processing environment. So I put together in this post a couple of tips that might be useful in these situations.

Read the rest of this entry »

Posted February 23, 2012 by ac in Programming

Tagged with , , ,

Syphon Client working in Processing   16 comments

Syphon is an OSX framework to share frames between applications. The authors of Syphon, Tom Butterworth and Anton Marini, made it very easy to create Syphon plugins for other languages, frameworks, VJ’ing and mapping tools, etc. So a while ago I wrote a simple Processing library that allowed to send frames out. This was quite useful, but still missing half of the Syphon functionality. With some additional coding, we were able to add the client part, and I just put the new version (0.4) of the Syphon-Processing library up for download (it requires Processing 2.0a4 or newer).

Read the rest of this entry »

Posted February 21, 2012 by ac in Programming

Tagged with , , , , ,

OpenCV 2 in Processing   41 comments

Xavier Hinault recently released a new computer vision library for Processing, based on JavaCV and OpenCV 2: JavacvPro. This is a great contribution to the community, since it appears that the development of the original OpenCV library for Processing has stalled, without moving beyond OpenCV 1.0 support. JavacvPro is based on the very solid JavaCV wrappers by  Samuel Audet, which provide access to the latest version of OpenCV (2.3.1 at the time of writing this), and in fact also allows to use other computer vision frameworks like OpenKinect, and ARToolKit. I did some testing of JavacvPro (version 0.3) on Windows, Mac and Linux, and the results are very promising as I was able to use the library on the three platforms. Xavier has also included many examples in the library package that show how to use it various features.

Read the rest of this entry »

Posted November 21, 2011 by ac in Programming

Tagged with , , , ,

Moving towards Processing 2.0   5 comments

A few weeks ago, the Processing project started the transition to the 2.0 branch with the release of the first alpha package. Today, the second alpha is out (2.0a2), and available from the downloads section in the Google code page of the project, for the Linux, Mac and Windows platforms. The most important changes for this alpha release consist in several improvements in the new video library, and better support for 64 bits within the Processing environment and in exported applications. Follow this link for more detailed release notes, and keep reading below for some additional information about the video library included in Processing 2.0.

Read the rest of this entry »

Posted November 1, 2011 by ac in Programming, Software

Tagged with , , , , , , , , ,

Android course at Konkuk University   4 comments

Not much time to write on the blog these days, so things are piling up quickly. This post in particular is about a project from two months ago :-), when I participated in a Summer course at the Communication Design program at Konkuk University, Seoul. The class was lectured by Jihyun Kim and focused in making interactive applications with Android devices. I helped the students to use the Open Sound Control (OSC) protocol and sensors in Processing.Android. For most of them, this was their first experience developing on a smartphone, and the outcome was very engaging and fun.

Update: The sample sketches I used during the class to explain how to send/receive data with Android devices can be grabbed from here and here.

Read the rest of this entry »

Posted September 19, 2011 by ac in Art projects, Programming, Teaching

Tagged with , , , , , , ,