Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
NoiseTexture¶
Inherits: Texture < Resource < Reference < Object
Textura rellenada OpenSimplexNoise.
Descripción¶
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.get_data 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()
Propiedades¶
|
||
|
||
flags |
|
|
|
||
|
||
|
||
|
Descripciones de Propiedades¶
bool as_normalmap
Default |
|
Setter |
set_as_normalmap(value) |
Getter |
is_normalmap() |
Si true
, la textura resultante contiene un mapa normal creado a partir del ruido original interpretado como un bump map.
float bump_strength
Default |
|
Setter |
set_bump_strength(value) |
Getter |
get_bump_strength() |
La fuerza de los bump maps usados en esta textura. Un valor más alto hará que los bump maps parezcan más grandes mientras que un valor más bajo los hará parecer más suaves.
int height
Default |
|
Setter |
set_height(value) |
Getter |
get_height() |
Altura de la textura generada.
OpenSimplexNoise noise
Setter |
set_noise(value) |
Getter |
get_noise() |
La instancia OpenSimplexNoise utilizada para generar el ruido.
Vector2 noise_offset
Default |
|
Setter |
set_noise_offset(value) |
Getter |
get_noise_offset() |
An offset used to specify the noise space coordinate of the top left corner of the generated noise. This value is ignored if seamless is enabled.
bool seamless
Default |
|
Setter |
set_seamless(value) |
Getter |
get_seamless() |
Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate.
Note: Seamless noise has a lower contrast compared to non-seamless noise. This is due to the way noise uses higher dimensions for generating seamless noise.
int width
Default |
|
Setter |
set_width(value) |
Getter |
get_width() |
El ancho de la textura generada.