Noise Algorithms and their applications
by Andreas Sepp
for the Computer Graphics Seminar 16/17 fall
The plan for today
What is noise?
Formally...
White noise
for each(x,y):
var color = random(0, 256);
Image.pixel[x,y]
= (color, color, color);
White Noise as a post-effect
White Noise: Online
Value noise
fhash = ℤ2 → [0, 1]
For this, we can generate some numbers in the desired range at some fixed interval m (= 0.05):
perm = {0.00, 0.05, 0.10, 0.15, …, 0.95, 1.00}
And then randomize it into some random permutation:
perm = { 0.15, 1.00, 0.35, 0.00, …, 0.50, 0.20 }
Value noise
Now we can find a pseudorandom value for every 2D vector (x,y) from the perm array like this:
Let k = 1 + 1/m = perm.length()
fhash = perm[ (perm[x mod k] * (1/m +1) + y) mod k]
Value noise
Value noise interpolation
Blending functions comparison
C0 smooth C1 smooth C2 smooth
f(x) = x f(x) = 3x2 - 2x3 f(x) = 6x5 - 15x4 + 10x3
Value noise
Value noise
Gradient noise
Perlin noise
Perlin noise
Perlin noise
Simplex noise
Simplex noise
Simplex noise
Simplex noise
Noise applications
Noise applications
Noise algorithms in games: Minecraft
Noise algorithms in games: Terraria
Thanks for listening and participating!
Some links of interest:
Value noise and Perlin noise implementation as a tutorial: http://catlikecoding.com/unity/tutorials/noise/
Simplex noise explained more thoroughly: http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
Simplex noise with actually easy to follow code: http://catlikecoding.com/unity/tutorials/simplex-noise/
My BSc thesis about procedural infinite terrain generation, also explains the noise algorithms in more detail (in estonian): https://comserv.cs.ut.ee/home/files/sepp_informaatika_2016.pdf?study=ATILoputoo&reference=DD8A7D42D542D38F624F67AA83B6CB1108696588