I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:LightComponent (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:41, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 3))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Component >> ActorComponent >> LightComponent
Package: 
Engine
Direct subclasses:
DirectionalLightComponent, PointLightComponent, SkyLightComponent, SphericalHarmonicLightComponent
This class in other games:
UT3


Properties

Property group 'LightComponent'

bAffectCompositeShadowDirection

Type: bool

If bCastCompositeShadow=TRUE, whether the light should affect the composite shadow direction.

Default value: True

bCanAffectDynamicPrimitivesOutsideDynamicChannel

Type: bool

Modifiers: const

Whether the light can affect dynamic primitives even though the light is not affecting the dynamic channel.

bCastCompositeShadow

Type: bool

True if the light should cast shadow from primitives which use a composite light environment.

Default value: True

bEnabled

Type: bool

Modifiers: const

Is this light enabled?

Default value: True

bForceDynamicLight

Type: bool

Modifiers: const

True if this light should use dynamic shadows for all primitives.

forces the use of shadow volumes/ stencil shadows which avoid potential issues with cubemaps and also avoids any memory used for static shadowing

bOnlyAffectSameAndSpecifiedLevels

Type: bool

Modifiers: const

Whether to only affect primitives that are in the same level/ share the same GetOutermost() or are in the set of additionally specified ones.

Brightness

Type: float

Modifiers: const, interp


Default value: 1.0

bUseVolumes

Type: bool

Whether to use the inclusion/ exclusion volumes.

CastDynamicShadows

Type: bool

True if the light can be blocked by dynamic shadow casting primitives.

controls whether the light should cast shadows from objects that cannot receive static shadowing

Default value: True

CastShadows

Type: bool

Modifiers: const

True if the light can be blocked by shadow casting primitives.

controls whether the light should cast shadows

Default value: True

CastStaticShadows

Type: bool

Modifiers: const

True if the light can be blocked by static shadow casting primitives.

controls whether the light should cast shadows from objects that can receive static shadowing

Default value: True

ExclusionVolumes

Type: array<Brush>

Modifiers: editoronly, const

Array of volumes used by AffectsBounds if bUseVolumes is set. Light will only affect primitives if they neither touching nor are contained by at least one volume. Exclusion overrides inclusion.

Function

Type: LightFunction

Modifiers: const, editinline, export


InclusionVolumes

Type: array<Brush>

Modifiers: editoronly, const

Array of volumes used by AffectsBounds if bUseVolumes is set. Light will only affect primitives if they are touching or are contained by at least one volume. Exclusion overrides inclusion.

LightAffectsClassification

Type: ELightAffectsClassification

Modifiers: const, editconst

This is the classification of this light. This is used for placing a light for an explicit purpose. Basically you can now have "type" information with lights and understand the intent of why a light was placed. This is very useful for content people getting maps from others and understanding why there is a dynamic affect light in the middle of the world with a radius of 32k! And also useful for being able to do searches such as the following: show me all lights which effect dynamic objects. Now show me the set of lights which are not explicitly set as Dynamic Affecting lights.

LightColor

Type: Object.Color

Modifiers: const, interp


Default value:

Member Value
A 0
B 255
G 255
R 255

LightEnv_BouncedLightBrightness

Type: float

Modifiers: const, interp

The intensity of bounced lighting from this light in DynamicLightEnvironments.

LightEnv_BouncedModulationColor

Type: Object.Color

Modifiers: const, interp

The color of bounced lighting from this light in DynamicLightEnvironments.

Default value:

Member Value
A 0
B 255
G 255
R 255

LightingChannels

Type: LightingChannelContainer

Modifiers: const

Lighting channels controlling light/ primitive interaction. Only allows interaction if at least one channel is shared

Default value:

Member Value
bInitialized True
BSP True
CompositeDynamic True
Dynamic True
Static True

LightShadowMode

Type: ELightShadowMode

Type of shadowing to apply for the light

Default value: LightShadow_Modulate

MaxShadowResolution

Type: int

Override for max square dimensions (in texels) allowed for rendering shadow subject depths. A value of 0 defaults to MaxShadowResolution in SystemSettings.

MinShadowResolution

Type: int

Override for min dimensions (in texels) allowed for rendering shadow subject depths. This also controls shadow fading, once the shadow resolution reaches MinShadowResolution it will be faded out completely. A value of 0 defaults to MinShadowResolution in SystemSettings.

ModShadowColor

Type: Object.LinearColor

Shadow color for modulating entire scene

Default value:

Member Value
A 1.0
B 0.0
G 0.0
R 0.0

ModShadowFadeoutExponent

Type: float

Exponent that controls mod shadow fadeout curve.

Default value: 3.0

ModShadowFadeoutTime

Type: float

Time since the caster was last visible at which the mod shadow will fade out completely.

OtherLevelsToAffect

Type: array<name>

Modifiers: const

Array of other levels to affect if bOnlyAffectSameAndSpecifiedLevels is TRUE, own level always implicitly part of array.

ShadowFadeResolution

Type: int

Resolution in texels below which shadows begin to be faded out. Once the shadow resolution reaches MinShadowResolution it will be faded out completely. A value of 0 defaults to ShadowFadeResolution in SystemSettings.

ShadowFilterQuality

Type: EShadowFilterQuality

Quality of shadow buffer filtering to use on this light

ShadowProjectionTechnique

