Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Components
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- ULightComponentBase
- ULightComponent
- UDirectionalLightComponent
- ULocalLightComponent
- UPointLightComponent
- USpotLightComponent
- URectLightComponent
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Components/LightComponent.h |
Include | #include "Components/LightComponent.h" |
Syntax
UCLASS (Abstract, HideCategories=(Trigger, Activation, "Components|Activation", Physics),
ShowCategories=(Mobility), MinimalAPI)
class ULightComponent : public ULightComponentBase
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
uint32: 1 | bAddedToSceneVisible | True when this light component has been added to the scene as a normal visible light. |
![]() ![]() ![]() ![]() |
uint32: 1 | bCastShadowsFromCinematicObjectsOnly | Whether the light should only cast shadows from components marked as bCastCinematicShadows. |
![]() ![]() ![]() ![]() |
uint32: 1 | bEnableLightShaftBloom | Whether to render light shaft bloom from this light. |
![]() ![]() ![]() ![]() |
uint32: 1 | bForceCachedShadowsForMovablePrimitives | Enables cached shadows for movable primitives for this light even if r.shadow.cachedshadowscastfrommovableprimitives is 0 |
![]() ![]() ![]() ![]() |
float | BloomMaxBrightness | After exposure is applied, scene color brightness larger than BloomMaxBrightness will be rescaled down to BloomMaxBrightness. |
![]() ![]() ![]() ![]() |
float | BloomScale | Scales the additive color. |
![]() ![]() ![]() ![]() |
float | BloomThreshold | Scene color must be larger than this to create bloom in the light shafts. |
![]() ![]() ![]() ![]() |
FColor | BloomTint | Multiplies against scene color to create the bloom color. |
![]() ![]() ![]() ![]() |
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. |
![]() ![]() ![]() ![]() |
bool | bUseRayTracedDistanceFieldShadows | Whether to use ray traced distance field area shadows. |
![]() ![]() ![]() ![]() |
uint32: 1 | bUseTemperature | False: use white (D65) as illuminant. |
![]() ![]() ![]() ![]() |
uint32: 1 | CastTranslucentShadows | Whether the light is allowed to cast dynamic shadows from translucency. |
![]() ![]() ![]() ![]() |
float | ContactShadowCastingIntensity | Intensity of the shadows cast by primitives with "cast contact shadow" enabled. |
![]() ![]() ![]() ![]() |
float | ContactShadowLength | Length of screen space ray trace for sharp contact shadows. Zero is disabled. |
![]() ![]() ![]() ![]() |
uint32: 1 | ContactShadowLengthInWS | Where Length of screen space ray trace for sharp contact shadows is in world space units or in screen space units. |
![]() ![]() ![]() ![]() |
float | ContactShadowNonCastingIntensity | Intensity of the shadows cast by primitives with "cast contact shadow" disabled. |
![]() |
FRenderCommandFence | DestroyFence | Fence used to track progress of render resource destruction. |
![]() ![]() ![]() ![]() |
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. |
![]() ![]() ![]() ![]() |
float | IESBrightnessScale | Global scale for IES brightness contribution. |
![]() ![]() ![]() ![]() |
TObjectPtr< class UTextureLightProfile > | IESTexture | IES texture (light profiles from real world measured data) |
![]() ![]() ![]() ![]() |
float | LightFunctionFadeDistance | Distance at which the light function should be completely faded to DisabledBrightness. |
![]() ![]() ![]() ![]() |
TObjectPtr< class UMaterialInterface > | LightFunctionMaterial | The light function material to be applied to this light. |
![]() ![]() ![]() ![]() |
FVector | LightFunctionScale | Scales the light function projection. |
![]() ![]() ![]() ![]() |
FLightingChannels | LightingChannels | Channels that this light should affect. |
![]() ![]() ![]() |
float | MaxDistanceFadeRange | |
![]() ![]() ![]() |
float | MaxDrawDistance | |
![]() |
int32 | PreviewShadowMapChannel | Transient shadowmap channel used to preview the results of stationary light shadowmap packing. |
![]() ![]() ![]() ![]() |
float | RayStartOffsetDepthScale | Controls how large of an offset ray traced shadows have from the receiving surface as the camera gets further away. |
![]() |
FLightSceneProxy * | SceneProxy | The light's scene info. |
![]() ![]() ![]() ![]() |
float | ShadowBias | Controls how accurate self shadowing of whole scene shadows from this light are. |
![]() ![]() ![]() ![]() |
float | ShadowResolutionScale | Scales the resolution of shadowmaps used to shadow this light. |
![]() ![]() ![]() ![]() |
float | ShadowSharpen | Amount to sharpen shadow filtering |
![]() ![]() ![]() ![]() |
float | ShadowSlopeBias | Controls how accurate self shadowing of whole scene shadows from this light are. |
![]() ![]() ![]() ![]() |
float | SpecularScale | Multiplier on specular highlights. |
![]() ![]() ![]() |
TObjectPtr< class UMaterialInterface > | StashedLightFunctionMaterial | When clearing the light func, e.g. because the light is made static, this field remembers the last value |
![]() |
FStaticShadowDepthMap | StaticShadowDepthMap | |
![]() ![]() ![]() ![]() |
float | Temperature | Color temperature in Kelvin of the blackbody illuminant. White (D65) is 6500K. |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
ULightComponent
(
const FObjectInitializer& ObjectInitializer |
Updates/ resets light GUIDs. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
bool | AffectsBounds
(
const FBoxSphereBounds& InBounds |
Test whether the light affects the given bounding volume. |
![]() ![]() |
bool | AffectsPrimitive
(
const UPrimitiveComponent* Primitive |
Test whether this light affects the given primitive. |
![]() |
void | ApplyComponentInstanceData
(
FPrecomputedLightInstanceData* ComponentInstanceData |
|
![]() |
void | Set the light func to null, but remember the current value so it can be restored later | |
![]() ![]() ![]() |
float | Compute current light brightness based on whether there is a valid IES profile texture attached, and whether IES brightness is enabled | |
![]() ![]() ![]() |
FLightSceneProxy * | ||
![]() ![]() ![]() |
FLinearColor | ||
![]() ![]() ![]() |
uint8 | ||
![]() ![]() ![]() |
FBox | Return the world-space bounding box of the light's influence. | |
![]() ![]() ![]() |
FSphere | ||
![]() ![]() |
FLinearColor | ||
![]() ![]() |
FLinearColor | Get the color temperature in the working color space. | |
![]() ![]() |
FVector | GetDirection () |
Script interface to retrieve light direction. |
![]() ![]() |
const FLightComponentMapBuildData * | ||
![]() ![]() ![]() |
FLightmassLightSettings | ||
![]() ![]() ![]() |
FVector4 | Return the homogenous position of the light. | |
![]() ![]() ![]() |
ELightComponentType | GetLightType () |
|
![]() ![]() ![]() |
ELightUnits | ||
![]() ![]() ![]() |
UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
|
![]() ![]() ![]() |
int32 | ||
![]() ![]() ![]() |
float | ||
![]() |
void | ||
![]() ![]() |
bool | IsShadowCast
(
UPrimitiveComponent* Primitive |
Check whether a given primitive will cast shadows from this light. |
![]() ![]() ![]() |
bool | Whether to consider light as a sunlight for atmospheric scattering. | |
![]() |
void | Pushes new selection state to the render thread light proxy | |
![]() ![]() |
void | ReassignStationaryLightChannels
(
UWorld* TargetWorld, |
Iterates over ALL stationary light components in the target world and assigns their preview shadowmap channel, and updates light icons accordingly. |
![]() ![]() ![]() |
void | SetAffectTranslucentLighting
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetBloomMaxBrightness
(
float NewValue |
|
![]() ![]() ![]() |
void | SetBloomScale
(
float NewValue |
|
![]() ![]() ![]() |
void | SetBloomThreshold
(
float NewValue |
|
![]() ![]() ![]() |
void | SetBloomTint
(
FColor NewValue |
|
![]() ![]() ![]() |
void | SetEnableLightShaftBloom
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetForceCachedShadowsForMovablePrimitives
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetIESBrightnessScale
(
float NewValue |
|
![]() ![]() ![]() |
void | SetIESTexture
(
UTextureLightProfile* NewValue |
|
![]() ![]() ![]() |
void | SetIndirectLightingIntensity
(
float NewIntensity |
|
![]() ![]() ![]() |
void | SetIntensity
(
float NewIntensity |
Set intensity of the lightSet brightness of the light |
![]() ![]() |
void | SetLightBrightness
(
float InBrightness |
Set the Intensity using the brightness. The unit of brightness depends on the light type. |
![]() ![]() ![]() |
void | SetLightColor
(
FLinearColor NewLightColor, |
Set color of the light |
![]() ![]() ![]() |
void | SetLightFColor
(
FColor NewLightColor |
Set color of the light |
![]() ![]() ![]() |
void | SetLightFunctionDisabledBrightness
(
float NewValue |
|
![]() ![]() ![]() |
void | SetLightFunctionFadeDistance
(
float NewLightFunctionFadeDistance |
|
![]() ![]() ![]() |
void | SetLightFunctionMaterial
(
UMaterialInterface* NewLightFunctionMaterial |
|
![]() ![]() ![]() |
void | SetLightFunctionScale
(
FVector NewLightFunctionScale |
|
![]() ![]() ![]() |
void | SetLightingChannels
(
bool bChannel0, |
|
![]() ![]() |
void | SetMaterial
(
int32 ElementIndex, |
Set the MaterialInterface to use for the given element index (if valid) |
![]() ![]() ![]() |
void | SetShadowBias
(
float NewValue |
|
![]() ![]() ![]() |
void | SetShadowSlopeBias
(
float NewValue |
|
![]() ![]() ![]() |
void | SetSpecularScale
(
float NewValue |
|
![]() ![]() ![]() |
void | SetTemperature
(
float NewTemperature |
Set color temperature of the light |
![]() ![]() ![]() |
void | SetTransmission
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetUseIESBrightness
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetUseTemperature
(
bool bNewValue |
|
![]() ![]() ![]() |
void | SetVolumetricScatteringIntensity
(
float NewIntensity |
|
![]() |
void | Script interface to update the color and brightness on the render thread. |
Overridden from ULightComponentBase
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Update the texture used on the editor sprite |
Overridden from USceneComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
bool | GetMaterialPropertyPath
(
int32 ElementIndex, |
Returns full material property path and UObject owner property object Path examples: Material property path with array element and inner struct Materials[0].InnerStruct.Material Material property path with array element Materials[0] Simple material property path Materials |
![]() ![]() ![]() |
bool | True if our precomputed lighting is up to date | |
![]() ![]() |
void | Updates any visuals after the lighting has changed |
Overridden from UActorComponent
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component |
![]() ![]() |
void | Used to shut down any rendering thread structure for this component | |
![]() ![]() ![]() |
TStructOnScope< FActorComponentInstanceData > | Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation | |
![]() ![]() ![]() |
FBox | ||
![]() ![]() |
void | InvalidateLightingCacheDetailed
(
bool bInvalidateBuildEnqueuedLighting, |
Called when this actor component has moved, allowing it to discard statically cached lighting information. |
![]() ![]() |
void | OnRegister () |
UActorComponent Interface |
![]() ![]() |
void | Called to send a transform update for this component to the rendering thread |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
![]() ![]() ![]() |
bool | CanEditChange
(
const FProperty* InProperty |
Called by the editor to query whether a property of this object is allowed to be modified. |
![]() ![]() |
bool | Called to check if the object is ready for FinishDestroy. | |
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostLoad () |
Called after this UObject has been serialized |
![]() ![]() |
PRAGMA_ENABLE_DEPRECATION_WARNINGS void | PreSave
(
FObjectPreSaveContext ObjectSaveContext |
Presave function. |
![]() ![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS void | PreSave
(
const ITargetPlatform* TargetPlatform |
|
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |
Typedefs
Name | Description |
---|---|
FOnUpdateColorAndBrightness |
Constants
Name | Description |
---|---|
UpdateColorAndBrightnessEvent | Called When light color or brightness needs update |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
uint32: 1 | InverseSquaredFalloff_DEPRECATED | |
![]() ![]() |
float | MinRoughness_DEPRECATED | Min roughness effective for this light. Used for softening specular highlights. |
![]() ![]() |
int32 | ShadowMapChannel_DEPRECATED | Legacy shadowmap channel from the lighting build, now stored in FLightComponentMapBuildData. |