This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
Name | noiseDetail() |
||||
---|---|---|---|---|---|
Examples | float noiseVal; float noiseScale=0.02; void draw() { for (int y = 0; y < height; y++) { for (int x = 0; x < width/2; x++) { noiseDetail(3,0.5); noiseVal = noise((mouseX+x) * noiseScale, (mouseY+y) * noiseScale); stroke(noiseVal*255); point(x,y); noiseDetail(8,0.65); noiseVal = noise((mouseX + x + width/2) * noiseScale, (mouseY + y) * noiseScale); stroke(noiseVal * 255); point(x + width/2, y); } } } | ||||
Description |
Adjusts the character and level of detail produced by the Perlin noise function. Similar to harmonics in physics, noise is computed over several octaves. Lower octaves contribute more to the output signal and as such define the overall intensity of the noise, whereas higher octaves create finer-grained details in the noise sequence. By default, noise is computed over 4 octaves with each octave contributing exactly half than its predecessor, starting at 50% strength for the first octave. This falloff amount can be changed by adding an additional function parameter. For example, a falloff factor of 0.75 means each octave will now have 75% impact (25% less) of the previous lower octave. While any number between 0.0 and 1.0 is valid, note that values greater than 0.5 may result in noise() returning values greater than 1.0. By changing these parameters, the signal created by the noise() function can be adapted to fit very specific needs and characteristics. |
||||
Syntax | noiseDetail(lod) noiseDetail(lod, falloff) | ||||
Parameters |
| ||||
Returns | void | ||||
Related | noise() noiseDetail() |
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.