3
\$\begingroup\$

My question is what methods are there to "zoom in" on a procedurally generated map using Perlin Noise (or Simplex).

If I have for example this generatedenter image description here

and I wanted to "zoom" into that little red square I drew, how could I achieve something to the likes of this (ugly drawn) example: enter image description here

While staying true to the terrain above? I have heard of 3D methods but couldn't find any meant for 2D maps.

Any advice or help would be appreciated.

\$\endgroup\$
2
\$\begingroup\$

Lets define your noise function for terrain generation as f(x,y).

f(x / 2, y) will set the zoom on the X axis to 200%

f(x, y / 2) will set the zoom on the Y axis to 200%

So, it's f(x / zoom, y / zoom) for your noise function.

This is true for any function in maths.

You can translate your output too.

f(x - 100, y) will move your output by 100 tiles right.

f(x, y - 100) will move your output by 100 tiles up.

To zoom by a factor of z around point (a,b), you'd transform your noise function f(a,b) to f((x - a) / z, (y - b) / z).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.