Type: EShadowProjectionTechnique

Type of shadow projection to use for this light

UseDirectLightMap

Type: bool

Modifiers: const

Set to True to store the direct flux of this light in a light-map.

Internal variables

bAllowPreShadow

Type: bool

Whether to allow preshadows (the static environment casting dynamic shadows on dynamic objects) from this light.

bHasLightEverBeenBuiltIntoLightMap

Type: bool

Modifiers: const

Whether light has ever been built into a lightmap

bPrecomputedLightingIsValid

Type: bool

Modifiers: protected, const

The precomputed lighting for that light source is valid. It might become invalid if some properties change (e.g. position, brightness).

Default value: True

ExclusionConvexVolumes

Type: array<pointer>

Modifiers: native, const

Array of convex exclusion volumes, populated from ExclusionVolumes by PostEditChange.

InclusionConvexVolumes

Type: array<pointer>

Modifiers: native, const

Array of convex inclusion volumes, populated from InclusionVolumes by PostEditChange.

LightEnvironment

Type: LightEnvironmentComponent

Modifiers: const

The light environment which the light affects. NULL represents an implicit default light environment including all primitives and lights with LightEnvironment=NULL.

LightGuid

Type: Object.Guid

Modifiers: const, duplicatetransient

GUID used to associate a light component with precomputed shadowing information across levels. The GUID changes whenever the light position changes.

LightListIndex

Type: int

Modifiers: const, native, duplicatetransient

The munged index of this light in the light list

> 0 == static light list

 0 == not part of any light list

< 0 == dynamic light list

LightmapGuid

Type: Object.Guid

Modifiers: const, duplicatetransient

GUID used to associate a light component with precomputed shadowing information across levels. The GUID changes whenever any of the lighting relevant properties changes.

LightToWorld

Type: Object.Matrix

Modifiers: native, const, transient


SceneInfo

Type: pointer

Modifiers: native, private, transient, noimport, const


WorldToLight

Type: Object.Matrix

Modifiers: native, const, transient


Enums

ELightAffectsClassification

LAC_USER_SELECTED 
LAC_DYNAMIC_AFFECTING 
LAC_STATIC_AFFECTING 
LAC_DYNAMIC_AND_STATIC_AFFECTING 

ELightShadowMode

LightShadow_Normal 
Shadows rendered due to absence of light when doing dynamic lighting. High overhead per-light, especially on xbox 360.
LightShadow_Modulate 
Shadows rendered as a fullscreen pass by modulating entire scene by a shadow factor. Least expensive, Default.
LightShadow_ModulateBetter 
Shadows rendered as a fullscreen pass by modulating entire scene by a shadow factor, but also

renders receiver geometry in order to prevent shadows on backfaces and emissive areas. More expensive than LightShadow_Modulate. This can be used to stop shadows from casting through walls in MP games at a cost of 0.1-0.2 ms on gpu per ModulateBetter caster

EShadowFilterQuality

SFQ_Low 
SFQ_Medium 
SFQ_High 

EShadowProjectionTechnique

ShadowProjTech_Default 
Shadow projection is rendered using either PCF/VSM based on global settings
ShadowProjTech_PCF 
Shadow projection is rendered using the PCF (Percentage Closer Filtering) technique. May have heavy banding artifacts
ShadowProjTech_VSM 
Shadow projection is rendered using the VSM (Variance Shadow Map) technique. May have shadow offset and light bleed artifacts
ShadowProjTech_BPCF_Low 
Shadow projection is rendered using the Low quality Branching PCF technique. May have banding and penumbra detection artifacts
ShadowProjTech_BPCF_Medium 
Shadow projection is rendered using the Medium quality Branching PCF technique. May have banding and penumbra detection artifacts
ShadowProjTech_BPCF_High 
Shadow projection is rendered using the High quality Branching PCF technique. May have banding and penumbra detection artifacts

Structs

LightingChannelContainer

bool bInitialized 
Whether the lighting channel has been initialized. Used to determine whether UPrimitveComponent::Attach should set defaults.
bool BSP 
bool Static 
bool Dynamic 
bool CompositeDynamic 
bool Skybox 
bool Unnamed_1 
bool Unnamed_2 
bool Unnamed_3 
bool Unnamed_4 
bool Unnamed_5 
bool Unnamed_6 
bool Cinematic_1 
bool Cinematic_2 
bool Cinematic_3 
bool Cinematic_4 
bool Cinematic_5 
bool Cinematic_6 
bool Cinematic_7 
bool Cinematic_8 
bool Cinematic_9 
bool Cinematic_10 
bool Gameplay_1 
bool Gameplay_2 
bool Gameplay_3 
bool Gameplay_4 
bool Crowd 

Native functions

GetDirection

native final function Object.Vector GetDirection ()

Script interface to retrieve light direction.

GetOrigin

native final function Object.Vector GetOrigin ()

Script interface to retrieve light location.

SetEnabled

native final function SetEnabled (bool bSetEnabled)

Toggles the light on or off

Parameters:

  • bSetEnabled - TRUE to enable the light or FALSE to disable it

SetLightProperties

native final function SetLightProperties (optional float NewBrightness, optional Object.Color NewLightColor, optional LightFunction NewLightFunction)

sets Brightness, LightColor, and/or LightFunction

UpdateColorAndBrightness

native final function UpdateColorAndBrightness ()

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