Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 00264 00265 00266 00267 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class LightComponent extends ActorComponent native noexport abstract collapsecategories; //@warning: this structure is manually mirrored in UnActorComponent.h struct LightingChannelContainer { /** Whether the lighting channel has been initialized. Used to determine whether UPrimitveComponent::Attach should set defaults. */ var bool bInitialized; // User settable channels that are auto set and true for lights var() bool BSP; var() bool Static; var() bool Dynamic; // User set channels. var() bool CompositeDynamic; var() bool Skybox; var() bool Unnamed_1; var() bool Unnamed_2; var() bool Unnamed_3; var() bool Unnamed_4; var() bool Unnamed_5; var() bool Unnamed_6; var() bool Cinematic_1; var() bool Cinematic_2; var() bool Cinematic_3; var() bool Cinematic_4; var() bool Cinematic_5; var() bool Cinematic_6; var() bool Gameplay_1; var() bool Gameplay_2; var() bool Gameplay_3; var() bool Gameplay_4; }; var native private transient noimport const pointer SceneInfo; var native const transient matrix WorldToLight; var native const transient matrix LightToWorld; /** * GUID used to associate a light component with precomputed shadowing information across levels. * The GUID changes whenever the light position changes. */ var const duplicatetransient guid LightGuid; /** * GUID used to associate a light component with precomputed shadowing information across levels. * The GUID changes whenever any of the lighting relevant properties changes. */ var const duplicatetransient guid LightmapGuid; var() const interp float Brightness; var() const interp color LightColor; var() const editinline export LightFunction Function; /** Is this light enabled? */ var() const bool bEnabled; /** * True if the light can be blocked by shadow casting primitives. * * controls whether the light should cast shadows **/ var() const bool CastShadows; /** * 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 */ var() const bool CastStaticShadows; /** * 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 **/ var() bool CastDynamicShadows; /** True if the light should cast shadow from primitives which use a composite light environment. */ var() bool bCastCompositeShadow; /** deprecated: This variable has been replaced with bForceDynamicLight. */ var deprecated const bool RequireDynamicShadows; /** * 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 **/ var() const bool bForceDynamicLight; /** Set to True to store the direct flux of this light in a light-map. */ var() const bool UseDirectLightMap; /** Whether light has ever been built into a lightmap */ var const bool bHasLightEverBeenBuiltIntoLightMap; /** Whether to only affect primitives that are in the same level/ share the same GetOutermost() or are in the set of additionally specified ones. */ var() const bool bOnlyAffectSameAndSpecifiedLevels; /** Whether the light can affect dynamic primitives even though the light is not affecting the dynamic channel. */ var() const bool bCanAffectDynamicPrimitivesOutsideDynamicChannel; /** * The light environment which the light affects. * NULL represents an implicit default light environment including all primitives and lights with LightEnvironment=NULL. */ var() const LightEnvironmentComponent LightEnvironment; /** Array of other levels to affect if bOnlyAffectSameAndSpecifiedLevels is TRUE, own level always implicitly part of array. */ var() const array<name> OtherLevelsToAffect; /** Lighting channels controlling light/ primitive interaction. Only allows interaction if at least one channel is shared */ var() const LightingChannelContainer LightingChannels; /** Whether to use the inclusion/ exclusion volumes. */ var() bool bUseVolumes; /** * 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. */ var() editoronly const array<brush> InclusionVolumes; /** * 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. */ var() editoronly const array<brush> ExclusionVolumes; /** Array of convex inclusion volumes, populated from InclusionVolumes by PostEditChange. */ var native const array<pointer> InclusionConvexVolumes; /** Array of convex exclusion volumes, populated from ExclusionVolumes by PostEditChange. */ var native const array<pointer> ExclusionConvexVolumes; //@warning: this structure is manually mirrored in UnActorComponent.h enum ELightAffectsClassification { LAC_USER_SELECTED, LAC_DYNAMIC_AFFECTING, LAC_STATIC_AFFECTING, LAC_DYNAMIC_AND_STATIC_AFFECTING }; /** * 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. * **/ var() const editconst ELightAffectsClassification LightAffectsClassification; enum ELightShadowMode { /** Shadows rendered due to absence of light when doing dynamic lighting. Default */ LightShadow_Normal, /** Shadows rendered as a fullscreen pass by modulating entire scene by a shadow factor. */ LightShadow_Modulate }; /** Type of shadowing to apply for the light */ var() ELightShadowMode LightShadowMode; /** Shadow color for modulating entire scene */ var() LinearColor ModShadowColor; /** Time since the caster was last visible at which the mod shadow will fade out completely. */ var() float ModShadowFadeoutTime; /** Exponent that controls mod shadow fadeout curve. */ var() float ModShadowFadeoutExponent; /** * 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 */ var const native duplicatetransient int LightListIndex; enum EShadowProjectionTechnique { /** Shadow projection is rendered using either PCF/VSM based on global settings */ ShadowProjTech_Default, /** Shadow projection is rendered using the PCF (Percentage Closer Filtering) technique. May have heavy banding artifacts */ ShadowProjTech_PCF, /** Shadow projection is rendered using the VSM (Variance Shadow Map) technique. May have shadow offset and light bleed artifacts */ ShadowProjTech_VSM, /** Shadow projection is rendered using the Low quality Branching PCF technique. May have banding and penumbra detection artifacts */ ShadowProjTech_BPCF_Low, /** Shadow projection is rendered using the Medium quality Branching PCF technique. May have banding and penumbra detection artifacts */ ShadowProjTech_BPCF_Medium, /** Shadow projection is rendered using the High quality Branching PCF technique. May have banding and penumbra detection artifacts */ ShadowProjTech_BPCF_High }; /** Type of shadow projection to use for this light */ var() EShadowProjectionTechnique ShadowProjectionTechnique; enum EShadowFilterQuality { SFQ_Low, SFQ_Medium, SFQ_High }; /** Quality of shadow buffer filtering to use on this light */ var() EShadowFilterQuality ShadowFilterQuality; /** * override for min dimensions (in texels) allowed for rendering shadow subject depths. * 0 defaults to Engine.MinShadowResolution */ var() int MinShadowResolution; /** * override for max square dimensions (in texels) allowed for rendering shadow subject depths * 0 defaults to Engine.MaxShadowResolution */ var() int MaxShadowResolution; /** * Toggles the light on or off * * @param bSetEnabled TRUE to enable the light or FALSE to disable it */ native final function SetEnabled(bool bSetEnabled); /** sets Brightness, LightColor, and/or LightFunction */ native final function SetLightProperties(optional float NewBrightness = Brightness, optional color NewLightColor = LightColor, optional LightFunction NewLightFunction = Function); /** Script interface to retrieve light location. */ native final function vector GetOrigin(); /** Script interface to retrieve light direction. */ native final function vector GetDirection(); /** Script interface to update the color and brightness on the render thread. */ native final function UpdateColorAndBrightness(); /** Called from matinee code when LightColor property changes. */ function OnUpdatePropertyLightColor() { UpdateColorAndBrightness(); } /** Called from matinee code when Brightness property changes. */ function OnUpdatePropertyBrightness() { UpdateColorAndBrightness(); } /* Notes on all of the various Affecting Classifications USER SELECTED: settings that god knows what they do DYNAMIC AFFECTING: // pawns, characters, kactors CastShadows=TRUE CastStaticShadows=FALSE CastDynamicShadows=TRUE bForceDynamicLight=TRUE UseDirectLightMap=FALSE LightingChannels: Dynamic STATIC AFFECTING: CastShadows=TRUE CastStaticShadows=TRUE CastDynamicShadows=FALSE bForceDynamicLight=FALSE UseDirectLightMap=TRUE // For Toggleables this is UseDirectLightMap=FALSE LightingChannels: BSP, Static DYNAMIC AND STATIC AFFECTING: CastShadows=TRUE CastStaticShadows=TRUE CastDynamicShadows=TRUE bForceDynamicLight=FALSE UseDirectLightMap=FALSE LightingChannels: BSP, Dynamic, Static how to light the skybox? -> make a user selected affecting light with the skybox channel checked. - if we need to have a special classification for this then we will make it at a later time SKYLIGHT: CastShadows=FALSE CastStaticShadows=FALSE CastDynamicShadows=FALSE bForceDynamicLight=FALSE UseDirectLightMap=TRUE LightingChannels: SkyLight how to only light character then? -> Character Lighting Channel not at this time as people will mis use it -> for cinematics (where character only lighting could be used) we just use the unamed_# lighting channels! */ defaultproperties { Brightness=1.000000 LightColor=(B=255,G=255,R=255,A=0) bEnabled=True CastShadows=True CastStaticShadows=True CastDynamicShadows=True LightingChannels=(bInitialized=True,BSP=True,Static=True,Dynamic=True,CompositeDynamic=True) ModShadowColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000) ModShadowFadeoutExponent=3.000000 Name="Default__LightComponent" ObjectArchetype=ActorComponent'Engine.Default__ActorComponent' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |