keywords:UE4, Shadow Optimization, Scene Optimization, 阴影, 场景, 优化

Enable Dynamic Shadow Distance

Test Case: 500 Actors are rendering in screen, Camera height is 4000, DirectionalLight’s property Dynamic Shadow Distance StationaryLight (Default value is 0, which means disabled) should be larger than the straight-line distance from Camera to Actor (Beacause the distance need to cover all Actors, so the distance would be better be larger ), otherwise frame rate would drop down from 200 fps to 100 fps.

How to Cast Shadow by Camera Distance

Tow factors

  • RayTraced Distance Field Soft Shadows
  • Scalability of Shadow
RayTraced Distance Field Soft Shadows
  1. Project Settings -> Engine -> Rendering -> Lighting -> enable Generate Mesh Distance Fields (Need to restart Editor)

  2. Modify DirectionalLight’s properties: DistanceField Shadow Distance and RayTraced DistanceField Shadows


Relationship between DistanceField Shadow Distance & Dynamic Shadow Distance
  • Stationary

  • Moveable

Reference:RayTraced Distance Field Soft Shadows

Scalability of Shadow
  • Cinematic

  • Medium

  • Low

Scalability Reference

How to cast character shadow on mobile device

1st way: Movable Directional Light

How to Enable Dynamic Shadows & Correct Reflection Maps on Mobile

Lighting for Mobile Platforms

4.7 release mobile shadows

2nd way: Stationary Directional Light

Enable Cast Modulated Shadows

Cast Shadow in common

How to Cast Shadow for SkeletalMesh


UPrimitiveComponent->CastShadow = true;



UPrimitiveComponent->CastShadow = true; would not work out of Constructor.

How to cast shadow when Actor hidden in game
USkeletalMeshComponent->bCastHiddenShadow = true;
How to prevent mesh from receiving shadows

Set material’s Shading Model to Unlit, then set you base color to go to the emissive(so its not totally black).But Matellic and Specular would lost.




Dynamic Scene Shadows

Cascaded Shadows

RayTraced Distance Field Soft Shadows

Shadow Casting

Unreal Engine 4 的 光和影

Fake Dynamic Lighting

Using modulate blend material to make a light

How to Create Blob Shadows in Unreal Engine 4 (Part 1)