4D simplex noise

I finally managed to get a 4D version of Perlin’s simplex noise working in GLSL. The simplex ordering was the trickiest part, but the result clearly shines in performance compared to classic 4D noise, which I also implemented for comparison.

Simplex noise is about twice as fast in 4D!

Zip archive with Win32 executable demo and full source

Note that you can test all six flavors of noise (2D, 3D, 4D, classic and simplex) by commenting out and uncommenting lines in main() at the end of the fragment shader file and simply restarting the program.

This is the last update from me for a while, the analytic derivative computation will have to wait. If anyone else feels up to that task, please do it and share the result with the rest of us.

What’s “simplex noise”? Is it the same thing as PErlin’s “Improved noise”? Anyway, thanks for the code!

nice work stefan, i might use this

Hi,

The 4D version works great with 641 fps at default resolution on my X800XT PE.

Cheers!

“Simplex noise” is more than the small fixes that
was named “improved noise”, it’s a new creation
from Ken Perlin, described (in a somewhat
confusing context) by himself here:

http://www.csee.umbc.edu/~olano/s2002c36/ch02.pdf

and by me, with graphs and figures and some
more comprehensible code, here:

http://www.itn.liu.se/~stegu/TNM022-2004/simplexnoise.pdf

It’s better, faster, nicer looking and suitable
for very inexpensive hardware implementation,
but it’s quite similar in appearance and has the
same use as classic Perlin noise.

Thanks, your pdf was really clear and well written, that explained simplex noise well.

Thanks for the write up!

Another example of simplex noise is by Geoff Wyvill and Kevin Novins from 1999 Siggraph Sketches and Applications:
www.cs.auckland.ac.nz/~novins/Publications/Wyvill99.html.

The following based on Perlin’s course notes helped me at least figure out the “hairy” factors. Given n = dimension of noise:
f = sqrt(n + 1);
skew = (f - 1) / n
deskew = (f - 1) / (nf)

Yep, that’s the “hairy factors” all right.
I also found Perlin’s course notes to help
me out there. I do not pride myself of being
all that knowledgeable in N-D geometry when
N gets larger than 3…

Does anyone know exactly why this is so slow (0.1 FPS) on Radeon 9800 level hardware?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.