Large actor receives a pre-shadow and will cause an extreme performance hit

Any movable meshes (Mobility == Movable or InterpActor / KActor / SkeletalMeshActor) when combined with stationary lights have to use a special kind of shadow called a Preshadow. This handles the static environment casting dynamic shadows onto the dynamic object. The entire environment between the movable object and the stationary light will have to be rendered into the Preshadow, but only when the movable object actually moves enough to require an update.

Some general info on stationary lights here, doesn’t go into detail on Preshadows, but they are what allows the static and lightmapped arches to cast shadows on the movable spheres.
https://rocket.unrealengine.com/docs/ue4/INT/Engine/Subsystems/Rendering/LightingAndShadows/Precomputed/StationaryLights/index.html#directshadowing

There are a few performance hazards that happen with movable objects and stationary lights:

  • If there are lots of movable objects (hundreds), the per-object shadow method used can end up being less efficient than if whole scene shadows were used. You don’t have much control over this right now other than to limit the number of stationary lights that affect an area, hopefully we will get better controls in the future.

  • If the movable object is very large, and it moves, this can cause the entire scene to have to be re-rendered into the Preshadow depth map. This is what the warning is talking about. This will be both a CPU and GPU cost, however it will only happen for one frame (results are cached until the object moves far enough to invalidate the cache) so it’s usually pretty hard to measure. If the movable objects move every frame, it can show up in ‘stat shadowrendering’ (CPU) or ‘profilegpu’ (GPU).

If the movable object is only changed occasionally you are probably fine. In the end you just need to make sure your performance is good enough on your target hardware. Useful commands for investigation are:

  • ‘stat unit’ - shows the 3 parallel thread - max of GT, RT and GPU gives the frame time
  • ‘stat scenerendering’ - overview of CPU rendering thread time
  • ‘stat dumpframe -ms=.1’ - full stat hierarchy of where CPU time is going
  • ‘stat shadowrendering’ - CPU RT time issuing shadow depth draw calls
  • ‘profilegpu’ - measures GPU execution time
6 Likes