views:

438

answers:

2

I've been interested (as a hobbyist) in pseudo-random noise generation, specifically the Perlin and Simplex algorithms. The advantage to Simplex is speed (especially at higher dimensions), but Perlin can be tiled relatively easily. I was wondering if anyone was aware of a tiling simplex algorithm? Fixed-dimension is fine, generic is better; pseudocode is fine, c/c++ is better.

+1  A: 

I had the same question in mind some time back. This link may help you a bit.

http://www.gamedev.net/community/forums/topic.asp?topic%5Fid=409855

rayimag
Thanks for the link; unfortunately the end of the thread concludes that the implementations only have tiling Perlin noise, not Simplex noise.
fbrereto
A: 

I recently needed tiling simplex noise and came across this question.

For tiling noise using any noise function, you can linearly interpolate additional tile samples:

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)

where F() is your noise function. Note that x, y must be coordinates within an individual tile: x in [0, w), y in [0, h). You could use something like tileX = x - Math.Floor(x / w) * w or fmod().

If performance is critical or for higher dimensions, this may not be the way to go because it requires 2^D lookups for dimension D. It also produced lower values toward the centers of tiles for me.

Taken from: http://webstaff.itn.liu.se/~stegu/TNM022-2005/perlinnoiselinks/perlin-noise-math-faq.html

BenC
That's tiling Perlin noise, however, not Simplex noise.
fbrereto
The link discusses Perlin noise, but doesn't explicitly state that the method is for it only. I have a working 2D implementation tiling simplex noise, but chose an alternative because the amplitude is decreased toward the tile centers. Gabor noise seems to produce good results and tiles without having to resort to this method (http://graphics.cs.kuleuven.be/publications/LLDD09PNSGC/).
BenC