Perlin noise: Difference between revisions

(Created page with " ==Algorithm== # Generate a grid of random unit-length vectors # For each point, find the closest corners in the grid and compute the dot product between the vector from the corner and the corner's random vector. # Interpolate between these using smoothstep. ==Resources== * https://rtouti.github.io/graphics/perlin-noise-algorithm")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
==Algorithm==
==Algorithm==
# Generate a grid of random unit-length vectors
# Generate a grid of random unit-length vectors
# For each point, find the closest corners in the grid and compute the dot product between the vector from the corner and the corner's random vector.
#* In improved perlin noise, vectors which only contain +=1 and 0 such as (1, 1, 0) are used
# For each point, find the closest corners in the grid and compute the dot product between the vector from the corner and the corner's random vector. This results in 4 values for each pixel, one for each corner.
# Interpolate between these using smoothstep.
# Interpolate between these using smoothstep.
#* In improved perlin noise, use smootherstep which has zero first and second derivatives at the boundaries:
#* <math>\operatorname{smootherstep}(x) = 6x^5 - 15x^4 + 10x^3</math>


==Resources==
==Resources==
* [https://dl.acm.org/doi/10.1145/325165.325247 An image synthesizer (Perlin, SIGGRAPH 1985)]
* [https://www.semanticscholar.org/paper/Improving-noise-Perlin/a6fd5071b73f542c79bd08d409c5f73de38dac5d Improving noise (SIGGRAPH 2002)]
* https://rtouti.github.io/graphics/perlin-noise-algorithm
* https://rtouti.github.io/graphics/perlin-noise-algorithm

Latest revision as of 17:35, 21 April 2023

Algorithm

  1. Generate a grid of random unit-length vectors
    • In improved perlin noise, vectors which only contain +=1 and 0 such as (1, 1, 0) are used
  2. For each point, find the closest corners in the grid and compute the dot product between the vector from the corner and the corner's random vector. This results in 4 values for each pixel, one for each corner.
  3. Interpolate between these using smoothstep.
    • In improved perlin noise, use smootherstep which has zero first and second derivatives at the boundaries:
    • \(\displaystyle \operatorname{smootherstep}(x) = 6x^5 - 15x^4 + 10x^3\)

Resources