FogMaterial

Inherits: Material < Resource < RefCounted < Object

Material used with a FogVolume to draw things with the volumetric fog effect.

Description

A Material resource that can be used by FogVolumes to draw volumetric effects.

Properties

Color

albedo

Color(1, 1, 1, 1)

float

density

1.0

Texture3D

density_texture

float

edge_fade

0.1

Color

emission

Color(0, 0, 0, 1)

float

height_falloff

0.0

Property Descriptions

Default

Color(1, 1, 1, 1)

Setter

set_albedo(value)

Getter

get_albedo()

Sets the single-scattering Color of the FogVolume. Internally albedo is converted into single-scattering which is additively blended with other FogVolumes and the Environment.volumetric_fog_albedo.


Default

1.0

Setter

set_density(value)

Getter

get_density()

Sets the density of the FogVolume. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes.


Setter

set_density_texture(value)

Getter

get_density_texture()

Sets a 3D texture that is used to scale the density of the FogVolume.


Default

0.1

Setter

set_edge_fade(value)

Getter

get_edge_fade()

Sets the hardness of the edges of the FogVolume. A higher number will result in softer edges while a lower number will result in harder edges.


Default

Color(0, 0, 0, 1)

Setter

set_emission(value)

Getter

get_emission()

Sets the Color of the light emitted by the FogVolume. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the Color of the FogVolume independently from light sources.


Default

0.0

Setter

set_height_falloff(value)

Getter

get_height_falloff()

Sets the rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of 0 results in uniform-density fog. The height threshold is determined by the height of the associated FogVolume.