Many folks looking for a Perlin-like effect end up using the diamond-square(or "midpoint displacement") algorithm, which has a similar look but a somewhat simpler implementation:
For each segment take the midpoint of the linear interpolation and add noise at a smaller magnitude. Recurse in until you are at the desired scale. In 2D, flip the sample points between a "square" pattern and a "diamond" pattern each time to avoid a boxy tiled look.
The biggest downside of this method is that it's much less flexible about scaling: to get more resolution you have to double each dimension.
No not at all. Think for a bit about what the closed form solution of the final generated function is for any of the examples given. Then think of the differential equation that it satisfies (with N boundary conditions for every segment of the partition). There's no way solving that is easier than what is done in the article. Even before doing that, there are plenty of other methods that still aren't as efficient, which was one of the main goals of the algorithm.
When I was in high school I used Perlin noise to create some 3D terrain. Being young and naive I emailed Ken Perlin and asked him some questions about it. To my surprise he responded and was super nice :-)
This is a really nice write up! The graphs really show how a noise signal is built up of its components. Additionally, while un intentional, it also shows how Perlin noise can exhibit "gridding" artifacts from the regular spacing at integer boundaries. This is especially true when used to create tangents based on the signal.
Yep; as described in the "Improving Noise" article, the gridding is greatly reduced if you use the "smootherstep" function which has a continuous second derivative in addition to first.
I remember implementing simplex noise in verilog a few years ago. It took me a while to get my head around it, but eventually something just clicked, and the results were very impressive too.
18 comments
[ 3.1 ms ] story [ 54.4 ms ] threadThere's tons of other lovely noises too. Interested in more? Check out some SIGGRAPH stuffs from Mr. Perlin.
For each segment take the midpoint of the linear interpolation and add noise at a smaller magnitude. Recurse in until you are at the desired scale. In 2D, flip the sample points between a "square" pattern and a "diamond" pattern each time to avoid a boxy tiled look.
The biggest downside of this method is that it's much less flexible about scaling: to get more resolution you have to double each dimension.
Needs to be ported to webgl some day
There are many shader implementations of continuous noise. Most should be WebGL compatible.
EDIT: https://github.com/ashima/webgl-noise there you go :) Includes classic noise (Perlin I guess?) and Simplex.
http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise....
http://libnoise.sourceforge.net/tutorials/index.html