Up to date

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

FogVolume

Inherits: VisualInstance3D < Node3D < Node < Object

A region that contributes to the default volumetric fog from the world environment.

Description

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 FogMaterial.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 Environment.volumetric_fog_enabled is true. If you don't want fog to be globally visible (but only within FogVolume nodes), set Environment.volumetric_fog_density to 0.0.

Tutorials

Properties

Material

material

FogVolumeShape

shape

3

Vector3

size

Vector3(2, 2, 2)


Property Descriptions

Material material

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


FogVolumeShape shape = 3

The shape of the FogVolume. This can be set to either RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CONE, RenderingServer.FOG_VOLUME_SHAPE_CYLINDER, RenderingServer.FOG_VOLUME_SHAPE_BOX or RenderingServer.FOG_VOLUME_SHAPE_WORLD.


Vector3 size = Vector3(2, 2, 2)

The size of the FogVolume when shape is RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CON