ref
https://youtu.be/ZsEnnB2wrbI?si=ER9o5ccmvAKEzCen

Step Intro
噪声本质是随机性的表现

白噪声:像素点0-1之间随机赋值

噪声的类型

为了得到更平滑的噪声,有一种算法——Perlin noise:将随机的数字序列变为平滑连接的明暗板块

步骤1 获得随机的数字序列,将地图分割为一系列方块

步骤2 在网格每个顶点处放置一个随机数作为梯度向量值的参考

步骤3 计算网格内像素点得到的偏移向量和网格顶点对应的梯度向量的点积



步骤4 使用平滑函数将四个梯度得到的贴图叠加,得到柏林噪声的一个八度



步骤5 可以进一步细分网格,得到更高阶八度

步骤6 将各级八度混合,得到分形柏林噪声

Step Details
1.generate a pseudo-random number generator(伪随机数生成器)

2.divide map up with a grid and each cell of the grid will be referred to as a chunk

3.assign an influence vector to each corner of this grid

4.ensure one number will correspond to one angle

5.for games ,the direction can be easier for them to go in any direction they want





6.To solve the sharp jump along its borders, we can blend pairs of map in a particular sequence by horizontally then vertically


6.1 Lerping






6.2 Smooth Stepping








PS



3D perlin noise

