Language:
Discover
By Skill Level
By Category

ULightComponent

Choose your OS:

Inheritance Hierarchy

Syntax

class ULightComponent : public ULightComponentBase

Variables

Name Description

Public variable

uint32 : 1

 

bAddedToSceneVisible

True when this light component has been added to the scene as a normal visible light.

Public variable

uint32 : 1

 

bAffectDynamicIndirectLighting

Whether the light should be injected into the Light Propagation Volume

Public variable

uint32 : 1

 

bCastShadowsFromCinematicObjectsOnly

Whether the light should only cast shadows from components marked as bCastCinematicShadows.

Public variable

uint32 : 1

 

bEnableLightShaftBloom

Whether to render light shaft bloom from this light.

Public variable

float

 

BloomScale

Scales the additive color.

Public variable

float

 

BloomThreshold

Scene color must be larger than this to create bloom in the light shafts.

Public variable

FColor

 

BloomTint

Multiplies against scene color to create the bloom color.

Public variable

uint32 : 1

 

bUseIESBrightness

True: take light brightness from IES profile, false: use the light brightness - the maximum light in one direction is used to define no masking.

Public variable

bool

 

bUseRayTracedDistanceFieldShadows

Whether to use ray traced distance field area shadows.

Public variable

uint32 : 1

 

bUseTemperature

False: use white (D65) as illuminant.

Public variable

uint32 : 1

 

CastTranslucentShadows

Whether the light is allowed to cast dynamic shadows from translucency.

Public variable

float

 

ContactShadowLength

Length of screen space ray trace for sharp contact shadows. Zero is disabled.

Public variable

FRenderCommandF ...

 

DestroyFence

Fence used to track progress of render resource destruction.

Public variable

float

 

DisabledBrightness

Brightness factor applied to the light when the light function is specified but disabled, for example in scene captures that use SceneCapView_LitNoShadows.

Public variable

float

 

IESBrightnessScale

Global scale for IES brightness contribution.

Public variable

UTextureLightPr ...

 

IESTexture

IES texture (light profiles from real world measured data)

Public variable

float

 

LightFunctionFadeDistance

Distance at which the light function should be completely faded to DisabledBrightness.

Public variable

UMaterialInterf ...

 

LightFunctionMaterial

The light function material to be applied to this light.

Public variable

FVector

 

LightFunctionScale

Scales the light function projection.

Public variable

FLightingChanne ...

 

LightingChannels

Channels that this light should affect.

Public variable

float

 

MaxDistanceFadeRange

Public variable

float

 

MaxDrawDistance

Public variable

float

 

MinRoughness

Min roughness effective for this light. Used for softening specular highlights.

Public variable

int32

 

PreviewShadowMapChannel

Transient shadowmap channel used to preview the results of stationary light shadowmap packing.

Public variable

float

 

RayStartOffsetDepthScale

Controls how large of an offset ray traced shadows have from the receiving surface as the camera gets further away.

Public variable

FLightSceneProx ...

 

SceneProxy

The light's scene info.

Public variable

float

 

ShadowBias

Controls how accurate self shadowing of whole scene shadows from this light are.

Public variable

float

 

ShadowResolutionScale

Scales the resolution of shadowmaps used to shadow this light.

Public variable

float

 

ShadowSharpen

Amount to sharpen shadow filtering

Public variable

FStaticShadowDe ...

 

StaticShadowDepthMap

Public variable

float

 

Temperature

Color temperature in Kelvin of the blackbody illuminant. White (D65) is 6500K.

Constructors

Name Description

Public function

ULightComponent

(
    const FObjectInitializer & ObjectIn...
)

Updates/ resets light GUIDs.

Functions

Name Description

Public function Virtual

bool

 

AffectsBounds

(
    const FBoxSphereBounds & InBounds
)

Test whether the light affects the given bounding volume.

Public function

bool

 

AffectsPrimitive

(
    const UPrimitiveComponent * Pri...
)

Test whether this light affects the given primitive.

Public function

void

 

ApplyComponentInstanceData

(
    FPrecomputedLightInstanceData*...
)

Public function

float

 

ComputeLightBrightness()

Compute current light brightness based on whether there is a valid IES profile texture attached, and whether IES brightness is enabled

Public function Virtual

FLightSceneP ...

 

CreateSceneProxy()

Public function Virtual

FBox

 

GetBoundingBox()

Return the world-space bounding box of the light's influence.

