2D and 4D Noise Too!

As promised, I’ve updated the github gist to include 2D and 4D implementations of OpenSimplex Noise. And in doing so, I also went ahead and changed the gradient set for 3D to something that makes a bit more sense, and is part of a more general scheme that’s being used for all numbers of dimensions of the noise.

Here are some sample renders: 2D (leftmost), a 2D slice of 3D (center), and a 2D slice of 4D (rightmost).

image

EDIT: Here’s a comparison between 3D Perlin noise and 3D OpenSimplex noise, to demonstrate the difference in isotropy. Top is Perlin, bottom is OpenSimplex. From left to right, its (a) noise(x,y,0), (b) noise(x,y,0) positives in white and negatives in black, © |noise(x,y,0)|<0.1 in black, and (d) noise(x,y,.5)

image