16
Nov
09

OpenCL Sort-Of Rutt-Etra

OK, this one needs some explanation. I know it looks almost exactly like vade’s Rutt-Etra plugin, but this one takes a slightly different approach. It’s essentially a slightly reworked version of the Apple OpenCL Text Extrusion example QTZ. I thought I’d try messing around with putting the resulting mesh inside a Kineme Polygon Mode patch (from GL Tools). I initially tried setting it to render only the raw vertices as points. You can see what that looked like in the video in the previous post.

Then, I thought I’d try rendering the mesh in Wireframe mode. Initially, there was a problem with long lines connecting the end of each row to the beginning of the next. I fixed this by stealing vade’s trick of reversing the direction of the vertices of each line. I then had to compensate for this by reversing every other line of the original input image. I actually did this with a CIFilter (thanks to cwright for showing me the error of my ways with the GLSL mod() function), though I’m sure it could be done also in the OpenCL kernel.

This later version has Point and Line modes, colour and monochrome, and some other bits and options.

About these ads

5 Responses to “OpenCL Sort-Of Rutt-Etra”


  1. 1 Rob
    November 17, 2009 at 6:28 pm

    Nice! I always wanted to figure out a way to do this…

    I kinda had it down in my head, just never actually got around to doing it.

    So my thought was that you could take greyscale image, and then plot a bunch of lines with the height set by the level of the grey pixel…

    Also – I saw a very similar effect used by green day recently (IT WAS A FREE TICKET, OK?!).

    Any chance I could take a peek at your code?

  2. 2 Rob
    November 17, 2009 at 6:30 pm

    Having said that, I see you’re using some extrusion instead… perhaps there’s still a hope for my great idea yet?

  3. 3 toneburst
    November 17, 2009 at 10:52 pm

    Hi Rob,

    that’s exactly what it does- turns each pixel into a vertex, with the Z-axis value set from the approximate luminosity of the pixel. You can do the same thing with a GLSL shader, but I thought I’d try using OpenCL this time. It’s really fast, but the downside is it’s a little on the unstable side. I’ve also added a GLSL shader to add perlin noise to the vertex positions.

    Sorry about the gig ;)
    I imagine they put on a good show, whatever you think about their music. Big-money record deals have their advantages (apart from the groupies etc.)…

    This is the first time I saw the ‘Rutt-Etra effect’

    Re. the code, there’s a version of the QTZ on the Kineme forum. I’ll warn you though, it doesn’t seem to run even on some supposedly OpenCL-capable machines. It’s probably partly dodgy coding on my part, to be honest, though QC does have some severe problems with OpenCL currently, especially in MacOS 10.6.2.

    a|x

  4. 4 Rob
    December 9, 2009 at 4:55 pm

    I know I’ve never built an operating system, but the implementation of some of these new “under-the-hood” improvements seems slapdash at best…

    I get the feeling that by the time I’m able to fully utilise my Unibody MBP’s GPU processing power (Grand Central?) my machine will be old hat !

    TVotR are one of my faves! I seem to forget them for 6-month stints then come back. Very good stuff.

    Now to make some videos! :D


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Twitter

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

November 2009
M T W T F S S
« Oct   Feb »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Links

Blog Stats

  • 406,422 hits

Follow

Get every new post delivered to your Inbox.

Join 37 other followers

%d bloggers like this: