G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UDirectionalLightComponent Class Reference

A light component that has parallel rays. Will provide a uniform lighting across any affected surface (eg. The Sun). This will affect all objects in the defined light-mass importance volume. More...

Public Member Functions

Rendering|Lighting
void SetOcclusionMaskDarkness (float32 NewValue)
void SetAtmosphereSunLightIndex (int NewValue)
void SetCascadeDistributionExponent (float32 NewValue)
void SetCascadeTransitionFraction (float32 NewValue)
void SetDynamicShadowCascades (int NewValue)
void SetDynamicShadowDistanceMovableLight (float32 NewValue)
void SetDynamicShadowDistanceStationaryLight (float32 NewValue)
void SetEnableLightShaftOcclusion (bool bNewValue)
void SetForwardShadingPriority (int NewValue)
void SetLightShaftOverrideDirection (FVector NewValue)
void SetLightSourceAngle (float32 NewValue)
void SetLightSourceSoftAngle (float32 NewValue)
void SetOcclusionDepthRange (float32 NewValue)
void SetAtmosphereSunLight (bool bNewValue)
void SetShadowAmount (float32 NewValue)
void SetShadowCascadeBiasDistribution (float32 NewValue)
void SetShadowDistanceFadeoutFraction (float32 NewValue)
void SetShadowSourceAngleFactor (float32 NewValue)
Functions
const float32 & GetOcclusionDepthRange () const
 Everything closer to the camera than this distance will occlude light shafts.
bool GetbEnableLightShaftOcclusion () const
 Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.
void SetbEnableLightShaftOcclusion (bool Value)
 Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.
const float32 & GetOcclusionMaskDarkness () const
 Controls how dark the occlusion masking is, a value of 1 results in no darkening term.
const float32 & GetShadowCascadeBiasDistribution () const
 Controls the depth bias scaling across cascades. This allows to mitigage the shadow acne difference on shadow cascades transition. A value of 1 scales shadow bias based on each cascade size (Default). A value of 0 scales shadow bias uniformly accross all cacascade.
const FVector & GetLightShaftOverrideDirection () const
 Can be used to make light shafts come from somewhere other than the light's actual direction. This will only be used when non-zero. It does not have to be normalized.
const float32 & GetDynamicShadowDistanceMovableLight () const
 How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera. A value of 0 disables the dynamic shadow.
const float32 & GetDynamicShadowDistanceStationaryLight () const
 How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera. A value of 0 disables the dynamic shadow.
const int & GetDynamicShadowCascades () const
 Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost.
const float32 & GetCascadeDistributionExponent () const
 Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent). An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution.
const float32 & GetCascadeTransitionFraction () const
 Proportion of the fade region between cascades. Pixels within the fade region of two cascades have their shadows blended to avoid hard transitions between quality levels. A value of zero eliminates the fade region, creating hard transitions. Higher values increase the size of the fade region, creating a more gradual transition between cascades. The value is expressed as a percentage proportion (i.e. 0.1 = 10% overlap). Ideal values are the smallest possible which still hide the transition. An increased fade region size causes an increase in shadow rendering cost.
const float32 & GetShadowDistanceFadeoutFraction () const
 Controls the size of the fade out region at the far extent of the dynamic shadow's influence. This is specified as a fraction of DynamicShadowDistance.
bool GetbUseInsetShadowsForMovableObjects () const
 Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.
void SetbUseInsetShadowsForMovableObjects (bool Value)
 Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.
const int & GetForwardShadingPriority () const
 Forward lighting priority for the single directional light that will be used for forward shading, translucent, single layer water and volumetric fog. When two lights have equal priorities, the selection will be based on their overall brightness as a fallback.
const float32 & GetLightSourceAngle () const
 Angle subtended by light source in degrees (also known as angular diameter). Defaults to 0.5357 which is the angle for our sun.
const float32 & GetLightSourceSoftAngle () const
 Angle subtended by soft light source in degrees.
const float32 & GetShadowSourceAngleFactor () const
 Shadow source angle factor, relative to the light source angle. Defaults to 1.0 to coincide with light source angle.
bool GetbAtmosphereSunLight () const
 Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.
void SetbAtmosphereSunLight (bool Value)
 Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.
const int & GetAtmosphereSunLightIndex () const
 Two atmosphere lights are supported. For instance: a sun and a moon, or two suns.
bool GetbPerPixelAtmosphereTransmittance () const
 Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.
void SetbPerPixelAtmosphereTransmittance (bool Value)
 Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.
bool GetbCastShadowsOnClouds () const
 Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.
void SetbCastShadowsOnClouds (bool Value)
 Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.
bool GetbCastShadowsOnAtmosphere () const
 Whether the light should cast any shadows from opaque meshes onto the atmosphere.
void SetbCastShadowsOnAtmosphere (bool Value)
 Whether the light should cast any shadows from opaque meshes onto the atmosphere.
bool GetbCastCloudShadows () const
 Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.
void SetbCastCloudShadows (bool Value)
 Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.
bool GetbCastModulatedShadows () const
 Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.
void SetbCastModulatedShadows (bool Value)
 Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.
const float32 & GetShadowAmount () const
 Control the amount of shadow occlusion. A value of 0 means no occlusion, thus no shadow.
Public Member Functions inherited from ULightComponent
void SetLightFunctionMaterial (UMaterialInterface NewLightFunctionMaterial)
void SetBloomMaxBrightness (float32 NewValue)
void SetBloomScale (float32 NewValue)
void SetBloomThreshold (float32 NewValue)
void SetBloomTint (FColor NewValue)
void SetEnableLightShaftBloom (bool bNewValue)
void SetForceCachedShadowsForMovablePrimitives (bool bNewValue)
void SetIESBrightnessScale (float32 NewValue)
void SetIESTexture (UTextureLightProfile NewValue)
void SetIndirectLightingIntensity (float32 NewIntensity)
void SetIntensity (float32 NewIntensity)
 Set intensity of the light.
void SetLightColor (FLinearColor NewLightColor, bool bSRGB=true)
 Set color of the light.
void SetLightFunctionDisabledBrightness (float32 NewValue)
void SetLightFunctionFadeDistance (float32 NewLightFunctionFadeDistance)
void SetAffectTranslucentLighting (bool bNewValue)
void SetLightFunctionScale (FVector NewLightFunctionScale)
void SetLightingChannels (bool bChannel0, bool bChannel1, bool bChannel2)
void SetShadowBias (float32 NewValue)
void SetShadowSlopeBias (float32 NewValue)
void SetSpecularScale (float32 NewValue)
void SetTemperature (float32 NewTemperature)
void SetTransmission (bool bNewValue)
void SetUseIESBrightness (bool bNewValue)
void SetUseTemperature (bool bNewValue)
void SetVolumetricScatteringIntensity (float32 NewIntensity)
bool GetbUseTemperature () const
 false: use white (D65) as illuminant.
void SetbUseTemperature (bool Value)
 false: use white (D65) as illuminant.
const float32 & GetTemperature () const
 Color temperature in Kelvin of the blackbody illuminant. White (D65) is 6500K.
const float32 & GetSpecularScale () const
 Multiplier on specular highlights. Use only with great care! Any value besides 1 is not physical! Can be used to artistically remove highlights mimicking polarizing filters or photo touch up.
const float32 & GetShadowBias () const
 Controls how accurate self shadowing of whole scene shadows from this light are. At 0, shadows will start at the their caster surface, but there will be many self shadowing artifacts. larger values, shadows will start further from their caster, and there won't be self shadowing artifacts but object might appear to fly. around 0.5 seems to be a good tradeoff. This also affects the soft transition of shadows.
const float32 & GetShadowSlopeBias () const
 Controls how accurate self shadowing of whole scene shadows from this light are. This works in addition to shadow bias, by increasing the amount of bias depending on the slope of a surface. At 0, shadows will start at the their caster surface, but there will be many self shadowing artifacts. larger values, shadows will start further from their caster, and there won't be self shadowing artifacts but object might appear to fly. around 0.5 seems to be a good tradeoff. This also affects the soft transition of shadows.
bool GetContactShadowLengthInWS () const
 Where Length of screen space ray trace for sharp contact shadows is in world space units or in screen space units.
void SetContactShadowLengthInWS (bool Value)
 Where Length of screen space ray trace for sharp contact shadows is in world space units or in screen space units.
bool GetCastTranslucentShadows () const
 Whether the light is allowed to cast dynamic shadows from translucency.
void SetCastTranslucentShadows (bool Value)
 Whether the light is allowed to cast dynamic shadows from translucency.
bool GetbCastShadowsFromCinematicObjectsOnly () const
 Whether the light should only cast shadows from components marked as bCastCinematicShadows. This is useful for setting up cinematic Movable spotlights aimed at characters and avoiding the shadow depth rendering costs of the background. Note: this only works with dynamic shadow maps, not with static shadowing or Ray Traced Distance Field shadows.
void SetbCastShadowsFromCinematicObjectsOnly (bool Value)
 Whether the light should only cast shadows from components marked as bCastCinematicShadows. This is useful for setting up cinematic Movable spotlights aimed at characters and avoiding the shadow depth rendering costs of the background. Note: this only works with dynamic shadow maps, not with static shadowing or Ray Traced Distance Field shadows.
bool GetbForceCachedShadowsForMovablePrimitives () const
 Enables cached shadows for movable primitives for this light even if r.shadow.cachedshadowscastfrommovableprimitives is 0.
void SetbForceCachedShadowsForMovablePrimitives (bool Value)
 Enables cached shadows for movable primitives for this light even if r.shadow.cachedshadowscastfrommovableprimitives is 0.
const FLightingChannels & GetLightingChannels () const
 Channels that this light should affect. These channels only apply to opaque materials, direct lighting, and dynamic lighting and shadowing.
UMaterialInterface GetLightFunctionMaterial () const
 The light function material to be applied to this light. Note that only non-lightmapped lights (UseDirectLightMap=False) can have a light function. Light functions are supported within VolumetricFog, but only for Directional, Point and Spot lights. Rect lights are not supported.
const FVector & GetLightFunctionScale () const
 Scales the light function projection. X and Y scale in the directions perpendicular to the light's direction, Z scales along the light direction.
UTextureLightProfile GetIESTexture () const
 IES texture (light profiles from real world measured data).
bool GetbUseIESBrightness () const
 true: take light brightness from IES profile, false: use the light brightness - the maximum light in one direction is used to define no masking. Use with InverseSquareFalloff. Will be disabled if a valid IES profile texture is not supplied.
void SetbUseIESBrightness (bool Value)
 true: take light brightness from IES profile, false: use the light brightness - the maximum light in one direction is used to define no masking. Use with InverseSquareFalloff. Will be disabled if a valid IES profile texture is not supplied.
const float32 & GetIESBrightnessScale () const
 Global scale for IES brightness contribution. Only available when "Use IES Brightness" is selected, and a valid IES profile texture is set.
const float32 & GetLightFunctionFadeDistance () const
 Distance at which the light function should be completely faded to DisabledBrightness. This is useful for hiding aliasing from light functions applied in the distance.
bool GetbEnableLightShaftBloom () const
 Whether to render light shaft bloom from this light. For directional lights, the color around the light direction will be blurred radially and added back to the scene. for point lights, the color on pixels closer than the light's SourceRadius will be blurred radially and added back to the scene.
void SetbEnableLightShaftBloom (bool Value)
 Whether to render light shaft bloom from this light. For directional lights, the color around the light direction will be blurred radially and added back to the scene. for point lights, the color on pixels closer than the light's SourceRadius will be blurred radially and added back to the scene.
const float32 & GetBloomScale () const
 Scales the additive color.
const float32 & GetBloomThreshold () const
 Scene color must be larger than this to create bloom in the light shafts.
const float32 & GetBloomMaxBrightness () const
 After exposure is applied, scene color brightness larger than BloomMaxBrightness will be rescaled down to BloomMaxBrightness.
const FColor & GetBloomTint () const
 Multiplies against scene color to create the bloom color.
Public Member Functions inherited from ULightComponentBase
void SetSamplesPerPixel (int NewValue)
void SetAffectGlobalIllumination (bool bNewValue)
void SetAffectReflection (bool bNewValue)
void SetCastDeepShadow (bool bNewValue)
void SetCastRaytracedShadow (bool bNewValue)
void SetCastRaytracedShadows (ECastRayTracedShadow bNewValue)
void SetCastShadows (bool bNewValue)
 Sets whether this light casts shadows.
void SetCastVolumetricShadow (bool bNewValue)
FLinearColor GetLightColor () const
 Gets the light color as a linear color.
bool GetbAffectsWorld () const
 Whether the light can affect the world, or whether it is disabled. A disabled light will not contribute to the scene in any way. This setting cannot be changed at runtime and unbuilds lighting when changed. Setting this to false has the same effect as deleting the light, so it is useful for non-destructive experiments.
void SetbAffectsWorld (bool Value)
 Whether the light can affect the world, or whether it is disabled. A disabled light will not contribute to the scene in any way. This setting cannot be changed at runtime and unbuilds lighting when changed. Setting this to false has the same effect as deleting the light, so it is useful for non-destructive experiments.
bool GetCastShadows () const
 Whether the light should cast any shadows.
bool GetCastStaticShadows () const
 Whether the light should cast shadows from static objects. Also requires Cast Shadows to be set to True.
void SetCastStaticShadows (bool Value)
 Whether the light should cast shadows from static objects. Also requires Cast Shadows to be set to True.
bool GetCastDynamicShadows () const
 Whether the light should cast shadows from dynamic objects. Also requires Cast Shadows to be set to True.
void SetCastDynamicShadows (bool Value)
 Whether the light should cast shadows from dynamic objects. Also requires Cast Shadows to be set to True.
void SetLightColor (FColor Value)
 Filter color of the light. Note that this can change the light's effective intensity.
bool GetbAffectTranslucentLighting () const
 Whether the light affects translucency or not. Disabling this can save GPU time when there are many small lights.
void SetbAffectTranslucentLighting (bool Value)
 Whether the light affects translucency or not. Disabling this can save GPU time when there are many small lights.
bool GetbTransmission () const
 Whether light from this light transmits through surfaces with subsurface scattering profiles. Requires light to be movable.
void SetbTransmission (bool Value)
 Whether light from this light transmits through surfaces with subsurface scattering profiles. Requires light to be movable.
bool GetbCastVolumetricShadow () const
 Whether the light shadows volumetric fog. Disabling this can save GPU time.
void SetbCastVolumetricShadow (bool Value)
 Whether the light shadows volumetric fog. Disabling this can save GPU time.
bool GetbCastDeepShadow () const
 Whether the light should cast high quality hair-strands self-shadowing. When this option is enabled, an extra GPU cost for this light.
void SetbCastDeepShadow (bool Value)
 Whether the light should cast high quality hair-strands self-shadowing. When this option is enabled, an extra GPU cost for this light.
const ECastRayTracedShadow & GetCastRaytracedShadow () const
bool GetbAffectReflection () const
 Whether the light affects objects in reflections, when ray-traced reflection is enabled.
