Module opensimplex2::smooth
source · Expand description
K.jpg’s OpenSimplex 2, smooth variant (“SuperSimplex”)
Functions
2D OpenSimplex2S/SuperSimplex noise, standard lattice orientation.
2D OpenSimplex2S/SuperSimplex noise, with Y pointing down the main diagonal.
Might be better for a 2D sandbox style game, where Y is vertical.
Probably slightly less optimal for heightmaps or continent maps,
unless your map is centered around an equator. It’s a slight
difference, but the option is here to make it easy.
3D OpenSimplex2S/SuperSimplex noise, fallback rotation option
Use noise3_ImproveXY or noise3_ImproveXZ instead, wherever appropriate.
They have less diagonal bias. This function’s best use is as a fallback.
3D OpenSimplex2S/SuperSimplex noise, with better visual isotropy in (X, Y).
Recommended for 3D terrain and time-varied animations.
The Z coordinate should always be the “different” coordinate in whatever your use case is.
If Y is vertical in world coordinates, call noise3_ImproveXZ(x, z, Y) or use noise3_XZBeforeY.
If Z is vertical in world coordinates, call noise3_ImproveXZ(x, y, Z).
For a time varied animation, call noise3_ImproveXY(x, y, T).
3D OpenSimplex2S/SuperSimplex noise, with better visual isotropy in (X, Z).
Recommended for 3D terrain and time-varied animations.
The Y coordinate should always be the “different” coordinate in whatever your use case is.
If Y is vertical in world coordinates, call noise3_ImproveXZ(x, Y, z).
If Z is vertical in world coordinates, call noise3_ImproveXZ(x, Z, y) or use noise3_ImproveXY.
For a time varied animation, call noise3_ImproveXZ(x, T, y) or use noise3_ImproveXY.
4D SuperSimplex noise, fallback lattice orientation.
4D SuperSimplex noise, with XYZ oriented like noise3_Fallback
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
where there isn’t a clear distinction between horizontal and vertical
4D SuperSimplex noise, with XYZ oriented like noise3_ImproveXY
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
in a space where Z is vertical
4D SuperSimplex noise, with XYZ oriented like noise3_ImproveXZ
and W for an extra degree of freedom. W repeats eventually.
Recommended for time-varied animations which texture a 3D object (W=time)
in a space where Y is vertical
4D SuperSimplex noise, with XY and ZW forming orthogonal triangular-based planes.
Recommended for 3D terrain, where X and Y (or Z and W) are horizontal.
Recommended for noise(x, y, sin(time), cos(time)) trick.