pvigier / perlin-numpy

A fast and simple perlin noise generator using numpy
https://pvigier.github.io/2018/06/13/perlin-noise-numpy.html
MIT License
304 stars 50 forks source link

Base offset #11

Closed Michal-Martinek closed 2 years ago

Michal-Martinek commented 2 years ago

It would be nice to have the ability to specify the base offset for the coordinates of the generated array.

I need to generate the terrain height map for the scene, but since the player is moving I also need to generate the map with respect to the player position. This could be easily achieved with base offset similar to the one the vnoise library uses: https://github.com/plottertools/vnoise

pvigier commented 2 years ago

It would require to generate the angles using a hash function based on coordinates and not using numpy random functions as it is currently done. Don't know if it will bother other users.

Michal-Martinek commented 2 years ago

Yes, you're right, I don't even use your library, I just thought it would be a nice, easy to implement feature. Have a nice day!