void SetbAffectReflection (bool Value)
 Whether the light affects objects in reflections, when ray-traced reflection is enabled.
bool GetbAffectGlobalIllumination () const
 Whether the light affects global illumination, when ray-traced global illumination is enabled.
void SetbAffectGlobalIllumination (bool Value)
 Whether the light affects global illumination, when ray-traced global illumination is enabled.
const int & GetSamplesPerPixel () const
 Samples per pixel for ray tracing.
Public Member Functions inherited from USceneComponent
void SetHiddenInGame (bool NewHidden, bool bPropagateToChildren=false)
 Changes the value of bHiddenInGame, if false this will disable Visibility during gameplay.
void SetRelativeLocation (FVector NewLocation)
bool GetShouldUpdatePhysicsVolume () const
 Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
USceneComponent GetChildComponentByClass (TSubclassOf< USceneComponent > ComponentClass)
void GetChildrenComponentsByClass (UClass ComponentClass, bool bIncludeAllDescendants, ?&OutChildren)
bool GetbShouldUpdatePhysicsVolume () const
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. See: GetPhysicsVolume().
void SetbShouldUpdatePhysicsVolume (bool bInShouldUpdatePhysicsVolume)
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. See: GetPhysicsVolume().
void AddLocalOffset (FVector DeltaLocation)
void AddLocalRotation (FRotator DeltaRotation)
void AddLocalRotation (FQuat DeltaRotation)
void AddLocalTransform (FTransform DeltaTransform)
void AddRelativeLocation (FVector DeltaLocation)
void AddRelativeRotation (FRotator DeltaRotation)
void AddRelativeRotation (FQuat DeltaRotation)
void AddWorldOffset (FVector DeltaLocation)
void AddWorldRotation (FRotator DeltaRotation)
void AddWorldRotation (FQuat DeltaRotation)
void AddWorldTransform (FTransform DeltaTransform)
void AttachToComponent (USceneComponent Parent, FName SocketName=NAME_None, EAttachmentRule AttachmentRule=EAttachmentRule ::SnapToTarget)
FBoxSphereBounds GetBounds () const
FQuat GetComponentQuat () const
FVector GetRelativeLocation () const
FRotator GetRelativeRotation () const
FVector GetRelativeScale3D () const
FVector GetShapeCenter () const
FQuat GetSocketQuaternion (FName SocketName)
bool IsAttachedTo (const USceneComponent CheckComponent) const
bool IsAttachedTo (const AActor CheckActor) const
void SetbVisualizeComponent (bool bVisualize)
void SetComponentQuat (FQuat NewRotation)
void SetShouldUpdatePhysicsVolume (bool bInShouldUpdatePhysicsVolume)
 Sets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
void SetRelativeLocationAndRotation (FVector NewLocation, FRotator NewRotation)
void SetRelativeLocationAndRotation (FVector NewLocation, FQuat NewRotation)
void SetRelativeRotation (FRotator NewRotation)
void SetRelativeRotation (FQuat NewRotation)
void SetRelativeTransform (FTransform NewTransform)
void SetWorldLocation (FVector NewLocation)
void SetWorldLocationAndRotation (FVector NewLocation, FRotator NewRotation)
void SetWorldLocationAndRotation (FVector NewLocation, FQuat NewRotation)
void SetWorldRotation (FRotator NewRotation)
void SetWorldRotation (FQuat NewRotation)
void SetWorldTransform (FTransform NewTransform)
bool GetbAbsoluteLocation () const
 If RelativeLocation should be considered relative to the world, rather than the parent.
void SetbAbsoluteLocation (bool Value)
 If RelativeLocation should be considered relative to the world, rather than the parent.
bool GetbAbsoluteRotation () const
 If RelativeRotation should be considered relative to the world, rather than the parent.
void SetbAbsoluteRotation (bool Value)
 If RelativeRotation should be considered relative to the world, rather than the parent.
bool GetbAbsoluteScale () const
 If RelativeScale3D should be considered relative to the world, rather than the parent.
void SetbAbsoluteScale (bool Value)
 If RelativeScale3D should be considered relative to the world, rather than the parent.
bool GetbVisible () const
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
void SetbVisible (bool Value)
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
bool GetbHiddenInGame () const
 Whether to hide the primitive in game, if the primitive is Visible.
void SetbHiddenInGame (bool Value)
 Whether to hide the primitive in game, if the primitive is Visible.
bool GetbUseAttachParentBound () const
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
void SetbUseAttachParentBound (bool Value)
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
const EComponentMobility & GetMobility () const
 How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.
void GetParentComponents (TArray< USceneComponent > &Parents) const
 Gets all attachment parent components up to and including the root component.
void GetChildrenComponents (bool bIncludeAllDescendants, TArray< USceneComponent > &Children) const
 Gets all components that are attached to this component, possibly recursively.
int GetNumChildrenComponents () const
 Gets the number of attached children components.
USceneComponent GetChildComponent (int ChildIndex) const
 Gets the attached child component at the specified location.
bool IsAnySimulatingPhysics () const
 Returns whether the specified body is currently using physics simulation.
bool IsSimulatingPhysics (FName BoneName=NAME_None) const
 Returns whether the specified body is currently using physics simulation.
APhysicsVolume GetPhysicsVolume () const
 Get the PhysicsVolume overlapping this component.
void SetVisibility (bool bNewVisibility, bool bPropagateToChildren=false)
 Set visibility of the component, if during game use this to turn on/off.
void ToggleVisibility (bool bPropagateToChildren=false)
 Toggle visibility of the component.
bool IsVisible () const
 Returns true if this component is visible in the current context.
TArray< FName > GetAllSocketNames () const
 Gets the names of all the sockets on the component.
USceneComponent GetAttachParent () const
 Get the SceneComponent we are attached to.
FTransform GetRelativeTransform () const
 Returns the transform of the component relative to its parent.
FVector GetRightVector () const
 Get the right (Y) unit direction vector from this component, in world space.
FVector GetForwardVector () const
 Get the forward (X) unit direction vector from this component, in world space.
FName GetAttachSocketName () const
 Get the socket we are attached to.
FVector GetComponentVelocity () const
 Get velocity of the component: either ComponentVelocity, or the velocity of the physics body if simulating physics.
FRotator GetSocketRotation (FName InSocketName) const
 Get world-space socket or bone FRotator rotation.
FTransform GetSocketTransform (FName InSocketName, ERelativeTransformSpace TransformSpace=ERelativeTransformSpace ::RTS_World) const
 Get world-space socket transform.
FVector GetUpVector () const
 Get the up (Z) unit direction vector from this component, in world space.
bool DoesSocketExist (FName InSocketName) const
 Return true if socket with the given name exists.
void DetachFromParent (bool bMaintainWorldPosition=false, bool bCallModify=true)
FVector GetSocketLocation (FName InSocketName) const
 Get world-space socket or bone location.
void AddLocalOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in its local reference frame.
void AddLocalRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in its local reference frame.
void AddLocalTransform (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in its local reference frame. Scale is unchanged.
void AddRelativeLocation (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the translation of the component relative to its parent.
void AddRelativeRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta the rotation of the component relative to its parent.
void AddWorldOffset (FVector DeltaLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the location of the component in world space.
void AddWorldRotation (FRotator DeltaRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the rotation of the component in world space.
void AddWorldTransform (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. Ignores scale and sets it to (1,1,1).
void AddWorldTransformKeepScale (FTransform DeltaTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Adds a delta to the transform of the component in world space. Scale is unchanged.
bool AttachTo (USceneComponent InParent, FName InSocketName=NAME_None, EAttachLocation AttachType=EAttachLocation ::KeepRelativeOffset, bool bWeldSimulatedBodies=true)
bool AttachToComponent (USceneComponent Parent, FName SocketName, EAttachmentRule LocationRule, EAttachmentRule RotationRule, EAttachmentRule ScaleRule, bool bWeldSimulatedBodies)
 Attach this component to another scene component, optionally at a named socket. It is valid to call this on components whether or not they have been Registered.
void DetachFromComponent (EDetachmentRule LocationRule=EDetachmentRule ::KeepRelative, EDetachmentRule RotationRule=EDetachmentRule ::KeepRelative, EDetachmentRule ScaleRule=EDetachmentRule ::KeepRelative, bool bCallModify=true)
 Detach this component from whatever it is attached to. Automatically unwelds components that are welded together (see AttachToComponent), though note that some effects of welding may not be undone.
FVector GetWorldLocation () const
 Return location of the component, in world space.
FRotator GetWorldRotation () const
 Returns rotation of the component, in world space.
FVector GetWorldScale () const
 Returns scale of the component, in world space.
FTransform GetWorldTransform () const
 Get the current component-to-world transform for this component.
void SetRelativeLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location of the component relative to its parent.
void SetRelativeLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the location and rotation of the component relative to its parent.
void SetRelativeRotation (FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the rotation of the component relative to its parent.
void SetRelativeTransform (FTransform NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component relative to its parent.
void SetWorldLocation (FVector NewLocation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Put this component at the specified location in world space. Updates relative location to achieve the final world location.
void SetWorldLocationAndRotation (FVector NewLocation, FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the relative location and rotation of the component to put it at the supplied pose in world space.
void SetWorldRotation (FRotator NewRotation, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Put this component at the specified rotation in world space. Updates relative rotation to achieve the final world rotation.
void SetWorldTransform (FTransform NewTransform, bool bSweep, FHitResult &SweepHitResult, bool bTeleport)
 Set the transform of the component in world space.
void ResetRelativeTransform ()
 Reset the transform of the component relative to its parent. Sets relative location to zero, relative rotation to no rotation, and Scale to 1.
void SetAbsolute (bool bNewAbsoluteLocation=false, bool bNewAbsoluteRotation=false, bool bNewAbsoluteScale=false)
 Set which parts of the relative transform should be relative to parent, and which should be relative to world.
void SetWorldScale3D (FVector NewScale)
 Set the relative scale of the component to put it at the supplied scale in world space.
void SetMobility (EComponentMobility NewMobility)
 Set how often this component is allowed to move during runtime. Causes a component re-register if the component is already registered.
void SetRelativeScale3D (FVector NewScale3D)
 Set the non-uniform scale of the component relative to its parent.
Public Member Functions inherited from UActorComponent
void Tick (float32 DeltaSeconds)
 Event called every frame if tick is enabled.
EComponentCreationMethod GetComponentCreationMethod () const
void SetbIsEditorOnly (bool Value)
void EndPlay (EEndPlayReason EndPlayReason)
 Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay.
void BeginPlay ()
 Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay.
void MarkRenderStateDirty ()
bool HasBegunPlay () const
void SetbTickInEditor (bool Value)
bool IsVisualizationComponent () const
void SetIsVisualizationComponent (bool Value)
void AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds)
 Event called every async physics tick if bAsyncPhysicsTickEnabled is true.
bool GetbReplicateUsingRegisteredSubObjectList () const
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
void SetbReplicateUsingRegisteredSubObjectList (bool Value)
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
bool GetbReplicates () const
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
void SetbReplicates (bool Value)
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
bool GetbAutoActivate () const
 Whether the component is activated at creation or must be explicitly activated.
void SetbAutoActivate (bool Value)
 Whether the component is activated at creation or must be explicitly activated.
void SetbEditableWhenInherited (bool Value)
 True if this component can be modified when it was inherited from a parent actor class.
void SetbCanEverAffectNavigation (bool Value)
 Whether this component can potentially influence navigation.
bool GetbIsEditorOnly () const
 If true, the component will be excluded from non-editor builds.
bool IsBeingDestroyed () const
 Returns whether the component is in the process of being destroyed.
void SetIsReplicated (bool ShouldReplicate)
 Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components).
void DestroyComponent (UObject Object)
 Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function.
bool ComponentHasTag (FName Tag) const
 See if this component contains the supplied tag.
AActor GetOwner () const
 Follow the Outer chain to get the AActor that 'Owns' this component.
void SetAutoActivate (bool bNewAutoActivate)
 Sets whether the component should be auto activate or not. Only safe during construction scripts.
bool IsActive () const
 Returns whether the component is active or not.
void ToggleActive ()
 Toggles the active state of the component.
void SetActive (bool bNewActive, bool bReset=false)
 Sets whether the component is active or not.
void Activate (bool bReset=false)
 Activates the SceneComponent, should be overridden by native child classes.
void Deactivate ()
 Deactivates the SceneComponent.
float32 GetComponentTickInterval () const
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
void AddTickPrerequisiteActor (AActor PrerequisiteActor)
 Make this component tick after PrerequisiteActor.
void AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Make this component tick after PrerequisiteComponent.
void RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent)
 Remove tick dependency on PrerequisiteComponent.
void SetTickableWhenPaused (bool bTickableWhenPaused)
 Sets whether this component can tick when paused.
bool IsComponentTickEnabled () const
 Returns whether this component has tick enabled or not.
void SetTickGroup (ETickingGroup NewTickGroup)
 Changes the ticking group for this component.
void RemoveTickPrerequisiteActor (AActor PrerequisiteActor)
 Remove tick dependency on PrerequisiteActor.
void SetComponentTickIntervalAndCooldown (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately.
void SetComponentTickInterval (float32 TickInterval)
 Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick.
void SetComponentTickEnabled (bool bEnabled)
 Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UDirectionalLightComponent Get (const AActor Actor, FName WithName=NAME_None)
static UDirectionalLightComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UDirectionalLightComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from ULightComponent
static ULightComponent Get (const AActor Actor, FName WithName=NAME_None)
static ULightComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static ULightComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from ULightComponentBase
static ULightComponentBase Get (const AActor Actor, FName WithName=NAME_None)
static ULightComponentBase GetOrCreate (AActor Actor, FName WithName=NAME_None)
static ULightComponentBase Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from USceneComponent
static USceneComponent Get (const AActor Actor, FName WithName=NAME_None)
static USceneComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static USceneComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UActorComponent
static UActorComponent Get (const AActor Actor, FName WithName=NAME_None)
static UActorComponent GetOrCreate (AActor Actor, FName WithName=NAME_None)
static UActorComponent Create (AActor Actor, FName WithName=NAME_None)
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Public Attributes

AtmosphereAndCloud
bool bCastShadowsOnAtmosphere
 Whether the light should cast any shadows from opaque meshes onto the atmosphere.
bool bCastShadowsOnClouds
 Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.
float32 CloudShadowDepthBias
 The bias applied to the shadow front depth of the volumetric cloud shadow map.
int AtmosphereSunLightIndex
 Two atmosphere lights are supported. For instance: a sun and a moon, or two suns.
FLinearColor AtmosphereSunDiskColorScale
 A color multiplied with the sun disk luminance.
float32 CloudShadowStrength
 The overall strength of the cloud shadow, higher value will block more light.
float32 CloudShadowOnAtmosphereStrength
 The strength of the shadow on atmosphere. Disabled when 0.
float32 CloudShadowOnSurfaceStrength
 The strength of the shadow on opaque and transparent meshes. Disabled when 0.
bool bPerPixelAtmosphereTransmittance
 Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.
float32 CloudShadowExtent
 The world space radius of the cloud shadow map around the camera in kilometers.
float32 CloudShadowMapResolutionScale
 Scale the cloud shadow map resolution, base resolution is 512. The resolution is still clamped to 'r.VolumetricCloud.ShadowMap.MaxResolution'.
float32 CloudShadowRaySampleCountScale
 Scale the shadow map tracing sample count. The sample count resolution is still clamped according to scalability setting to 'r.VolumetricCloud.ShadowMap.RaySampleMaxCount'.
FLinearColor CloudScatteredLuminanceScale
 Scales the lights contribution when scattered in cloud participating media. This can help counter balance the fact that our multiple scattering solution is only an approximation.
bool bAtmosphereSunLight
 Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.
bool bCastCloudShadows
 Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.
CascadedShadowMaps
float32 FarShadowDistance
 Distance at which the far shadow cascade should end. Far shadows will cover the range between 'Dynamic Shadow Distance' and this distance.
float32 CascadeTransitionFraction
 Proportion of the fade region between cascades. Pixels within the fade region of two cascades have their shadows blended to avoid hard transitions between quality levels. A value of zero eliminates the fade region, creating hard transitions. Higher values increase the size of the fade region, creating a more gradual transition between cascades. The value is expressed as a percentage proportion (i.e. 0.1 = 10% overlap). Ideal values are the smallest possible which still hide the transition. An increased fade region size causes an increase in shadow rendering cost.
float32 ShadowDistanceFadeoutFraction
 Controls the size of the fade out region at the far extent of the dynamic shadow's influence. This is specified as a fraction of DynamicShadowDistance.
bool bUseInsetShadowsForMovableObjects
 Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.
float32 DynamicShadowDistanceStationaryLight
 How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera. A value of 0 disables the dynamic shadow.
int DynamicShadowCascades
 Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost.
float32 CascadeDistributionExponent
 Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent). An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution.
int FarShadowCascadeCount
 0: no Far Shadow Cascades, otherwise the number of cascades between DynamicShadowDistance and FarShadowDistance that are covered by Far Shadow Cascades.
float32 DynamicShadowDistanceMovableLight
 How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera. A value of 0 disables the dynamic shadow.
DistanceFieldShadows
float32 TraceDistance
 Determines how far shadows can be cast, in world units. Larger values increase the shadowing cost.
float32 DistanceFieldShadowDistance
 Distance at which the ray traced shadow cascade should end. Distance field shadows will cover the range between 'Dynamic Shadow Distance' this distance.
Light
float32 ShadowCascadeBiasDistribution
 Controls the depth bias scaling across cascades. This allows to mitigage the shadow acne difference on shadow cascades transition. A value of 1 scales shadow bias based on each cascade size (Default). A value of 0 scales shadow bias uniformly accross all cacascade.
int ForwardShadingPriority
 Forward lighting priority for the single directional light that will be used for forward shading, translucent, single layer water and volumetric fog. When two lights have equal priorities, the selection will be based on their overall brightness as a fallback.
FColor ModulatedShadowColor
 Color to modulate against the scene color when rendering modulated shadows. (mobile only).
float32 LightSourceAngle
 Angle subtended by light source in degrees (also known as angular diameter). Defaults to 0.5357 which is the angle for our sun.
float32 LightSourceSoftAngle
 Angle subtended by soft light source in degrees.
float32 ShadowAmount
 Control the amount of shadow occlusion. A value of 0 means no occlusion, thus no shadow.
FLightmassDirectionalLightSettings LightmassSettings
 The Lightmass settings for this object.
bool bCastModulatedShadows
 Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.
LightShafts
bool bEnableLightShaftOcclusion
 Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.
float32 OcclusionMaskDarkness
 Controls how dark the occlusion masking is, a value of 1 results in no darkening term.
float32 OcclusionDepthRange
 Everything closer to the camera than this distance will occlude light shafts.
FVector LightShaftOverrideDirection
 Can be used to make light shafts come from somewhere other than the light's actual direction. This will only be used when non-zero. It does not have to be normalized.
RayTracing
float32 ShadowSourceAngleFactor
 Shadow source angle factor, relative to the light source angle. Defaults to 1.0 to coincide with light source angle.
Public Attributes inherited from ULightComponent
float32 RayStartOffsetDepthScale
 Controls how large of an offset ray traced shadows have from the receiving surface as the camera gets further away. This can be useful to hide self-shadowing artifacts from low resolution distance fields on huge static meshes.
bool bUseRayTracedDistanceFieldShadows
 Whether to use ray traced distance field area shadows. The project setting bGenerateMeshDistanceFields must be enabled for this to have effect. Distance field shadows support area lights so they create soft shadows with sharp contacts. They have less aliasing artifacts than standard shadowmaps, but inherit all the limitations of distance field representations (only uniform scale, no deformation). These shadows have a low per-object cost (and don't depend on triangle count) so they are effective for distant shadows from a dynamic sun.
float32 ShadowSharpen
 Amount to sharpen shadow filtering.
float32 ContactShadowLength
 Length of screen space ray trace for sharp contact shadows. Zero is disabled.
float32 ContactShadowCastingIntensity
 Intensity of the shadows cast by primitives with "cast contact shadow" enabled. 0 = no shadow, 1 (default) = fully shadowed.
float32 ContactShadowNonCastingIntensity
 Intensity of the shadows cast by primitives with "cast contact shadow" disabled. 0 (default) = no shadow, 1 = fully shadowed.
float32 ShadowResolutionScale
 Scales the resolution of shadowmaps used to shadow this light. By default shadowmap resolution is chosen based on screen size of the caster. Setting the scale to zero disables shadow maps, but does not disable, e.g., contact shadows. Note: shadowmap resolution is still clamped by 'r.Shadow.MaxResolution'.
bool ContactShadowLengthInWS
 Where Length of screen space ray trace for sharp contact shadows is in world space units or in screen space units.
const FLightingChannels LightingChannels
 Channels that this light should affect. These channels only apply to opaque materials, direct lighting, and dynamic lighting and shadowing.
float32 Temperature
 Color temperature in Kelvin of the blackbody illuminant. White (D65) is 6500K.
bool bUseTemperature
 false: use white (D65) as illuminant.
float32 SpecularScale
 Multiplier on specular highlights. Use only with great care! Any value besides 1 is not physical! Can be used to artistically remove highlights mimicking polarizing filters or photo touch up.
float32 ShadowBias
 Controls how accurate self shadowing of whole scene shadows from this light are. At 0, shadows will start at the their caster surface, but there will be many self shadowing artifacts. larger values, shadows will start further from their caster, and there won't be self shadowing artifacts but object might appear to fly. around 0.5 seems to be a good tradeoff. This also affects the soft transition of shadows.
float32 ShadowSlopeBias
 Controls how accurate self shadowing of whole scene shadows from this light are. This works in addition to shadow bias, by increasing the amount of bias depending on the slope of a surface. At 0, shadows will start at the their caster surface, but there will be many self shadowing artifacts. larger values, shadows will start further from their caster, and there won't be self shadowing artifacts but object might appear to fly. around 0.5 seems to be a good tradeoff. This also affects the soft transition of shadows.
bool bForceCachedShadowsForMovablePrimitives
 Enables cached shadows for movable primitives for this light even if r.shadow.cachedshadowscastfrommovableprimitives is 0.
bool CastTranslucentShadows
 Whether the light is allowed to cast dynamic shadows from translucency.
bool bCastShadowsFromCinematicObjectsOnly
 Whether the light should only cast shadows from components marked as bCastCinematicShadows. This is useful for setting up cinematic Movable spotlights aimed at characters and avoiding the shadow depth rendering costs of the background. Note: this only works with dynamic shadow maps, not with static shadowing or Ray Traced Distance Field shadows.
UMaterialInterface LightFunctionMaterial
 The light function material to be applied to this light. Note that only non-lightmapped lights (UseDirectLightMap=False) can have a light function. Light functions are supported within VolumetricFog, but only for Directional, Point and Spot lights. Rect lights are not supported.
float32 DisabledBrightness
 Brightness factor applied to the light when the light function is specified but disabled, for example in scene captures that use SceneCapView_LitNoShadows. This should be set to the average brightness of the light function material's emissive input, which should be between 0 and 1.
float32 LightFunctionFadeDistance
 Distance at which the light function should be completely faded to DisabledBrightness. This is useful for hiding aliasing from light functions applied in the distance.
FVector LightFunctionScale
 Scales the light function projection. X and Y scale in the directions perpendicular to the light's direction, Z scales along the light direction.
float32 IESBrightnessScale
 Global scale for IES brightness contribution. Only available when "Use IES Brightness" is selected, and a valid IES profile texture is set.
UTextureLightProfile IESTexture
 IES texture (light profiles from real world measured data).
bool 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. Use with InverseSquareFalloff. Will be disabled if a valid IES profile texture is not supplied.
float32 BloomMaxBrightness
 After exposure is applied, scene color brightness larger than BloomMaxBrightness will be rescaled down to BloomMaxBrightness.
bool bEnableLightShaftBloom
 Whether to render light shaft bloom from this light. For directional lights, the color around the light direction will be blurred radially and added back to the scene. for point lights, the color on pixels closer than the light's SourceRadius will be blurred radially and added back to the scene.
float32 BloomScale
 Scales the additive color.
float32 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.
float32 MaxDistanceFadeRange
float32 MaxDrawDistance
Public Attributes inherited from ULightComponentBase
bool CastDynamicShadows
 Whether the light should cast shadows from dynamic objects. Also requires Cast Shadows to be set to True.
float32 DeepShadowLayerDistribution
 Change the deep shadow layers distribution 0:linear distribution (uniform layer distribution), 1:exponential (more details on near small details).
float32 IndirectLightingIntensity
 Scales the indirect lighting contribution from this light. A value of 0 disables any GI from this light. Default is 1.
float32 VolumetricScatteringIntensity
 Intensity of the volumetric scattering from this light. This scales Intensity and LightColor.
FLinearColor LightColor
 Filter color of the light. Note that this can change the light's effective intensity.
bool bAffectsWorld
 Whether the light can affect the world, or whether it is disabled. A disabled light will not contribute to the scene in any way. This setting cannot be changed at runtime and unbuilds lighting when changed. Setting this to false has the same effect as deleting the light, so it is useful for non-destructive experiments.
bool CastShadows
 Whether the light should cast any shadows.
bool CastStaticShadows
 Whether the light should cast shadows from static objects. Also requires Cast Shadows to be set to True.
float32 Intensity
 Total energy that the light emits.
bool bAffectTranslucentLighting
 Whether the light affects translucency or not. Disabling this can save GPU time when there are many small lights.
bool bTransmission
 Whether light from this light transmits through surfaces with subsurface scattering profiles. Requires light to be movable.
bool bCastVolumetricShadow
 Whether the light shadows volumetric fog. Disabling this can save GPU time.
bool bCastDeepShadow
 Whether the light should cast high quality hair-strands self-shadowing. When this option is enabled, an extra GPU cost for this light.
ECastRayTracedShadow CastRaytracedShadow
bool bAffectReflection
 Whether the light affects objects in reflections, when ray-traced reflection is enabled.
bool bAffectGlobalIllumination
 Whether the light affects global illumination, when ray-traced global illumination is enabled.
int SamplesPerPixel
 Samples per pixel for ray tracing.
Public Attributes inherited from USceneComponent
EDetailMode DetailMode
 If detail mode is >= system detail mode, primitive won't be rendered.
EComponentMobility Mobility
 How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.
FVector RelativeLocation
 Location of the component relative to its parent.
bool bAbsoluteRotation
 If RelativeRotation should be considered relative to the world, rather than the parent.
bool bAbsoluteLocation
 If RelativeLocation should be considered relative to the world, rather than the parent.
bool bAbsoluteScale
 If RelativeScale3D should be considered relative to the world, rather than the parent.
FRotator RelativeRotation
 Rotation of the component relative to its parent.
FVector RelativeScale3D
 Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc).
FVector WorldLocation
const FBoxSphereBounds Bounds
const USceneComponent AttachParent
 What we are currently attached to. If valid, RelativeLocation etc. are used relative to this object.
FRotator WorldRotation
const FVector ShapeCenter
FQuat ComponentQuat
bool ShouldUpdatePhysicsVolume
 Gets whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved.
const APhysicsVolume PhysicsVolume
 Physics Volume in which this SceneComponent is located *.
const FVector ComponentVelocity
 Velocity of the component. @see GetComponentVelocity().
const FName AttachSocketName
 Optional socket name on AttachParent that we are attached to.
FTransform WorldTransform
const FVector WorldScale
const int NumChildrenComponents
 Gets the number of attached children components.
bool bShouldUpdatePhysicsVolume
 Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. @see GetPhysicsVolume().
FPhysicsVolumeChanged PhysicsVolumeChangedDelegate
 Delegate that will be called when PhysicsVolume has been changed *.
bool bUseAttachParentBound
 If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.
bool bVisible
 Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.
bool bHiddenInGame
 Whether to hide the primitive in game, if the primitive is Visible.
const FVector ForwardVector
 Get the forward (X) unit direction vector from this component, in world space.
const FVector UpVector
 Get the up (Z) unit direction vector from this component, in world space.
FTransform RelativeTransform
 Returns the transform of the component relative to its parent.
const FVector RightVector
 Get the right (Y) unit direction vector from this component, in world space.
const TArray< FName > AllSocketNames
 Gets the names of all the sockets on the component.
Public Attributes inherited from UActorComponent
bool bAutoActivate
 Whether the component is activated at creation or must be explicitly activated.
TArray< TObjectPtr< UAssetUserData > > AssetUserData
 Array of user data stored with the component.
TArray< TObjectPtr< UAssetUserData > > AssetUserDataEditorOnly
 Array of user data stored with the component.
bool bReplicates
 Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!
FActorComponentTickFunction PrimaryComponentTick
 Main tick function for the Component.
bool bIsEditorOnly
 If true, the component will be excluded from non-editor builds.
bool bReplicateUsingRegisteredSubObjectList
 When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.
TArray< FName > ComponentTags
 Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.
const EComponentCreationMethod ComponentCreationMethod
const AActor Owner
 Follow the Outer chain to get the AActor that 'Owns' this component.
FActorComponentDeactivateSignature OnComponentDeactivated
 Called when the component has been deactivated.
FActorComponentActivatedSignature OnComponentActivated
 Called when the component has been activated, with parameter indicating if it was from a reset.
float32 ComponentTickInterval
 Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed.
Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

A light component that has parallel rays. Will provide a uniform lighting across any affected surface (eg. The Sun). This will affect all objects in the defined light-mass importance volume.

Member Function Documentation

◆ Create()

UDirectionalLightComponent Create ( AActor Actor,
FName WithName = NAME_None )
static

◆ Get()

UDirectionalLightComponent Get ( const AActor Actor,
FName WithName = NAME_None )
static

◆ GetAtmosphereSunLightIndex()

const int & GetAtmosphereSunLightIndex ( ) const

Two atmosphere lights are supported. For instance: a sun and a moon, or two suns.

◆ GetbAtmosphereSunLight()

bool GetbAtmosphereSunLight ( ) const

Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.

◆ GetbCastCloudShadows()

bool GetbCastCloudShadows ( ) const

Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.

◆ GetbCastModulatedShadows()

bool GetbCastModulatedShadows ( ) const

Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.

◆ GetbCastShadowsOnAtmosphere()

bool GetbCastShadowsOnAtmosphere ( ) const

Whether the light should cast any shadows from opaque meshes onto the atmosphere.

◆ GetbCastShadowsOnClouds()

bool GetbCastShadowsOnClouds ( ) const

Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.

◆ GetbEnableLightShaftOcclusion()

bool GetbEnableLightShaftOcclusion ( ) const

Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.

◆ GetbPerPixelAtmosphereTransmittance()

bool GetbPerPixelAtmosphereTransmittance ( ) const

Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.

◆ GetbUseInsetShadowsForMovableObjects()

bool GetbUseInsetShadowsForMovableObjects ( ) const

Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.

◆ GetCascadeDistributionExponent()

const float32 & GetCascadeDistributionExponent ( ) const

Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent). An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution.

◆ GetCascadeTransitionFraction()

const float32 & GetCascadeTransitionFraction ( ) const

Proportion of the fade region between cascades. Pixels within the fade region of two cascades have their shadows blended to avoid hard transitions between quality levels. A value of zero eliminates the fade region, creating hard transitions. Higher values increase the size of the fade region, creating a more gradual transition between cascades. The value is expressed as a percentage proportion (i.e. 0.1 = 10% overlap). Ideal values are the smallest possible which still hide the transition. An increased fade region size causes an increase in shadow rendering cost.

◆ GetDynamicShadowCascades()

const int & GetDynamicShadowCascades ( ) const

Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost.

◆ GetDynamicShadowDistanceMovableLight()

const float32 & GetDynamicShadowDistanceMovableLight ( ) const

How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera. A value of 0 disables the dynamic shadow.

◆ GetDynamicShadowDistanceStationaryLight()

const float32 & GetDynamicShadowDistanceStationaryLight ( ) const

How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera. A value of 0 disables the dynamic shadow.

◆ GetForwardShadingPriority()

const int & GetForwardShadingPriority ( ) const

Forward lighting priority for the single directional light that will be used for forward shading, translucent, single layer water and volumetric fog. When two lights have equal priorities, the selection will be based on their overall brightness as a fallback.

◆ GetLightShaftOverrideDirection()

const FVector & GetLightShaftOverrideDirection ( ) const

Can be used to make light shafts come from somewhere other than the light's actual direction. This will only be used when non-zero. It does not have to be normalized.

◆ GetLightSourceAngle()

const float32 & GetLightSourceAngle ( ) const

Angle subtended by light source in degrees (also known as angular diameter). Defaults to 0.5357 which is the angle for our sun.

◆ GetLightSourceSoftAngle()

const float32 & GetLightSourceSoftAngle ( ) const

Angle subtended by soft light source in degrees.

◆ GetOcclusionDepthRange()

const float32 & GetOcclusionDepthRange ( ) const

Everything closer to the camera than this distance will occlude light shafts.

◆ GetOcclusionMaskDarkness()

const float32 & GetOcclusionMaskDarkness ( ) const

Controls how dark the occlusion masking is, a value of 1 results in no darkening term.

◆ GetOrCreate()

UDirectionalLightComponent GetOrCreate ( AActor Actor,
FName WithName = NAME_None )
static

◆ GetShadowAmount()

const float32 & GetShadowAmount ( ) const

Control the amount of shadow occlusion. A value of 0 means no occlusion, thus no shadow.

◆ GetShadowCascadeBiasDistribution()

const float32 & GetShadowCascadeBiasDistribution ( ) const

Controls the depth bias scaling across cascades. This allows to mitigage the shadow acne difference on shadow cascades transition. A value of 1 scales shadow bias based on each cascade size (Default). A value of 0 scales shadow bias uniformly accross all cacascade.

◆ GetShadowDistanceFadeoutFraction()

const float32 & GetShadowDistanceFadeoutFraction ( ) const

Controls the size of the fade out region at the far extent of the dynamic shadow's influence. This is specified as a fraction of DynamicShadowDistance.

◆ GetShadowSourceAngleFactor()

const float32 & GetShadowSourceAngleFactor ( ) const

Shadow source angle factor, relative to the light source angle. Defaults to 1.0 to coincide with light source angle.

◆ SetAtmosphereSunLight()

void SetAtmosphereSunLight ( bool bNewValue)

◆ SetAtmosphereSunLightIndex()

void SetAtmosphereSunLightIndex ( int NewValue)

◆ SetbAtmosphereSunLight()

void SetbAtmosphereSunLight ( bool Value)

Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.

◆ SetbCastCloudShadows()

void SetbCastCloudShadows ( bool Value)

Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.

◆ SetbCastModulatedShadows()

void SetbCastModulatedShadows ( bool Value)

Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.

◆ SetbCastShadowsOnAtmosphere()

void SetbCastShadowsOnAtmosphere ( bool Value)

Whether the light should cast any shadows from opaque meshes onto the atmosphere.

◆ SetbCastShadowsOnClouds()

void SetbCastShadowsOnClouds ( bool Value)

Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.

◆ SetbEnableLightShaftOcclusion()

void SetbEnableLightShaftOcclusion ( bool Value)

Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.

◆ SetbPerPixelAtmosphereTransmittance()

void SetbPerPixelAtmosphereTransmittance ( bool Value)

Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.

◆ SetbUseInsetShadowsForMovableObjects()

void SetbUseInsetShadowsForMovableObjects ( bool Value)

Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.

◆ SetCascadeDistributionExponent()

void SetCascadeDistributionExponent ( float32 NewValue)

◆ SetCascadeTransitionFraction()

void SetCascadeTransitionFraction ( float32 NewValue)

◆ SetDynamicShadowCascades()

void SetDynamicShadowCascades ( int NewValue)

◆ SetDynamicShadowDistanceMovableLight()

void SetDynamicShadowDistanceMovableLight ( float32 NewValue)

◆ SetDynamicShadowDistanceStationaryLight()

void SetDynamicShadowDistanceStationaryLight ( float32 NewValue)

◆ SetEnableLightShaftOcclusion()

void SetEnableLightShaftOcclusion ( bool bNewValue)

◆ SetForwardShadingPriority()

void SetForwardShadingPriority ( int NewValue)

◆ SetLightShaftOverrideDirection()

void SetLightShaftOverrideDirection ( FVector NewValue)

◆ SetLightSourceAngle()

void SetLightSourceAngle ( float32 NewValue)

◆ SetLightSourceSoftAngle()

void SetLightSourceSoftAngle ( float32 NewValue)

◆ SetOcclusionDepthRange()

void SetOcclusionDepthRange ( float32 NewValue)

◆ SetOcclusionMaskDarkness()

void SetOcclusionMaskDarkness ( float32 NewValue)

◆ SetShadowAmount()

void SetShadowAmount ( float32 NewValue)

◆ SetShadowCascadeBiasDistribution()

void SetShadowCascadeBiasDistribution ( float32 NewValue)

◆ SetShadowDistanceFadeoutFraction()

void SetShadowDistanceFadeoutFraction ( float32 NewValue)

◆ SetShadowSourceAngleFactor()

void SetShadowSourceAngleFactor ( float32 NewValue)

◆ StaticClass()

UClass StaticClass ( )
static

Member Data Documentation

◆ AtmosphereSunDiskColorScale

FLinearColor AtmosphereSunDiskColorScale

A color multiplied with the sun disk luminance.

◆ AtmosphereSunLightIndex

int AtmosphereSunLightIndex

Two atmosphere lights are supported. For instance: a sun and a moon, or two suns.

◆ bAtmosphereSunLight

bool bAtmosphereSunLight

Whether the directional light can interact with the atmosphere, cloud and generate a visual disk. All of which compose the visual sky.

◆ bCastCloudShadows

bool bCastCloudShadows

Whether the light should cast any shadows from clouds onto the atmosphere and other scene elements.

◆ bCastModulatedShadows

bool bCastModulatedShadows

Whether the light should cast modulated shadows from dynamic objects (mobile only). Also requires Cast Shadows to be set to True.

◆ bCastShadowsOnAtmosphere

bool bCastShadowsOnAtmosphere

Whether the light should cast any shadows from opaque meshes onto the atmosphere.

◆ bCastShadowsOnClouds

bool bCastShadowsOnClouds

Whether the light should cast any shadows from opaque meshes onto clouds. This is disabled when 'Atmosphere Sun Light Index' is set to 1.

◆ bEnableLightShaftOcclusion

bool bEnableLightShaftOcclusion

Whether to occlude fog and atmosphere inscattering with screenspace blurred occlusion from this light.

◆ bPerPixelAtmosphereTransmittance

bool bPerPixelAtmosphereTransmittance

Whether to apply atmosphere transmittance per pixel on opaque meshes, instead of using the light global transmittance. Note: VolumetricCloud per pixel transmittance option is selectable on the VolumetricCloud component itself.

◆ bUseInsetShadowsForMovableObjects

bool bUseInsetShadowsForMovableObjects

Stationary lights only: Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. This allows dynamic objects to have a shadow even when they are outside of the cascaded shadow map, which is important when DynamicShadowDistanceStationaryLight is small. If DynamicShadowDistanceStationaryLight is large (currently > 8000), this will be forced off. Disabling this can reduce shadowing cost significantly with many movable objects.

◆ CascadeDistributionExponent

float32 CascadeDistributionExponent

Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent). An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution.

◆ CascadeTransitionFraction

float32 CascadeTransitionFraction

Proportion of the fade region between cascades. Pixels within the fade region of two cascades have their shadows blended to avoid hard transitions between quality levels. A value of zero eliminates the fade region, creating hard transitions. Higher values increase the size of the fade region, creating a more gradual transition between cascades. The value is expressed as a percentage proportion (i.e. 0.1 = 10% overlap). Ideal values are the smallest possible which still hide the transition. An increased fade region size causes an increase in shadow rendering cost.

◆ CloudScatteredLuminanceScale

FLinearColor CloudScatteredLuminanceScale

Scales the lights contribution when scattered in cloud participating media. This can help counter balance the fact that our multiple scattering solution is only an approximation.

◆ CloudShadowDepthBias

float32 CloudShadowDepthBias

The bias applied to the shadow front depth of the volumetric cloud shadow map.

◆ CloudShadowExtent

float32 CloudShadowExtent

The world space radius of the cloud shadow map around the camera in kilometers.

◆ CloudShadowMapResolutionScale

float32 CloudShadowMapResolutionScale

Scale the cloud shadow map resolution, base resolution is 512. The resolution is still clamped to 'r.VolumetricCloud.ShadowMap.MaxResolution'.

◆ CloudShadowOnAtmosphereStrength

float32 CloudShadowOnAtmosphereStrength

The strength of the shadow on atmosphere. Disabled when 0.

◆ CloudShadowOnSurfaceStrength

float32 CloudShadowOnSurfaceStrength

The strength of the shadow on opaque and transparent meshes. Disabled when 0.

◆ CloudShadowRaySampleCountScale

float32 CloudShadowRaySampleCountScale

Scale the shadow map tracing sample count. The sample count resolution is still clamped according to scalability setting to 'r.VolumetricCloud.ShadowMap.RaySampleMaxCount'.

◆ CloudShadowStrength

float32 CloudShadowStrength

The overall strength of the cloud shadow, higher value will block more light.

◆ DistanceFieldShadowDistance

float32 DistanceFieldShadowDistance

Distance at which the ray traced shadow cascade should end. Distance field shadows will cover the range between 'Dynamic Shadow Distance' this distance.

◆ DynamicShadowCascades

int DynamicShadowCascades

Number of cascades to split the view frustum into for the whole scene dynamic shadow. More cascades result in better shadow resolution, but adds significant rendering cost.

◆ DynamicShadowDistanceMovableLight

float32 DynamicShadowDistanceMovableLight

How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera. A value of 0 disables the dynamic shadow.

◆ DynamicShadowDistanceStationaryLight

float32 DynamicShadowDistanceStationaryLight

How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera. A value of 0 disables the dynamic shadow.

◆ FarShadowCascadeCount

int FarShadowCascadeCount

0: no Far Shadow Cascades, otherwise the number of cascades between DynamicShadowDistance and FarShadowDistance that are covered by Far Shadow Cascades.

◆ FarShadowDistance

float32 FarShadowDistance

Distance at which the far shadow cascade should end. Far shadows will cover the range between 'Dynamic Shadow Distance' and this distance.

◆ ForwardShadingPriority

int ForwardShadingPriority

Forward lighting priority for the single directional light that will be used for forward shading, translucent, single layer water and volumetric fog. When two lights have equal priorities, the selection will be based on their overall brightness as a fallback.

◆ LightmassSettings

The Lightmass settings for this object.

◆ LightShaftOverrideDirection

FVector LightShaftOverrideDirection

Can be used to make light shafts come from somewhere other than the light's actual direction. This will only be used when non-zero. It does not have to be normalized.

◆ LightSourceAngle

float32 LightSourceAngle

Angle subtended by light source in degrees (also known as angular diameter). Defaults to 0.5357 which is the angle for our sun.

◆ LightSourceSoftAngle

float32 LightSourceSoftAngle

Angle subtended by soft light source in degrees.

◆ ModulatedShadowColor

FColor ModulatedShadowColor

Color to modulate against the scene color when rendering modulated shadows. (mobile only).

◆ OcclusionDepthRange

float32 OcclusionDepthRange

Everything closer to the camera than this distance will occlude light shafts.

◆ OcclusionMaskDarkness

float32 OcclusionMaskDarkness

Controls how dark the occlusion masking is, a value of 1 results in no darkening term.

◆ ShadowAmount

float32 ShadowAmount

Control the amount of shadow occlusion. A value of 0 means no occlusion, thus no shadow.

◆ ShadowCascadeBiasDistribution

float32 ShadowCascadeBiasDistribution

Controls the depth bias scaling across cascades. This allows to mitigage the shadow acne difference on shadow cascades transition. A value of 1 scales shadow bias based on each cascade size (Default). A value of 0 scales shadow bias uniformly accross all cacascade.

◆ ShadowDistanceFadeoutFraction

float32 ShadowDistanceFadeoutFraction

Controls the size of the fade out region at the far extent of the dynamic shadow's influence. This is specified as a fraction of DynamicShadowDistance.

◆ ShadowSourceAngleFactor

float32 ShadowSourceAngleFactor

Shadow source angle factor, relative to the light source angle. Defaults to 1.0 to coincide with light source angle.

◆ TraceDistance

float32 TraceDistance

Determines how far shadows can be cast, in world units. Larger values increase the shadowing cost.