Generate a special sort of multidimensional perlin noise suitable for blending textures together
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.txt
README.md
demo.ts
drawing.ts
grass_small.jpg
perlin.html
perlin.ts
sand_small.jpg
tsconfig.json
water_small.jpg

README.md

Barycentric Perlin Noise

This code generates perlin noise with n dimensions of output such that the component sum is a constant. This is useful for blending together n textures or assigning n biomes.

An explanation and demo can be found at https://www.boristhebrave.com/2018/05/12/barycentric-perlin-noise/

Usage

Compile with tsc or webpack.

Construct a BarycentricPerlin class, with the number of dimensions and the size of the rect to cover. Then call regen to pick a set of gradients, and eval to interpolate to a specific floating point inside the rect.

See also the usage in demo.ts, or the comments.

Copyright

Code is covered by the MIT license.

The demo images are from https://3dtextures.me under a free license.