Search code examples
javarandomnoise

offsetting Simplex noise return values


I am planning on a project that uses the simplex noise algorithm to generate a map.

I want to generate more terrain as you move and explore. I know that simplex generates its noise from a seed, and will generate the same map if a seed is re-used. I want to load the map chunk by chunk.

My question is this:

Would it be possible pass offset parameters to a modified noise function, without iterating through values i already have?

For example receiving data for the (0,0)-(100,100) values and then from a separate call using the same seed receiving (0,100)-(100,200) values, without having to loop through the first 100x100 values.

I haven't worked with noise that much before, and i am interested to know if this approach would be feasible?

what other efficient methods would there be of generating similar results. and if this works would i be able to save the map data as the seeds used? minimizing IO functions?


Solution

  • Simplex Noise is a form of Value Noise. If you have a set seed, the mathematical calculation it performs to get the noise value is the same. This means that you only generate the noise value for a passed location.

    So if you generate for 100,100; that is the only noise value you will get. You dont calculate 0-100, 0-100; unless you loop it.