Perlin noise is generated from a summation of little "surflets" which are the product of a randomly oriented gradient and a separable polynomial falloff function. Surflet(intX+0, intY+1) + surflet(intX+1, intY+1)) Return (surflet(intX+0, intY+0) + surflet(intX+1, intY+0) + Here's some Python code for a simple Perlin noise function that works with any period up to 256 (you can trivially extend it as much as you like by modifying the first section): import randomĭirs = [(s(a * 2.0 * math.pi / 256),ĭistX, distY = abs(x-gridX), abs(y-gridY) First, you need to make the Perlin noise function itself tileable. There's two parts to making seamlessly tileable fBm noise like this.
0 Comments
Leave a Reply. |