OpenSimplexNoise

    Noise generator based on Open Simplex.

    This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions:

    get_image ( width, int height ) const
    get_noise_1d ( x ) const
    float ( float x, y ) const
    float ( Vector2 pos ) const
    get_noise_3d ( x, float y, z ) const
    float ( Vector3 pos ) const
    get_noise_4d ( x, float y, z, float w ) const
    get_seamless_image ( size ) const

    Difference in period between octaves.


    • octaves
    Default3
    Setterset_octaves(value)
    Getterget_octaves()

    Number of OpenSimplex noise layers that are sampled to get the fractal noise. Higher values result in more detailed noise but take more time to generate.

    Note: The maximum allowed value is 9.



    • persistence
    Default0.5
    Setterset_persistence(value)
    Getterget_persistence()

    Contribution factor of the different octaves. A persistence value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one.


    Seed used to generate random values, different seeds will generate different noise maps.

    • get_image ( int width, height ) const

    Generate a noise image with the requested width and height, based on the current noise parameters.


    Returns the 1D noise value [-1,1] at the given x-coordinate.

    Note: This method actually returns the 2D noise value with fixed y-coordinate value 0.0.



    • get_noise_2dv ( Vector2 pos ) const

    Returns the 2D noise value [-1,1] at the given position.


    Returns the 3D noise value [-1,1] at the given position.


    • get_noise_3dv ( Vector3 pos ) const

    Returns the 3D noise value [-1,1] at the given position.


    Returns the 4D noise value [-1,1] at the given position.


    Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square (size × ).