Class DirectionalLightComponent
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.
Inheritance
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class DirectionalLightComponent : LightComponent
Properties
| Improve this Doc View SourcebCastModulatedShadows
Declaration
public bool bCastModulatedShadows { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
bEnableLightShaftOcclusion
Declaration
public bool bEnableLightShaftOcclusion { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
bUsedAsAtmosphereSunLight
Declaration
public bool bUsedAsAtmosphereSunLight { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
bUseInsetShadowsForMovableObjects
Declaration
public bool bUseInsetShadowsForMovableObjects { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CascadeDistributionExponent
Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent).
Declaration
public float CascadeDistributionExponent { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution.
CascadeTransitionFraction
Proportion of the fade region between cascades.
Declaration
public float CascadeTransitionFraction { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
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.
DefaultObject
Get UE4 Default Object for this Class
Declaration
public static DirectionalLightComponent DefaultObject { get; }
Property Value
Type | Description |
---|---|
DirectionalLightComponent |
DistanceFieldShadowDistance
Distance at which the ray traced shadow cascade should end. Distance field shadows will cover the range between 'Dynamic Shadow Distance' this distance.
Declaration
public float DistanceFieldShadowDistance { get; }
Property Value
Type | Description |
---|---|
System.Single |
DynamicShadowCascades
Number of cascades to split the view frustum into for the whole scene dynamic shadow.
Declaration
public int DynamicShadowCascades { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
More cascades result in better shadow resolution, but adds significant rendering cost.
DynamicShadowDistanceMovableLight
How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera.
Declaration
public float DynamicShadowDistanceMovableLight { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
A value of 0 disables the dynamic shadow.
DynamicShadowDistanceStationaryLight
How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera.
Declaration
public float DynamicShadowDistanceStationaryLight { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
A value of 0 disables the dynamic shadow.
FarShadowCascadeCount
0: no DistantShadowCascades, otherwise the count of cascades between WholeSceneDynamicShadowRadius and DistantShadowDistance that are covered by distant shadow cascades.
Declaration
public int FarShadowCascadeCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
FarShadowDistance
Distance at which the far shadow cascade should end. Far shadows will cover the range between 'Dynamic Shadow Distance' and this distance.
Declaration
public float FarShadowDistance { get; }
Property Value
Type | Description |
---|---|
System.Single |
LightmassSettings
The Lightmass settings for this object.
Declaration
public LightmassDirectionalLightSettings LightmassSettings { get; set; }
Property Value
Type | Description |
---|---|
LightmassDirectionalLightSettings |
LightShaftOverrideDirection
Can be used to make light shafts come from somewhere other than the light's actual direction.
Declaration
public Vector LightShaftOverrideDirection { get; }
Property Value
Type | Description |
---|---|
Vector |
Remarks
This will only be used when non-zero. It does not have to be normalized.
LightSourceAngle
Angle subtended by light source in degrees (also known as angular diameter).
Declaration
public float LightSourceAngle { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Defaults to 0.5357 which is the angle for our sun.
LightSourceSoftAngle
Angle subtended by soft light source in degrees.
Declaration
public float LightSourceSoftAngle { get; }
Property Value
Type | Description |
---|---|
System.Single |
ModulatedShadowColor
Color to modulate against the scene color when rendering modulated shadows. (mobile only)
Declaration
public Color ModulatedShadowColor { get; }
Property Value
Type | Description |
---|---|
Color |
OcclusionDepthRange
Everything closer to the camera than this distance will occlude light shafts.
Declaration
public float OcclusionDepthRange { get; }
Property Value
Type | Description |
---|---|
System.Single |
OcclusionMaskDarkness
Controls how dark the occlusion masking is, a value of 1 results in no darkening term.
Declaration
public float OcclusionMaskDarkness { get; }
Property Value
Type | Description |
---|---|
System.Single |
ShadowDistanceFadeoutFraction
Controls the size of the fade out region at the far extent of the dynamic shadow's influence.
Declaration
public float ShadowDistanceFadeoutFraction { get; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
This is specified as a fraction of DynamicShadowDistance.
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
TraceDistance
Determines how far shadows can be cast, in world units. Larger values increase the shadowing cost.
Declaration
public float TraceDistance { get; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
| Improve this Doc View SourceNew(UObject, Name)
Spawn an object of this class
Declaration
public static DirectionalLightComponent New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
DirectionalLightComponent |
SetCascadeDistributionExponent(Single)
Set Cascade Distribution Exponent
Declaration
public void SetCascadeDistributionExponent(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
SetCascadeTransitionFraction(Single)
Set Cascade Transition Fraction
Declaration
public void SetCascadeTransitionFraction(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
SetDynamicShadowCascades(Int32)
Set Dynamic Shadow Cascades
Declaration
public void SetDynamicShadowCascades(int NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | NewValue |
SetDynamicShadowDistanceMovableLight(Single)
Set Dynamic Shadow Distance Movable Light
Declaration
public void SetDynamicShadowDistanceMovableLight(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
SetDynamicShadowDistanceStationaryLight(Single)
Set Dynamic Shadow Distance Stationary Light
Declaration
public void SetDynamicShadowDistanceStationaryLight(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
SetEnableLightShaftOcclusion(Boolean)
Set Enable Light Shaft Occlusion
Declaration
public void SetEnableLightShaftOcclusion(bool bNewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bNewValue |
SetLightShaftOverrideDirection(Vector)
Set Light Shaft Override Direction
Declaration
public void SetLightShaftOverrideDirection(Vector NewValue)
Parameters
Type | Name | Description |
---|---|---|
Vector | NewValue |
SetOcclusionMaskDarkness(Single)
Set Occlusion Mask Darkness
Declaration
public void SetOcclusionMaskDarkness(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
SetShadowDistanceFadeoutFraction(Single)
Set Shadow Distance Fadeout Fraction
Declaration
public void SetShadowDistanceFadeoutFraction(float NewValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | NewValue |
Operators
| Improve this Doc View SourceImplicit(IntPtr to DirectionalLightComponent)
Convert from IntPtr to UObject
Declaration
public static implicit operator DirectionalLightComponent(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
DirectionalLightComponent |