keywords:UE4、Shadows、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


Dynamic Scene Shadows

Cascaded Shadows

RayTraced Distance Field Soft Shadows

Shadow Casting