Hidden in the the treasure trove that is OSL lies a spanking new noise type: Gabor noise. Surprisingly this not yet exposed as a node for artists to explore. This article remedies that situation.
And now for something completely different
Gabor noise is fairly new and has some interesting qualities. Apart from the mathematical properties the most important aspects for the artist are that it is easy to tinker with and offers a change from the ubiquitous Perlin noise.
The shader is almost to simple to show here:
It offers all the options documented in the OSL language specification and produces a single float value. This can of course be adapted easily to take for example 4 dimensions (position and time) as input and produce a 3D noise vector as OSLs
point Pos = P,
int anisotropic = 0,
vector direction = vector(1,0,0),
int do_filter = 1,
float bandwidth = 1.0,
float impulses = 16,
output float Noise = 0
Noise = noise("gabor",Pos,
noise()is very versatile but this is left as an excercise for the reader.
Example node setup
Suzanne was patterned with the following node setup:Blender Artists. Some examples are shown below:
Recently I reread a long running thread on Blender Artists and saw that phoneybone implemented a pure OSL version of Gabor noise that gives a bit more control than the built-in function. Do read on his solution because it is interesting to compare.