Hello!, I've recently been working on jungleland for yogstation, and i realized that calling current rust-g perlin noise255x255 per z level is extremely slow, so i coded this. DBP is a type of noise i recently coded and published to crates.io, so i decided to add it to rust-g.
Here is the code to DBP https://github.com/EdgeLordExe/batch-perlin-like-noise-rs
DBP is extremely fucking fast, it's multithreaded and most importantly it allows byond to not waste time calling perlin noise like thousands of times, instead calling only once and recieveing the results in a single string (just how cellularnoise does it)
Why didn't i just copy paste it from my repo to here?
I already published it to crates.io and because im lazy.
How DBP noise works
Ok so perlin noise is smooth, like we all know that. While we do not necessarily need all that smoothness, we probe perlin noise by iterating over it with x_offset, that's how currently most biomes generate. Knowing that we do not need an infintely smooth plane, but rather, a discrete grid of values i made some optimizations.
First of all, instead of calculating the dot product 4x255x255 times, we precalculate dot products in so called "stamps", we then partially overlay stamps on top of each other and pass that through a smoothing function.
Second of all, we only generate a discrete number of stamps, that's what accuracy is, accuracy determines the amount of stamps, each stamp is generated with a normal vector pointing in ((2 PI) / accuracy ) N direction
Hello!, I've recently been working on jungleland for yogstation, and i realized that calling current rust-g perlin noise255x255 per z level is extremely slow, so i coded this. DBP is a type of noise i recently coded and published to crates.io, so i decided to add it to rust-g. Here is the code to DBP https://github.com/EdgeLordExe/batch-perlin-like-noise-rs
DBP is extremely fucking fast, it's multithreaded and most importantly it allows byond to not waste time calling perlin noise like thousands of times, instead calling only once and recieveing the results in a single string (just how cellularnoise does it)
Why didn't i just copy paste it from my repo to here? I already published it to crates.io and because im lazy.
How DBP noise works
Ok so perlin noise is smooth, like we all know that. While we do not necessarily need all that smoothness, we probe perlin noise by iterating over it with x_offset, that's how currently most biomes generate. Knowing that we do not need an infintely smooth plane, but rather, a discrete grid of values i made some optimizations. First of all, instead of calculating the dot product 4x255x255 times, we precalculate dot products in so called "stamps", we then partially overlay stamps on top of each other and pass that through a smoothing function. Second of all, we only generate a discrete number of stamps, that's what accuracy is, accuracy determines the amount of stamps, each stamp is generated with a normal vector pointing in ((2 PI) / accuracy ) N direction
Some screenshots: accuracy: 360 stamp_size: 16
accuracy: 4 stamp_size: 16
accuracy: 3, stamp_size: 8