Docs

Guides

The self-shadow and the sun

How the Relief POM self-shadow follows the directional light in your level with no setup.

With AutoSunDirection = 1 (the default) the self-shadow reads the sun direction Unreal already passes to every material, so it follows your directional light with no setup. This was checked with and without a Sky Atmosphere, with and without the light's Atmosphere Sun Light flag, and on Nanite and non-Nanite meshes. With no directional light in the level, or to art-direct the shadow, set AutoSunDirection = 0 and type SunDirection (a world vector pointing toward the sun). If a level has two or more directional lights, Unreal uses the atmosphere sun light (else the main directional light); if the shadow follows the wrong one, use the manual direction.

Same wall, three sun directions: the self-shadow moves with the level's sun.