Perlin Noise CIKernel (Composition by smokris)

Author: smokris
License: MIT
Date: 2009.02.26
Compatibility: 10.5, 10.6
Required plugins:

Here's a CIKernel implementation of the Improved Perlin Noise algorithm, based on the reference implementation .

Drop "Perlin Noise CIKernel.qtz" into ~/Library/Graphics/Quartz Composer Patches, and it'll appear in the Patch Creator.

"perlin.qtz" is an example of how to use it.

This is fairly inefficient, as Core Image Kernel Language doesn't support arrays (!), so I ended up dumping the Perlin permutation array into an image (see "perlin-tga.c") and then loading the image into QC and sampling it. Suggestions regarding how to improve performance are welcomed.

Perlin Noise CIKernel.qtz7.68 KB
perlin-tga.c1.68 KB
perlin.qtz2.39 KB

toneburst's picture
Re: Perlin Noise CIKernel

I tried doing something like this a while back, but based on Perlin's Simplex Noise code. For some reason, it never worked properly, and I'd love to know why. I have a suspicion it's something to do with filtering of the 2D lookup table (which can't be disabled, annoyingly), but I was never able to determine that for sure.

I wonder if it's worth making a simple QCPlugin just to generate simple single-octave Perlin Noise like this, maybe using a GLSL shader (though some kind of LUT would probably still be required, since GLSL doesn't have support for constant arrays).

Good work,


toneburst's picture
Cell Noise

3D cell noise on the GPU.


Voronoi Basic CIFilter.qtz94.57 KB