blog.omine.net

Posts tagged with “opengl”


GLSL Blob 2

February 22nd, 2009

Lightning the scene with the vertex shader.
Made with OpenFrameworks.
Music: “Trash Scapes” by Ellen Allien.

GLSL Blob

February 21st, 2009

My first GLSL -based animation. The blob is made of 3 glutWireSpheres deformed by applying a vertex shader. Deformation is affected by the music and mouse coordinates. In the code snippet below, fft is a value taken from ofSoundGetSpectrum and mult is the pair of mouse coordinates (x, y).

#version 120
uniform float fft;
uniform vec2 mult;
uniform vec3 col;
varying vec4 v;
void main()
{
    v = vec4(gl_Vertex);
    vec4 v2 = v;
    v.x += cos( v2.z * mult.x ) * fft;
    v.y += sin( v2.x * mult.y ) * fft;
    v.z += cos( v2.y * mult.x ) * fft;
    gl_Position = gl_ModelViewProjectionMatrix * v;
}

Check the high-res images at Flickr .
Made with OpenFrameworks .
Music: “Geek Down” by J Dilla.

OpenFrameworks audio visualization

December 26th, 2008


Passion Pit – Sleepyhead from eduardo omine on Vimeo.

After making some tests with Java OpenGL (JOGL) in Eclipse, I decided I should try OpenFrameworks again to delve deeper into OpenGL. The main problem with JOGL is that it’s a “layer” on top of the original OpenGL API; some things are different and often more complex in JOGL (for example the need to pass ByteBuffers instead of arrays).

This audio visualization is a simple exercise with FBOs, VBOs and shaders. An audio-reactive particle system (512 quads) is rendered to a FBO and applied as texture to a cube. This cube is then rendered to a second FBO, which is applied as texture to a second cube. There is a slight blur effect made with GLSL shaders. The stripes result from the way the cube was UV-mapped, an unexpected effect that turned out interesting.

At a 640×480 pixels resolution, framerate varies from 30 to 60 FPS in my computer, equipped with a GeForce 6200 (I need to upgrade my PC).

Happy 2009 to all! :-)

I Am David Sparkle - Jaded Afghan

October 8th, 2008


I Am David Sparkle – Jaded Afghan from eduardo omine on Vimeo.

After watching Moscow Olympics’ Second Trace video, Errol from KittyWu Records invited me to make a video for Singaporean band I Am David Sparkle.

Jaded Afghan is one of the best tracks on their 2007 album This Is The New and also a song well suited to my beat detection algorithm (based on this gamedev.net article — look for “frequency selected sound energy algorithm #2”).

Inspired by this thread (especially comments from Chris O’Shea and Dave Bollinger), this Processing sketch has two modes: capture and render. In capture mode, there’s audio playback, FFT analysis and beat detection — the resulting data is saved to a text file. In render mode, there’s no audio: all data is retrieved from the text file and PNG still frames are rendered. It took approximately 1h30 to render the 6779 frames for this video, at 800×450 pixels, 24FPS. The movie file with audio was assembled in Adobe Premiere.

It’s highly recommended to download the original 170MB Quicktime file — the link is at the bottom of the page, below “Statistics”. A Vimeo account is required, but it’s free.

Libraries and code snippets used in this project:

 ← Previous