Search public documentation:
UE3 Home > Lighting & Shadows > Shadowing Reference
UE3 Home > Level Designer > Shadowing Reference
UE3 Home > Lighting Artist > Shadowing Reference
UE3 Home > Level Designer > Shadowing Reference
UE3 Home > Lighting Artist > Shadowing Reference
Document Summary: A reference detailing the shadowing methods used in Unreal Engine 3.
- Shadowing Reference
- Light classes
- Shadow types
- Shadow opacity
- Shadow and light-map resolution
- Shadowing options
Unreal Engine 3 uses several distinct shadowing solutions:
- Whole-scene dynamic shadows - Movable lights use whole-scene dynamic shadows.
- Per-object dynamic shadows - Immovable lights illuminating movable or dynamic objects use per-object dynamic shadows.
- Precomputed shadows - Immovable lights illuminating static objects use precomputed shadow maps.
- Precomputed lighting - Static lights illuminating static objects use precomputed light maps.
For each type of light you can place in the world, there are different classes that control the shadowing behavior of the light. Those classes limit the light from changing in certain ways at runtime, or designate the light as a "dominant" light.
- The base class of each light (e.g. PointLight) is the static version of that light. It uses per-object dynamic shadows combined with precomputed lighting.
- The Movable subclass of that light may be moved at runtime. It uses whole-scene dynamic shadows.
- The Toggleable subclass of that light may not be moved, but it can change color and brightness at runtime. It uses per-object dynamic shadows combined with shadow maps.
- The Dominant subclass of that light is similar to Toggleable lights, but uses distance field shadow maps.
Masked material opacity will be respected by all types of shadows. Translucent material opacity will only be respected for shadows cast by static objects from Toggleable lights or static lights. To make the translucent materials cast dynamic shadows as masked materials, set the material's Cast Lit Translucency Shadow As Masked property to true and set the Opacity Mask material parameter.
VertexBlendingTutorial. Open your static mesh in the Static Mesh Editor (double click it in the Generic Browser window). Fill the desired value into LightMapResolution. The default value of 0 means no shadow map will be created. Keep in mind that an independent shadow map will be generated for each instance of your mesh in the level file, which could potentially have dramatic memory ramifications. If your mesh has multiple UVs, select the set you want to use for the shadow map in LightMapCoordinateIndex. The default is 0, which is the original set of UVs. Notice that the number of UV channels is listed in the top left of the render window. Below is an illustration of per-vertex shadowing vs. shadow maps.
|DirectionalLightComponent||Cascaded Shadow Maps||Whole Scene Dynamic Shadow Radius||0 or 2000||Radius of the whole scene dynamic shadow centered on the viewer, which replaces the precomputed shadows based on distance from the camera. A Radius of 0 disables the dynamic shadow. This feature is currently only supported on dominant directional lights.|
|DirectionalLightComponent||Cascaded Shadow Maps||Num Whole Scene Dynamic Shadow Cascades||1||Radius of the whole scene dynamic shadow centered on the viewer, which replaces the precomputed shadows based on distance from the camera. A Radius of 0 disables the dynamic shadow. This feature is currently only supported on dominant directional lights.|
|DirectionalLightComponent||Cascaded Shadow Maps||Cascade Distribution Exponent||4||Exponent that is applied to the cascade transition distances as a fraction of WholeSceneDynamicShadowRadius. An exponent of 1 means that cascade transitions will happen at a distance proportional to their resolution. A value greater than 1 brings transitions closer to the camera.|
|PointLightComponent||Lightmass||Shadow Exponent||2||The radius of the light's emissive surface, not the light's influence.|
|LightComponent||Light Component||Cast Shadows||True||Whether the light should cast any shadows.|
|LightComponent||Light Component||Cast Static Shadows||True||Whether the light should cast shadows from static objects. Also requires Cast Shadows to be set to True.|
|LightComponent||Light Component||Cast Dynamic Shadows||Varies||Whether the light should cast shadows from dynamic objects. Also requires Cast Shadows to be set to True.|
|LightComponent||Light Component||Cast Composite Shadows||True||Whether the light should cast shadows from objects with composite lighting (i.e. an enabled light environment).|
|LightComponent||Light Component||Affect Composite Shadow Direction||True||If bCastCompositeShadow=TRUE, whether the light should affect the composite shadow direction.|
|LightComponent||Light Component||Non Modulated Self Shadowing||False||If enabled and the light casts modulated shadows, this will cause self-shadowing of shadows rendered from this light to use normal shadow blending. This is useful to get better quality self shadowing while still having a shadow on the lightmapped environment. When enabled it incurs most of the rendering overhead of both approaches combined.|
|LightComponent||Light Component||Self Shadow Only||False||Whether the light should cast shadows only from a dynamic object onto itself.|
|LightComponent||Light Component||Force Dynamic Light||False||Whether the light should cast shadows as if it was movable, regardless of its class.|
|LightComponent||Light Component||Light Shadow Mode||Varies||The type of shadowing to apply for the light.|
|LightComponent||Light Component||Shadow Filter Quality||SFQ_Low||The quality of filtering to use for dynamic shadows cast by the light.|
|LightComponent||Light Component||Mod Shadow Color||black||The color to modulate with pixels that receive a dynamic shadow from this light (if it casts modulated shadows).|
|LightComponent||Light Component||Min Shadow Resolution||0||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.|
|LightComponent||Light Component||Max Shadow Resolution||0||Override for max square dimensions (in texels) allowed for rendering shadow subject depths. A value of 0 defaults to MaxShadowResolution in SystemSettings.|
|LightComponent||Light Component||Shadow Fade Resolution||0||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.|
|LightComponent||Light Component||Use Direct Light Map||True||If set to false on a static light, forces it to use precomputed shadowing instead of precomputed lighting.|
|Material||Translucency||Cast Lit Translucency Shadow As Masked||False||Whether to treat the material's opacity channel as a mask rather than fractional translucency in dynamic shadows.|
|PrimitiveComponent||Lighting||Cast Shadow||True||Controls whether the primitive component should cast a shadow or not. Currently dynamic primitives will not receive shadows from static objects unless both this flag and bCastDynamicSahdow are enabled.|
|PrimitiveComponent||Lighting||Cast Dynamic Shadow||True||Controls whether the primitive should cast shadows in the case of non precomputed shadowing like e.g. the primitive being in between a light and a dynamic object. This flag is only used if CastShadow is TRUE. Currently dynamic primitives will not receive shadows from static objects unless both this flag and CastShadow are enabled.|
|PrimitiveComponent||Lighting||Cast Static Shadow||True||Controls whether the primitive should cast shadows from non-moving shadow casting lights. Also requires Cast Shadow to be set to True.|
|PrimitiveComponent||Lighting||Force Direct Light Map||False||Forces the use of lightmaps for all static lights affecting this primitive even though the light might not be set to use light maps. This means that the primitive will not receive any shadows from dynamic objects obstructing static lights. It will correctly shadow in the case of dynamic lights.|
|PrimitiveComponent||Lighting||Self Shadow Only||False||If true, the primitive will only shadow itself and will not cast a shadow on other primitives. This can be used as an optimization when the shadow on other primitives won't be noticeable.|
|PrimitiveComponent||Lighting||No Mod Self Shadow||False||For mobile platforms only! If true, the primitive will not receive projected mod shadows, not from itself nor any other mod shadow caster. This can be used to avoid self-shadowing artifacts.|
|PrimitiveComponent||Lighting||Accepts Dynamic Dominant Light Shadows||True||Optimization for objects which don't need to receive dominant light shadows. This is useful for objects which eat up a lot of GPU time and are heavily texture bound yet never receive noticeable shadows from dominant lights like trees.|
|PrimitiveComponent||Lighting||Cast Hidden Shadow||False||If TRUE, the primitive will cast shadows even if bHidden is TRUE. Controls whether the primitive should cast shadows when hidden. This flag is only used if CastShadow is TRUE.|
|PrimitiveComponent||Lighting||Cast Shadow As Two Sided||False||Whether this primitive should cast dynamic shadows as if it were a two sided material.|
|PrimitiveComponent||Lighting||Use Precomputed Shadows||Varies||Whether to allow the primitive to use precomputed shadows or lighting.|