Light3D

Inherits: VisualInstance3D < Node3D < Node < Object

Inherited By: DirectionalLight3D, OmniLight3D, SpotLight3D

Provides a base class for different kinds of light nodes.

Description

Light3D is the abstract base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting.

Tutorials

Properties

float

distance_fade_begin

40.0

bool

distance_fade_enabled

false

float

distance_fade_length

10.0

float

distance_fade_shadow

50.0

bool

editor_only

false

float

light_angular_distance

0.0

BakeMode

light_bake_mode

2

Color

light_color

Color(1, 1, 1, 1)

int

light_cull_mask

4294967295

float

light_energy

1.0

float

light_indirect_energy

1.0

float

light_intensity_lumens

float

light_intensity_lux

bool

light_negative

false

Texture2D

light_projector

float

light_size

0.0

float

light_specular

0.5

float

light_temperature

float

light_volumetric_fog_energy

1.0

float

shadow_bias

0.1

float

shadow_blur

1.0

bool

shadow_enabled

false

float

shadow_normal_bias

2.0

float

shadow_opacity

1.0

bool

shadow_reverse_cull_face

false

float

shadow_transmittance_bias

0.05

Methods

Color

get_correlated_color ( ) const

float

get_param ( Param param ) const

void

set_param ( Param param, float value )


Enumerations

enum Param:

Param PARAM_ENERGY = 0

Constant for accessing light_energy.

Param PARAM_INDIRECT_ENERGY = 1

Constant for accessing light_indirect_energy.

Param PARAM_VOLUMETRIC_FOG_ENERGY = 2

Constant for accessing light_volumetric_fog_energy.

Param PARAM_SPECULAR = 3

Constant for accessing light_specular.

Param PARAM_RANGE = 4

Constant for accessing O