|
Perlin Noise CIKernel (Composition by smokris)
Here's a CIKernel implementation of the Improved Perlin Noise algorithm, based on the reference implementation http://mrl.nyu.edu/~perlin/noise/ . Drop "Perlin Noise CIKernel.qtz" into "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. |
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,
a|x
3D cell noise on the GPU.
a|x