Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

NoiseTexture2D

Inherits: Texture2D < Texture < Resource < RefCounted < Object

A 2D texture filled with noise generated by a Noise object.

Description

Uses the FastNoiseLite library or other noise generators to fill the texture data of your desired size. NoiseTexture2D can also generate normal map textures.

The class uses Threads to generate the texture data internally, so Texture2D.get_image 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 image and the generated byte data:

var texture = NoiseTexture2D.new()
texture.noise = FastNoiseLite.new()
await texture.changed
var image = texture.get_image()
var data = image.get_data()

Properties

bool

as_normal_map

false

float

bump_strength

8.0

Gradient

color_ramp

bool

generate_mipmaps

true

int

height

512

bool

in_3d_space

false

bool

invert

false

Noise

noise

bool

normalize

true