[Feature] Distance transform sampler
astrsh opened this issue ยท 2 comments
A sampler that accepts an Image
(implemented by #385) and returns the distance to the closest 'on' pixel derived from thresholding the provided image. This is commonly reffered to as a distance transformation.
The primary usecase I can think of this is allowing users to draw land mass shapes very simply, while also reaping the benefits of gradient noise (such as how Overworld 2.0 utilises continent noise for shaping terrain).
See examples below:
The result could be utilised as a noise sampler as a drop in replacement for other noise algorithms, allowing users to draw their noise.
A distance array can be precomputed at load time, meaning performance of this should not be a concern (but faster algs may improve pack load time, especially with larger source images).
This could act similarly to the cellular noise sampler, with multiple return types and distance calculation methods.
Implemented in #385