5 ms·
Perlin Noise
- daeken 16y agoI love Perlin noise. There's seriously no better way to generate a lot of classes of textures. E.g. I used it in a pixel shader to get wood grain textures for a maze game I built: http://sites.google.com/site/codybrocious/proto.jpg http://sites.google.com/site/codybrocious/proto.jpg
- njl 16y agoI wrote a rough-and-ready jQuery plugin that sticks Perlin noise in the background of an element. This is a great writeup, I wish I had it when I was figuring everything out. http://www.njl.us/projects/jquery-perlin/ http://www.njl.us/projects/jquery-perlin/
- mmcconnell1618 16y agoIf you like this topic check out "Texturing and Modeling: a Procedural Approach" which covers Perlin noise and other similar algorithms. The books shows you how Pixar generates life like surfaces and effects in Renderman. http://www.amazon.com/Texturing-Modeling-Third-Procedural-Approach/dp/1558608486/ref=sr_1_1?ie=UTF8&qid=1302382638&sr=8-1 http://www.amazon.com/Texturing-Modeling-Third-Procedural-Ap...
- wzdd 16y agoDiscussion on Minecraft's use of Perlin noise: http://news.ycombinator.com/item?id=1733157 http://news.ycombinator.com/item?id=1733157
- dminor 16y agoSome more details from Notch here: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1 http://notch.tumblr.com/post/3746989361/terrain-generation-p...
- araes 16y agoA reasonable FOSS library in C++ for those attempting to quickly play with coherent noise (Perlin, cellular) is http://libnoise.sourceforge.net/ http://libnoise.sourceforge.net/ Used it in a couple of projects and been happy with the ease of use. Also has some good doc pages to supplement those in the linked article.
- BoppreH 16y agoQuestion: for the random number generator, instead of changing the internal prime numbers, can't you use a seeded generator (e.g.: mersenne twister), using the "i" value (the function number) as a seed?
- VMG 16y agoCheck out his other work too: http://mrl.nyu.edu/~perlin/ http://mrl.nyu.edu/~perlin/ (submitted this to hn a while ago)
- frou_dh 16y agoI remember consulting this page when making what must be the canonical "my first Perlin", a terrain heightmap generator! http://i.imgur.com/fTiWC.png http://i.imgur.com/fTiWC.png
- brennandunn 16y agoHugo's stuff is great. A lot of the content is derived from the work he and Matt Fairclough did on Terragen, which was (and presumably still is) a fantastic piece of software (http://planetside.co.uk/ http://planetside.co.uk/)
- die_sekte 16y agoDon't use Perlin noise, use Simplex noise. Less artifacts, faster, just slightly harder to understand.
- silentOpen 16y agoCheck out https://github.com/ashima/webgl-noise https://github.com/ashima/webgl-noise for a broadly compatible, very fast implementation of both Perlin and Simplex noise. It works with WebGL and requires no textures or arrays! The software was originally developed for my WebGL OCaml game engine demo, Ooman: http://ashimagames.com/ http://ashimagames.com/
- euccastro 16y agoPerlin noise has a fundamental problem that I believe Simplex noise accentuates: (Begin quote) When rendering, it is common to texture 2D surfaces by sampling a 3D noise function, but the resulting 2D texture will in general not be band-limited, even if the 3D function is perfectly band-limited. This means that the loss-of-detail vs. aliasing tradeoff cannot be solved simply by constructing a band-limited 3D function. To our knowledge this problem has never even been identified, much less addressed. (End quote) I think this is responsible for the questionable look of the screenshots of 3D and 4D simplex noise at the end of this pdf (sorry, couldn't find a html version): www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf Another practical problem: (Begin quote) A Perlin band near the Nyquist limit contains both frequencies that are low enough to be representable (i.e., they contain detail that should be in the image) and frequencies that are high enough to be unrepresentable (i.e, they can cause aliasing). Excluding the band causes loss-of-detail artifacts, but including it causes aliasing artifacts. Balancing this tradeoff between loss of detail and aliasing has been a constant source of frustration for shader writers at Pixar and elsewhere. Because aliasing is usually more unacceptable than loss of detail in feature film production, bands are attenuated aggressively. An unfortunate consequence of this is that as you zoom into a scene the texture detail becomes visible later than the geometry detail, so the texture doesn’t appear to be tied to its geometry. Instead, the texture appears to fade in unnaturally as if there were a haze that obscured only some aspects of the surface appearance and only when it was farther away. (End quote) Enter wavelet noise. It's heavier in the theoretical side, but the paper that presents it claims it's efficient and solves the above problems. http://graphics.pixar.com/library/WaveletNoise/paper.pdf http://graphics.pixar.com/library/WaveletNoise/paper.pdf
- Rexxar 16y agoSurprisingly, there is a complete C implementation of perlin noise in the w3c SVG specification : http://www.w3.org/TR/SVG/filters.html#feTurbulenceElement http://www.w3.org/TR/SVG/filters.html#feTurbulenceElement
- deleted 16y ago[deleted]
- rogerallen 16y agoThere is a nice talk by Perlin here at http://www.noisemachine.com/talk1/ http://www.noisemachine.com/talk1/, too.
- andrewcooke 16y agothe linked article is wrong. that, or http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.... (from euccastro's comment below) is. but the latter looks more authoritative to me and checks against http://en.wikipedia.org/wiki/Perlin_noise http://en.wikipedia.org/wiki/Perlin_noise. perlin noise is gradient noise (so the gradient is chosen at random, not the height.