FastNoiseSIMD icon indicating copy to clipboard operation
FastNoiseSIMD copied to clipboard

Feature request: 4D Noise

Open tcdude opened this issue 7 years ago • 5 comments
trafficstars

I saw that your FastNoise library supports certain noise functions up to 4D. Would it be possible to implement 4D in FastNoiseSIMD? 4D implementations would help in creating seamless tiling 2D textures. (If more dimensions are possible it could even produce tiling in 3D)

tcdude avatar Oct 02 '18 21:10 tcdude

While i like the idea of 4d noise, using the 4d-donut-method to produce 2d seamless noise using this library would be very inefficient - to generate a 512x512 seamless tile you would need a 512x512x512x512 array of noise - that would be 256GB ... The donut/hypertorus method only really makes sense when you generate only the values along the surface of the geometry, not the whole space containing the geometry.

ninnghazad avatar Oct 10 '19 23:10 ninnghazad

@ninnghazad I know too little of the inner workings of the library, but if it supported 4D noise, I definitely wouldn't generate the entire space, but a beforehand computed set of coordinates. Maybe I'm overlooking something really obvious in how this library leverages SIMD, but if it were a possibility to generated a vastly reduced array of values, I believe this to be a beneficial feature.

tcdude avatar Oct 23 '19 21:10 tcdude

FastNoise SIMD already supports passing in an array of positions to generate at, the hardest bit of 4D noise would be making an SIMD friendly gradient function. It's something I'm looking into with my new version of FastNoise

Auburn avatar Oct 24 '19 00:10 Auburn

that sounds nice. so one could already produce seamless 2d tiles by providing a grid of coordinates mapped to a torus in euclidean 3d. that would show some distortion, but might be ok with proper scaling. when 4d noise with custom coordinates becomes available one could map 2d coords to a clifford torus in 4d and get distortion free tiles. gotta try this for seamless 1d 'strings' through 2d space.

ninnghazad avatar Oct 24 '19 00:10 ninnghazad

You also need 4D when you have 3D solid noise on some 3D geometry and you want to animate/change this over time. In such cases you point sample the noise and don't request 'blocks' of noise of certain size that need to fit in memory.

virtualritz avatar May 09 '20 22:05 virtualritz