Table of Contents

Class NoiseTexture3D

Namespace
Godot
Assembly
GodotSharp.dll

Uses the FastNoiseLite library or other noise generators to fill the texture data of your desired size.

The class uses GodotThreads to generate the texture data internally, so 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 image:

var texture = NoiseTexture3D.new()
  texture.noise = FastNoiseLite.new()
  await texture.changed
  var data = texture.get_data()
public class NoiseTexture3D : Texture3D, IDisposable
Inheritance
NoiseTexture3D
Implements
Inherited Members

Constructors

NoiseTexture3D()

public NoiseTexture3D()

Properties

ColorRamp

A Gradient which is used to map the luminance of each pixel to a color value.

public Gradient ColorRamp { get; set; }

Property Value

Gradient

Depth

Depth of the generated texture (in pixels).

public int Depth { get; set; }

Property Value

int

Height

Height of the generated texture (in pixels).

public int Height { get; set; }

Property Value

int

Invert

If true, inverts the noise texture. White becomes black, black becomes white.

public bool Invert { get; set; }

Property Value

bool

Noise

The instance of the Noise object.

public Noise Noise { get; set; }

Property Value

Noise

Normalize

If true, the noise image coming from the noise generator is normalized to the range 0.0 to 1.0.

Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures.

public bool Normalize { get; set; }

Property Value

bool

Seamless

If true, a seamless texture is requested from the Noise resource.

Note: Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used Noise resource. This is because some implementations use higher dimensions for generating seamless noise.

Note: The default FastNoiseLite implementation uses the fallback path for seamless generation. If using a Width, Height or Depth lower than the default, you may need to increase SeamlessBlendSkirt to make seamless blending more effective.

public bool Seamless { get; set; }

Property Value

bool

SeamlessBlendSkirt

Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See Noise for further details.

Note: If using a Width, Height or Depth lower than the default, you may need to increase SeamlessBlendSkirt to make seamless blending more effective.

public float SeamlessBlendSkirt { get; set; }

Property Value

float

Width

Width of the generated texture (in pixels).

public int Width { get; set; }

Property Value

int

Methods

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool