# Tiling Simplex Noise

This topic is 3836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Dear All, I'm trying to create some tilable Simplex noise. Using the tiling method I used to use for regular perlin noise(http://www.cs.cmu.edu/~mzucker/code/perlin-noise-math-faq.html), I've created the function below: double TiledNoise(double x, double y, double z, double ti, double tj, double tk) { double tiled = SimplexNoise(x, y, z) * ( x - ti ) * ( y - tj ) * ( z - tk ) + SimplexNoise(x - ti, y, z) * ( x ) * ( y - tj ) * ( z - tk ) + SimplexNoise(x, y - tj, z) * ( x - ti ) * ( y ) * ( z - tk ) + SimplexNoise(x - ti, y - tj, z) * ( x ) * ( y ) * ( z - tk ) + SimplexNoise(x, y, z - tk) * ( x - ti ) * ( y - tj ) * ( z ) + SimplexNoise(x - ti, y, z - tk) * ( x ) * ( y - tj ) * ( z ) + SimplexNoise(x, y - ti, z - tk) * ( x - ti ) * ( y ) * ( z ) + SimplexNoise(x - ti, y - tj, z - tk) * ( x ) * ( y ) * ( z ); return tiled / (ti * tj * tk); } and calling it as follows: for(float z = 0; z < 128; z++) for(float y = 0; y < 128; y ++) for(float x = 0; x < 128; x++) file<<TiledNoise(x/10,y/10,z/10, 12.8, 12.8, 12.8)<<" "; So as far as I can see this looks correct, but when I look at the generated noise, it not acctually tileable, its off by a small margin. Can anyone see mistake I'm making? Regards, Jesse

##### Share on other sites
x, y and z must be in the 0-ti, 0-tj, 0-tk range if I remember well. So you could try to add a:

x = fmod(x, ti)
y = fmod(y, tj)
z = fmod(z, tk)

at the beginning of your "TiledNoise" function.

Y.

##### Share on other sites
Doesnt seem to effect anything. I'm getting the same problem when I substitute perlin for simplex noise as well :/.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633704
• Total Posts
3013457
×