Struct NoiseTexture

OpenSimplexNoise filled texture.

struct NoiseTexture ;

Uses an OpenSimplexNoise to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures. NoiseTexture can also generate normalmap textures. The class uses Threads to generate the texture data internally, so Texture.getData may return null if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the data:

var texture = preload("res://noise.tres") yield(texture, "changed") var image = texture.get_data()

Properties

NameTypeDescription
asNormalmap[get, set] boolIf true, the resulting texture contains a normal map created from the original noise interpreted as a bump map.
bumpStrength[get, set] doubleStrength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer.
height[get, set] longHeight of the generated texture.
noise[get, set] OpenSimplexNoiseThe OpenSimplexNoise instance used to generate the noise.
seamless[get, set] boolWhether the texture can be tiled without visible seams or not. Seamless textures take longer to generate.
width[get, set] longWidth of the generated texture.

Methods

NameDescription
_generateTexture
_queueUpdate
_threadDone
_updateTexture
getBumpStrength
getNoise
getSeamless
isNormalmap
setAsNormalmap
setBumpStrength
setHeight
setNoise
setSeamless
setWidth