Public function Virtual

FSphere

 

GetBoundingSphere()

Public function

FVector

 

GetDirection()

GetDirection.

Public function

const FLight ...

 

GetLightComponentMapBuildData()

Public function Virtual

FLightmassLi ...

 

GetLightmassSettings()

Public function Virtual

FVector4

 

GetLightPosition()

Return the homogenous position of the light.

Public function Virtual

ELightCompon ...

 

GetLightType()

ELightComponentType for the light component class

Public function Virtual

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

MaterialInterface assigned to the given material index (if any)

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

Public function Virtual

float

 

GetUniformPenumbraSize()

Public function

void

 

InitializeStaticShadowDepthMap()

Public function

void

 

InvalidateLightingCacheInner

(
    bool bRecreateLightGuids
)

Invalidates the light's cached lighting with the option to recreate the light Guids.

Public function

bool

 

IsShadowCast

(
    UPrimitiveComponent * Primitive
)

Check whether a given primitive will cast shadows from this light.

Public function Virtual

bool

 

IsUsedAsAtmosphereSunLight()

Whether to consider light as a sunlight for atmospheric scattering.

Public function Static

void

 

ReassignStationaryLightChannels

(
    UWorld * TargetWorld,
    bool bAssignForLightingBuild,
    ULevel * LightingScenario
)

Iterates over ALL stationary light components in the target world and assigns their preview shadowmap channel, and updates light icons accordingly.

Public function

void

 

SetAffectDynamicIndirectLighting

(
    bool bNewValue
)

Public function

void

 

SetAffectTranslucentLighting

(
    bool bNewValue
)

Public function

void

 

SetBloomScale

(
    float NewValue
)

Public function

void

 

SetBloomThreshold

(
    float NewValue
)

Public function

void

 

SetBloomTint

(
    FColor NewValue
)

Public function

void

 

SetEnableLightShaftBloom

(
    bool bNewValue
)

Public function

void

 

SetIESTexture

(
    UTextureLightProfile * NewValue
)

Public function

void

 

SetIndirectLightingIntensity

(
    float NewIntensity
)

Public function

void

 

SetIntensity

(
    float NewIntensity
)

Set intensity of the light

Set brightness of the light

Public function

void

 

SetLightColor

(
    FLinearColor NewLightColor,
    bool bSRGB
)

Set color of the light

Public function

void

 

SetLightFunctionDisabledBrightness

(
    float NewValue
)

Public function

void

 

SetLightFunctionFadeDistance

(
    float NewLightFunctionFadeDistance
)

Public function

void

 

SetLightFunctionMaterial

(
    UMaterialInterface * NewLightFu...
)

Public function

void

 

SetLightFunctionScale

(
    FVector NewLightFunctionScale
)

Public function Virtual

void

 

SetMaterial

(
    int32 ElementIndex,
    UMaterialInterface * InMaterial
)

Set the MaterialInterface to use for the given element index (if valid)

Public function

void

 

SetShadowBias

(
    float NewValue
)

Public function

void

 

SetTemperature

(
    float NewTemperature
)

Set color temperature of the light

Public function

void

 

SetVolumetricScatteringIntensity

(
    float NewIntensity
)

Public function

void

 

UpdateColorAndBrightness()

Script interface to update the color and brightness on the render thread.

Overridden from ULightComponentBase

Name Description

Public function Virtual

void

 

UpdateLightSpriteTexture()

Update the texture used on the editor sprite

Overridden from USceneComponent

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

CreateRenderState_Concurrent()

Used to create any rendering thread information for this component

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

Public function Virtual

FActorCompon ...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Public function Virtual

void

 

InvalidateLightingCacheDetailed

(
    bool bInvalidateBuildEnqueuedLighti...,
    bool bTranslationOnly
)

ULightComponent::InvalidateLightingCache

Protected function Virtual

void

 

OnRegister()

UActorComponent Interface

Protected function Virtual

void

 

SendRenderTransform_Concurrent()

Called to send a transform update for this component to the rendering thread

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

WITH_EDITOR.

Public function Virtual

bool

 

CanEditChange

(
    const UProperty * InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInterpChange

(
    UProperty * PropertyThatChanged
)

Called when property is modified by InterpPropertyTracks

Public function Virtual

void

 

PostLoad()

Called after this UObject has been serialized

Public function Virtual

void

 

Serialize

(
    FArchive & Ar
)

UObject serializer.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/LightComponent.h