Original Post
I'm looking for good references on how to implement seamless, tiling Perlin noise. So far, everything I've found on google has been useless. As I understand it, there are two approaches to tile Perlin noise. 1. Interpolating N noises and weighting them. This is the approach described in The Perlin noise math FAQ. In 2D the formula is
Ftileable(x, y) = (
F(x, y) * (w - x) * (h - y) +
F(x - w, y) * (x) * (h - y) +
F(x - w, y - h) * (x) * (y) +
F(x, y - h) * (w - x) * (y)
) / (wh)
The problem seems to be the final division by (w * h). For low values of w and h (ex.: w = h = 1.0) this leads to over-saturation of values: the function no longer returns values in the [-1;+1] range, but easily in the [-3;+3] range. For large values of w and h (ex.: w = h = 128.0), the values are under-saturated; values start to converge to 0. This happens even faster in 3D due to the cubic term. 2. The modulo approach. The idea here is that you can tile in noise space over a period that is a power of 2 by inserting modulo operations when calculating the indices for the permutation table. See this thread on gamedev.net for an explanation. It works well when the period is indeed 2^n, but this restricts the fractal to have a lacunarity of 2.0, which severely limits the kind of fractals that you can generate. The second approach looks hopeless to me, but I'd like to know if anybody found a solution to the saturation problem in the first one.. Y.