TurbulentGradients-ClosedLoop (Composition by cybero)

Author: cybero
License: (unknown)
Date: 2010.08.02
Compatibility: 10.6
Required plugins:

This is another porting of OpenCL kernels derived from the seminal noise_kernel.cl file provided by Apple as one of its Developer examples.

Instead of nesting these kernels together, as can be done in the same OpenCL kernel patch, they have been deliberately separated .

Each gradient kernel provides a very responsive, configurable graphical animation well suited to reacting to audio input.

In this current setup, the four kernels are rendered in turn via a demultiplexer.

This post is a companion to the visualizer version but is not set as an iTunes visualizer, being intended as an audio reactive loop, the inputs of which kernel can be further altered 'live'. In this construct, it is being fed audio via an Audio Input patch.

There are a lot of possibilities with this type of gradient & I'm looking forward to creating some different texture / image creation & filtering kernels in the future.

For now, do enjoy & employ these as you see fit.

I'll be interested to see how they do get used.

I shall also be looking forward to creating something very similar in Core Image.

At the present, my Core Image equivalents are only working in grayscale, which puts them about as far advanced as I was month ago with making image transformations using OpenCL. [Soon though :-)]

BTW - a big shout out and thanks to Pascal @ t-linked.com for his beautiful roll out of the gradient_noise kernel.

Provided me with much inspiration and reason to study closely.

Hopefully, these kernels will help to do the same for Kineme forum users.

Thanks to all of you whose postings have inspired and advised [ almost too many to mention ].

TurbulentGradients.qtz184.72 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

toneburst's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)


nice work. In terms of a Core Image equivalent, smokris has already created one. http://kineme.net/Applications/Compositions/PerlinNoiseCIKernel

Perlin and Gradient noise are synonymous, as far as I know, both being based on taking samples from a random texture at grid points around the current pixel (or from an array of random values), and creating gradients between them.


toneburst's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)

If you scroll down to the last reply on the thread above, you'll find a 2D Voronoi/Cell Noise CIFilter implementation, which might also be of interest.


cybero's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)

Ah, if only my service provider used properly manageable demultiplexers rather than dumb multiplexer boxes [they call them slave demultiplexer boxes - but even a slave could talk back if enquired of :-) ], then I might well have managed to say thanks for your input much, much earlier in the day.

As it is I've been stuck over the past couple of weeks with a deteriorating state of connection and will be until the dumb multiplex box I connect to the Internet via is upgraded to have non corrosive connections.

The 2D Voronoi CI Filter is very interesting, are TexSize x and TexSize y meant to be inoperative?

I'd like to be recreating the OpenCL kernels I've posted as CoreImage kernels if it is possible.

I thought it would be possible to create CoreImage generators for that or have one that takes an image input, but the write up on the Perlin Noise kernel by smokris suggests otherwise when one is floating arrays [unsupported in CoreImage].

Thanks for the feedback - now I just want to get my OpenCL wavelet and displacement kernels working in QC - wavelet might help to give a much better result when rendering to depth.

Hooking CI to OpenCL and visa versa is something that works pretty neatly too.

BTW - note the post time, this reply was originally written up by 10:30 [after attending upon an engineer's visit] and then my connection went offline

gtoledo3's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)

Ooh, plasma... it will be interesting to look at.

There is an OpenCL heightfield kernel available in the extrusion thing already, but I may have misread your meaning on that detail in your post.

Actually, out of all of the stuff in the OpenCL dl's that would be really cool in QC would be to get that grass example stuff working. I never looked too closely to see how it worked. I know with GLSL, we can't really do this, since we can't program geometry shaders in QC.

cybero's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)

Shed loads of inputs to deal with on the grass / terrain example. Works well at the command line, or XCode, still to make that one work in QC, but it would be really cool.

cybero's picture
Re: TurbulentGradients-ClosedLoop (Composition by cybero)

That Vorono / Cell Noise Filter is really sweet. I've been displacing that a little recently through an rgba_8888 based kernel.

BTW, I am finding that your Aspect based version of the rgba_8888 is very stable, but another variant you've previously posted, a Radial rgba_8888 is not so stable when fed full screen dynamic imagery. Perfectly good with static images though.

In regards of the Voronoi example, different noise images really make a lot of difference, just like swapping the entries on an OpenCL kernel for a noise __constant.