This repository contains Kenneth Perlin's Improved Noise, Kurt Spencer's Open Simplex, and implemented it to popular Warcraft 3 scripting languages.
Visit this repository for the Wurst version of the Noise library.
If you are not familiar with adding octaves to Perlin Noise, Flafla2's Octave Perlin, is an optional package that can help you.
Before using the noise functions, make sure to call the folliwng initialization functions:
JASS:
function MyInitialization takes nothing returns nothing
call InitNoise()
endfunction
vJASS:
The library automatically calls Noise.initialize()
by default.
Lua:
The library automatically calls Noise.initialize()
by default.
Calling this initialization function will generate random values (uses Warcraft III's GetRandomInt) to the permutation table and set the constant values for the JASS/vJASS versions of the gradient table.
If you are having any issues with your noise functions during initialization, your permutation and gradient table are possibly uninitialized.
In case your library that uses the noise functions initializes ahead of the Noise library's initialization, call InitNoise
(JASS) or Noise.initialize()
(vJASS/Lua) in your initializer.