Table of Contents

Class FogVolume

Namespace
Godot
Assembly
GodotSharp.dll

FogVolumes are used to add localized fog into the global volumetric fog effect. FogVolumes can also remove volumetric fog from specific areas if using a FogMaterial with a negative Density.

Performance of FogVolumes is directly related to their relative size on the screen and the complexity of their attached FogMaterial. It is best to keep FogVolumes relatively small and simple where possible.

Note: FogVolumes only have a visible effect if VolumetricFogEnabled is true. If you don't want fog to be globally visible (but only within FogVolume nodes), set VolumetricFogDensity to 0.0.

public class FogVolume : VisualInstance3D, IDisposable
Inheritance
FogVolume
Implements
Inherited Members

Constructors

FogVolume()

public FogVolume()

Properties

Material

The Material used by the FogVolume. Can be either a built-in FogMaterial or a custom ShaderMaterial.

public Material Material { get; set; }

Property Value

Material

Shape

The shape of the FogVolume. This can be set to either Ellipsoid, Cone, Cylinder, Box or World.

public RenderingServer.FogVolumeShape Shape { get; set; }

Property Value

RenderingServer.FogVolumeShape

Size

The size of the FogVolume when Shape is Ellipsoid, Cone, Cylinder or Box.

Note: Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing ProjectSettings.rendering/environment/volumetric_fog/volume_depth (at a performance cost) or by decreasing VolumetricFogLength (at no performance cost, but at the cost of lower fog range). Alternatively, the FogVolume can be made thicker and use a lower density in the Material.

Note: If Shape is Cone or Cylinder, the cone/cylinder will be adjusted to fit within the size. Non-uniform scaling of cone/cylinder shapes via the Size property is not supported, but you can scale the FogVolume node instead.

public Vector3 Size { get; set; }

Property Value

Vector3

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