4 ms·
Perlin noise
- kleer001 10y agoAh, the classic! There's tons of other lovely noises too. Interested in more? Check out some SIGGRAPH stuffs from Mr. Perlin.
- drcode 10y agoHmm... Perlin noise is a lot more complex to generate than I was expecting.
- mrspeaker 10y agoYou don't win an Academy Award for Technical Achievement for Math.random()!
- chipsy 10y agoMany 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.
- amelius 10y agoCan't this be done more easily by solving a differential equation and setting some random boundary conditions?
- banachtarski 10y agoNo 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.
- malanj 10y agoWhen 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 :-)
- Kronopath 10y agoAs a student at NYU working with him on one of his research projects, I can confirm that yes, he's a pretty nice guy.
- VMG 10y agoTime to post his website again http://mrl.nyu.edu/~perlin/ http://mrl.nyu.edu/~perlin/ Needs to be ported to webgl some day
- kaoD 10y ago> 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 https://github.com/ashima/webgl-noise there you go :) Includes classic noise (Perlin I guess?) and Simplex.
- Retr0spectrum 10y agoThere's another cool WebGL simplex demo here: http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html http://alteredqualia.com/three/examples/webgl_terrain_dynami...
- VMG 10y agoI posted it because he has dozens of demos like the noise generation, all written in Java unfortunately.
- david-given 10y agoSee also Simplex Noise, Perlin's 2001 replacement --- it extends to an arbitrary number of dimensions, and it's cheaper: http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise....
- colinthompson 10y agoThis 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.
- Sharlin 10y agoYep; 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.
- Rexxar 10y agoFun fact: there is a C reference implementation of Perlin noise directly in the svg specification : https://www.w3.org/TR/SVG/filters.html#feTurbulenceElement https://www.w3.org/TR/SVG/filters.html#feTurbulenceElement
- jordigh 10y agoI found the following libnoise (C++ Perlin noise lib) tutorial very helpful: http://libnoise.sourceforge.net/tutorials/index.html http://libnoise.sourceforge.net/tutorials/index.html
- fordred 10y agoI 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.