GKNoiseMap stretches instead of shifting when origin moves

Pretty sure this is just a bug, and looking at the forums it seems like GKNoise/GKNoiseMap has a number of known issues and not much support...

I have a perlin noise source and map it to a GKNoiseMap with some arbitrary square model coordinate system, size 20.0 x 20.0, origin (-10.0, -10.0). I can map this to a square area to render with the sample size matching my output and it all draws fine.

Then I want to shift the noise incrementally, say 10% up in the Y+ axis direction. So I change the origin by adding 2.0 to Y and leave X and size the same, and a make a new GKNoiseMap with the same (or identical) noise source and these values.

The result is that instead of shifting the slice, it stretches it. The noise is compressed or warped rather than moved. It's weird.

I was able to get slightly better results trying to use GKNoise move() instead, but now it isn't working at all! Not to mention that GKNoise is document as being an 'infinite' noise object, so what does move() or scale() even mean there? I would think the GKNoiseMap coordinate bounds would be the definitive way to do this - to use the same noise data but shift around your window or 'slice'.

I am really close to scrapping my use of GKNoise API completely, but maybe if there's a developer who worked on this API you can share the secret to its behavior.

Replies

I've thought this is weird too. The documentation for the origin is pretty cryptic, but the way it shrinks/scales definitely doesn't seem right.

Also, just a heads up, the GKVoronoiNoiseSource seed doesn't do anything and is broken.