This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||
|
Regarding: Define an n-dimensional grid. At each point on the grid (node) assign a random gradient vector of unit length in n dimensions. For a one-dimensional grid each node will be assigned either +1 or -1.
See: ( http://mrl.nyu.edu/~perlin/doc/oscar.html#noise), specifically:
for (i = 0 ; i < B ; i++) { p[i] = i; g1[i] = (float)((random() % (B + B)) - B) / B; for (j = 0 ; j < 2 ; j++) g2[i][j] = (float)((random() % (B + B)) - B) / B; normalize2(g2[i]); for (j = 0 ; j < 3 ; j++) g3[i][j] = (float)((random() % (B + B)) - B) / B; normalize3(g3[i]); }
In the 2D and 3D cases, the gradients are normalized. In the 1D case, it's simply bounded between -1 and 1.
Beyond not being in the original source, the noise simply doesn't look like noise with normalized 1D gradients. It's very (and unsurprisingly) regular. — Preceding unsigned comment added by 173.174.71.239 ( talk) 17:17, 31 July 2016 (UTC)
These mistakes were found in this Wikipedia article:
1) Hugo Elias' article ( http://www.arendpeter.com/Perlin_Noise.html) is on VALUE NOISE, not GRADIENT NOISE (Perlin Noise is gradient noise, not value noise.)
2) Perlin Noise is not white noise. A single "layer" of Perlin noise (or value noise, or any type of noise, there are many)has only one frequency, not all of them. You much blend together many "layers" of Perlin noise to collaborate various frequencies together in one noise (known as spectral synthesis).
3) Perlin Noise is not multiple layers of noise blending together. This is a common misconception. (Even the picture of Perlin noise in this article clearly is created out of only one layer of noise.) This is a mistake commonly expressed on most websites that deal with Perlin noise, even Hugo's article (the #1 result in Google for perlin noise: http://www.google.com/search?q=perlin+noise), but anyone who has examined Ken Perlin's work, especially his original source and numerous examples, you will see no sign of spectral synthesis (adding of multiple frequency layers together). Spectral synthesis is a useful way to use Perlin noise, it is not a defining characteristic of it.
I fixed these mistakes, but perhaps did not make them clear enough.
I am going to write an article on this soon. When I do, I will update this Wikipedia page and link to my article. 24.222.121.193 15:29, 19 July 2006 (UTC)
Furthermore, in the second citation I offered, Ken Perlin himself says "Hugo Elias has a nice web page about it" at ( http://freespace.virgin.net/hugo.elias/models/m_perlin.htm), the same web page that is claimed NOT to be about Perlin Noise in point 1 above. 198.53.229.242 09:03, 12 January 2007 (UTC)
another inaccuracy: The Article states perlin noise was first used in the movie Tron, but Ken Perlin's slideshow linked to from this article states that he first "started thinking" about noise while working on Tron as a way to get away from its machinelike look. —The preceding unsigned comment was added by 24.41.50.36 ( talk • contribs) 17:19, 3 December 2006 (UTC).
I'd like to point out that there are two (or three) definitions of perlin noise, which slighty differ from each other (although boths author is Ken Perlin himself): Firstly there is his paper An Image Synthesizer [1] which states on page 289: map each ordered sequence of three integers into an uncorrelated ordered sequence of four real numbers: [a,b,c,d] = H([x,y,z]), where [a,b,c,d] define a linear equation with gradient [a,b,c] and value d at [x,y,z] and if [x,y,z] is on the integer lattice, we define Noise([x,y,z]) = d_[x,y,z]. This paper does NOT specifically mention that the value d has to be 0 if [x,y,z] is on the integer lattice. This effectively makes it both a gradient AND a value noise function. Secondly there is the book Texturing and Modeling [2] which on page 76 uses the smoothstep function 3*x^2-2x^3 which is the result from above statements with the assumption that the value d IS 0 on integer lattice points. This is pure gradient perlin noise! Thirdly there is the paper Improving Noise [3] which replaces the above smoothstep function with a new function 6t^5-15t^4+10t^3, which again is the result under the condition that the value d IS 0 on integer lattice points. pure gradient perlin noise again! This explains the confusion in my opinion, the original paper is not specifically gradient noise, although its still a valid explanation. In my opinion the article should reflect the different papers, because there is quite a difference for the implementation of the function, for example the gradient vectors in Improved Noise are NOT unitlength, other than stated in this wiki article under algorithm. 2A02:908:5A0:7CA0:7D0F:30BE:939B:8D70 ( talk) 17:30, 1 December 2015 (UTC)
References
This article needs a clear description of the algorithm, preferably compatible with the 2002 version. Also, why is this categorized as a physics article? Seems a lot more like computer science to me. Shinobu 19:03, 10 March 2007 (UTC)
There are parts of the algorithm explanation that I don't understand. Just a list of questions I have:
In the second paragraph under "Grid definition" it says "Acquired gradient are then renormalized." What does it mean to renormalize something? In the next paragraph: "...some implementations use a hash and lookup table..." I think it refers to the data lookup function, but I'm not sure which article should be linked to.
Under Dot product: First paragraph "For each grid node/coordinate a distance vector between the particular point and the node coordinate is determined...." What's a distance vector? It doesn't have its own article. Also, the definition of Dot Product according to its own article seems to require only one input and two distinct sequences of numbers, and I don't understand either article.
That's as far as I've gotten. I hope this will help improve the readability. 72.95.45.209 ( talk) 01:05, 24 February 2015 (UTC)
From the article: ""Minecraft uses Perlin noise as part of its procedural landscape generation.[2]""
This may be true, but what is the point? Perlin noise is used everywhere not just in minecraft. Should this be removed? -- (fededevi) 193.205.206.25 ( talk) 15:11, 30 May 2011 (UTC)
Added some reference to another game. I think it can give an idea of what the uses of a noise generator can be. -- 87.8.5.219 ( talk) 12:53, 22 July 2011 (UTC)
I also think this makes no sense. When adding Minetest, you should also add Manic Digger and FreeMiner.Net. If moving away from MC, then you'd also have to add any other game that uses Noise. I think that this should be removed altogether. 188.195.209.75 ( talk) 14:41, 17 August 2011 (UTC)
The complete sentence:
"For example"? How does procedural landscape generation relate to *texture* generation and real-time *graphics* in computer games? As much as I love Minecraft, I don't think it's entirely relevant in this context. Now, okay, it *does* use the algorithm, but it is by no means unique in that. Also, using Perlin noise to generate terrain data is not only about games; take for example Terragen. Ddegirmenci ( talk) 22:30, 21 October 2011 (UTC)
I split the Minecraft/Minetest reference into a separate paragraph. Terrain generation is a use for Perlin noise, and so seems correct to list in the "Uses" section. I'll leave deciding which games should be referenced to more experienced editors. -- 81.159.167.165 ( talk) 00:20, 21 December 2011 (UTC)
Trying to implement Perlin Noise according to the pseudo given, I got stuck with rather unpleasing results. Further investigation revealed rather sharp looking edges in generated images are the result of linear interpolation. Ideally at least the second derivative of the interpolation function should be zero to get pleasing results.
I didn't get my hands on the original paper, so I couldn't verify, but at least [1] suggests using the function for interpolation. Using this function I finally managed to get pleasing results.
Thus I would like to suggest editing the pseudocode given to contain the following changes.
Add a function fade()
evaluating the given interpolation function.
function fade(float t) { return t * t * t * (t * (t * 6 - 15) + 10); }
Modify the function lerp()
to take our interpolation function into account.
function lerp(float a0, float a1, float w) { return fade(1.0 - w)*a0 + fade(w)*a1; }
In case you are unsure weather the suggested edit is justified, Python Code to reproduce a) the unpleasing result of the original algorithm and b) the modified version could be given to verify the difference of results.
Just drop me a line if you are in need of it. -- Mikyra ( talk) 08:56, 23 July 2017 (UTC)
Stumbled over the same problem. The section above also states that interpolation should be done with a smooth function (zero derivative at the boundaries), not linearly. O.mangold ( talk) 10:26, 3 December 2018 (UTC)
There isn't much point in having the code if you are going to leave the extern in there. It is just like skipping an entire section of code. — Preceding unsigned comment added by Bofum ( talk • contribs) 00:56, 23 May 2018 (UTC)
Ken Perlin said himself that he used a Monte Carlo simulation in order to generate the random gradient in the hyper-sphere. I think Ken Perlin was wrong. What he used is not a Monte Carlo simulation. Can it be corrected in the article? — Preceding unsigned comment added by 176.180.104.164 ( talk) 16:24, 23 August 2018 (UTC)
It might be nice to highlight some additional examples also included in the Perlin Noise presentation given by Ken Perlin ( http://web.archive.org/web/20071008162042/http://www.noisemachine.com/talk1/index.html) to help show the significance and impact of the algorithm in computer graphics.
Multiple patterns generated and compared: http://web.archive.org/web/20071008170106im_/http://www.noisemachine.com/talk1/imgs/elements.jpg
Fire animation: http://web.archive.org/web/20071008170528im_/http://www.noisemachine.com/talk1/imgs/flame500.gif
Cloud animation: http://web.archive.org/web/20071008170627im_/http://www.noisemachine.com/talk1/imgs/clouds500.gif — Preceding unsigned comment added by 192.55.54.42 ( talk) 23:54, 4 December 2018 (UTC)
First: In perlin (x, y) supposedly admits the coordinates in pixels, so it does not make sense to round an integer when it is already an integer. If you want to calculate between your intermediate values you need two more values that indicate the scale used.
Second: Inside the dotGridGradient, the Gradient value is multiplied proportional to the distance. So if the distance in both axes is zero the result will always be zero.
Third: In dotGridGradient and lerp the Gradient formula is applied 2 times. — Preceding unsigned comment added by Rmbeer ( talk • contribs) 22:40, 21 January 2019 (UTC)
In Algorithm detail >> Grid definition, there's this sentence:
Define an n-dimensional grid where each point has a random n-dimensional unit-length gradient vector, except in the one dimensional case where the gradients are random scalars between -1 and 1.
The second part seems redundant to me, since in 1D, there are two unit vectors (-1, +1) [1], so this is no special case. Is it some jargon or should it be shortened? — Preceding unsigned comment added by Martin Brajer ( talk • contribs) 18:21, 17 October 2020 (UTC)
Answer: I think that extra part is not redundant because random scalars between -1 and 1 include scalars such as 0.751 but the two unit vectors (-1) and (+1) do not include 0.751 — Preceding unsigned comment added by 82.30.5.207 ( talk) 18:23, 27 October 2020 (UTC)
References
What is the time complexity of Perlin noise? This page and Simplex noise seem to contradict each other, with the simplex page saying and this page saying . ProletariatetsBefrielseOrkester ( talk) 16:28, 10 February 2021 (UTC)
Was it 1996 Academy_Award_for_Technical_Achievement or 1997 as stated on Ken Perlin's own page? www.cinemasight.com also suggests the correct year is 1996.
This article is rated C-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||
|
Regarding: Define an n-dimensional grid. At each point on the grid (node) assign a random gradient vector of unit length in n dimensions. For a one-dimensional grid each node will be assigned either +1 or -1.
See: ( http://mrl.nyu.edu/~perlin/doc/oscar.html#noise), specifically:
for (i = 0 ; i < B ; i++) { p[i] = i; g1[i] = (float)((random() % (B + B)) - B) / B; for (j = 0 ; j < 2 ; j++) g2[i][j] = (float)((random() % (B + B)) - B) / B; normalize2(g2[i]); for (j = 0 ; j < 3 ; j++) g3[i][j] = (float)((random() % (B + B)) - B) / B; normalize3(g3[i]); }
In the 2D and 3D cases, the gradients are normalized. In the 1D case, it's simply bounded between -1 and 1.
Beyond not being in the original source, the noise simply doesn't look like noise with normalized 1D gradients. It's very (and unsurprisingly) regular. — Preceding unsigned comment added by 173.174.71.239 ( talk) 17:17, 31 July 2016 (UTC)
These mistakes were found in this Wikipedia article:
1) Hugo Elias' article ( http://www.arendpeter.com/Perlin_Noise.html) is on VALUE NOISE, not GRADIENT NOISE (Perlin Noise is gradient noise, not value noise.)
2) Perlin Noise is not white noise. A single "layer" of Perlin noise (or value noise, or any type of noise, there are many)has only one frequency, not all of them. You much blend together many "layers" of Perlin noise to collaborate various frequencies together in one noise (known as spectral synthesis).
3) Perlin Noise is not multiple layers of noise blending together. This is a common misconception. (Even the picture of Perlin noise in this article clearly is created out of only one layer of noise.) This is a mistake commonly expressed on most websites that deal with Perlin noise, even Hugo's article (the #1 result in Google for perlin noise: http://www.google.com/search?q=perlin+noise), but anyone who has examined Ken Perlin's work, especially his original source and numerous examples, you will see no sign of spectral synthesis (adding of multiple frequency layers together). Spectral synthesis is a useful way to use Perlin noise, it is not a defining characteristic of it.
I fixed these mistakes, but perhaps did not make them clear enough.
I am going to write an article on this soon. When I do, I will update this Wikipedia page and link to my article. 24.222.121.193 15:29, 19 July 2006 (UTC)
Furthermore, in the second citation I offered, Ken Perlin himself says "Hugo Elias has a nice web page about it" at ( http://freespace.virgin.net/hugo.elias/models/m_perlin.htm), the same web page that is claimed NOT to be about Perlin Noise in point 1 above. 198.53.229.242 09:03, 12 January 2007 (UTC)
another inaccuracy: The Article states perlin noise was first used in the movie Tron, but Ken Perlin's slideshow linked to from this article states that he first "started thinking" about noise while working on Tron as a way to get away from its machinelike look. —The preceding unsigned comment was added by 24.41.50.36 ( talk • contribs) 17:19, 3 December 2006 (UTC).
I'd like to point out that there are two (or three) definitions of perlin noise, which slighty differ from each other (although boths author is Ken Perlin himself): Firstly there is his paper An Image Synthesizer [1] which states on page 289: map each ordered sequence of three integers into an uncorrelated ordered sequence of four real numbers: [a,b,c,d] = H([x,y,z]), where [a,b,c,d] define a linear equation with gradient [a,b,c] and value d at [x,y,z] and if [x,y,z] is on the integer lattice, we define Noise([x,y,z]) = d_[x,y,z]. This paper does NOT specifically mention that the value d has to be 0 if [x,y,z] is on the integer lattice. This effectively makes it both a gradient AND a value noise function. Secondly there is the book Texturing and Modeling [2] which on page 76 uses the smoothstep function 3*x^2-2x^3 which is the result from above statements with the assumption that the value d IS 0 on integer lattice points. This is pure gradient perlin noise! Thirdly there is the paper Improving Noise [3] which replaces the above smoothstep function with a new function 6t^5-15t^4+10t^3, which again is the result under the condition that the value d IS 0 on integer lattice points. pure gradient perlin noise again! This explains the confusion in my opinion, the original paper is not specifically gradient noise, although its still a valid explanation. In my opinion the article should reflect the different papers, because there is quite a difference for the implementation of the function, for example the gradient vectors in Improved Noise are NOT unitlength, other than stated in this wiki article under algorithm. 2A02:908:5A0:7CA0:7D0F:30BE:939B:8D70 ( talk) 17:30, 1 December 2015 (UTC)
References
This article needs a clear description of the algorithm, preferably compatible with the 2002 version. Also, why is this categorized as a physics article? Seems a lot more like computer science to me. Shinobu 19:03, 10 March 2007 (UTC)
There are parts of the algorithm explanation that I don't understand. Just a list of questions I have:
In the second paragraph under "Grid definition" it says "Acquired gradient are then renormalized." What does it mean to renormalize something? In the next paragraph: "...some implementations use a hash and lookup table..." I think it refers to the data lookup function, but I'm not sure which article should be linked to.
Under Dot product: First paragraph "For each grid node/coordinate a distance vector between the particular point and the node coordinate is determined...." What's a distance vector? It doesn't have its own article. Also, the definition of Dot Product according to its own article seems to require only one input and two distinct sequences of numbers, and I don't understand either article.
That's as far as I've gotten. I hope this will help improve the readability. 72.95.45.209 ( talk) 01:05, 24 February 2015 (UTC)
From the article: ""Minecraft uses Perlin noise as part of its procedural landscape generation.[2]""
This may be true, but what is the point? Perlin noise is used everywhere not just in minecraft. Should this be removed? -- (fededevi) 193.205.206.25 ( talk) 15:11, 30 May 2011 (UTC)
Added some reference to another game. I think it can give an idea of what the uses of a noise generator can be. -- 87.8.5.219 ( talk) 12:53, 22 July 2011 (UTC)
I also think this makes no sense. When adding Minetest, you should also add Manic Digger and FreeMiner.Net. If moving away from MC, then you'd also have to add any other game that uses Noise. I think that this should be removed altogether. 188.195.209.75 ( talk) 14:41, 17 August 2011 (UTC)
The complete sentence:
"For example"? How does procedural landscape generation relate to *texture* generation and real-time *graphics* in computer games? As much as I love Minecraft, I don't think it's entirely relevant in this context. Now, okay, it *does* use the algorithm, but it is by no means unique in that. Also, using Perlin noise to generate terrain data is not only about games; take for example Terragen. Ddegirmenci ( talk) 22:30, 21 October 2011 (UTC)
I split the Minecraft/Minetest reference into a separate paragraph. Terrain generation is a use for Perlin noise, and so seems correct to list in the "Uses" section. I'll leave deciding which games should be referenced to more experienced editors. -- 81.159.167.165 ( talk) 00:20, 21 December 2011 (UTC)
Trying to implement Perlin Noise according to the pseudo given, I got stuck with rather unpleasing results. Further investigation revealed rather sharp looking edges in generated images are the result of linear interpolation. Ideally at least the second derivative of the interpolation function should be zero to get pleasing results.
I didn't get my hands on the original paper, so I couldn't verify, but at least [1] suggests using the function for interpolation. Using this function I finally managed to get pleasing results.
Thus I would like to suggest editing the pseudocode given to contain the following changes.
Add a function fade()
evaluating the given interpolation function.
function fade(float t) { return t * t * t * (t * (t * 6 - 15) + 10); }
Modify the function lerp()
to take our interpolation function into account.
function lerp(float a0, float a1, float w) { return fade(1.0 - w)*a0 + fade(w)*a1; }
In case you are unsure weather the suggested edit is justified, Python Code to reproduce a) the unpleasing result of the original algorithm and b) the modified version could be given to verify the difference of results.
Just drop me a line if you are in need of it. -- Mikyra ( talk) 08:56, 23 July 2017 (UTC)
Stumbled over the same problem. The section above also states that interpolation should be done with a smooth function (zero derivative at the boundaries), not linearly. O.mangold ( talk) 10:26, 3 December 2018 (UTC)
There isn't much point in having the code if you are going to leave the extern in there. It is just like skipping an entire section of code. — Preceding unsigned comment added by Bofum ( talk • contribs) 00:56, 23 May 2018 (UTC)
Ken Perlin said himself that he used a Monte Carlo simulation in order to generate the random gradient in the hyper-sphere. I think Ken Perlin was wrong. What he used is not a Monte Carlo simulation. Can it be corrected in the article? — Preceding unsigned comment added by 176.180.104.164 ( talk) 16:24, 23 August 2018 (UTC)
It might be nice to highlight some additional examples also included in the Perlin Noise presentation given by Ken Perlin ( http://web.archive.org/web/20071008162042/http://www.noisemachine.com/talk1/index.html) to help show the significance and impact of the algorithm in computer graphics.
Multiple patterns generated and compared: http://web.archive.org/web/20071008170106im_/http://www.noisemachine.com/talk1/imgs/elements.jpg
Fire animation: http://web.archive.org/web/20071008170528im_/http://www.noisemachine.com/talk1/imgs/flame500.gif
Cloud animation: http://web.archive.org/web/20071008170627im_/http://www.noisemachine.com/talk1/imgs/clouds500.gif — Preceding unsigned comment added by 192.55.54.42 ( talk) 23:54, 4 December 2018 (UTC)
First: In perlin (x, y) supposedly admits the coordinates in pixels, so it does not make sense to round an integer when it is already an integer. If you want to calculate between your intermediate values you need two more values that indicate the scale used.
Second: Inside the dotGridGradient, the Gradient value is multiplied proportional to the distance. So if the distance in both axes is zero the result will always be zero.
Third: In dotGridGradient and lerp the Gradient formula is applied 2 times. — Preceding unsigned comment added by Rmbeer ( talk • contribs) 22:40, 21 January 2019 (UTC)
In Algorithm detail >> Grid definition, there's this sentence:
Define an n-dimensional grid where each point has a random n-dimensional unit-length gradient vector, except in the one dimensional case where the gradients are random scalars between -1 and 1.
The second part seems redundant to me, since in 1D, there are two unit vectors (-1, +1) [1], so this is no special case. Is it some jargon or should it be shortened? — Preceding unsigned comment added by Martin Brajer ( talk • contribs) 18:21, 17 October 2020 (UTC)
Answer: I think that extra part is not redundant because random scalars between -1 and 1 include scalars such as 0.751 but the two unit vectors (-1) and (+1) do not include 0.751 — Preceding unsigned comment added by 82.30.5.207 ( talk) 18:23, 27 October 2020 (UTC)
References
What is the time complexity of Perlin noise? This page and Simplex noise seem to contradict each other, with the simplex page saying and this page saying . ProletariatetsBefrielseOrkester ( talk) 16:28, 10 February 2021 (UTC)
Was it 1996 Academy_Award_for_Technical_Achievement or 1997 as stated on Ken Perlin's own page? www.cinemasight.com also suggests the correct year is 1996.