How to set up shadows for large landscapes?,How to set up proper shadows in large landscapes

I have this 4 by 4 km landscape imported from a heightmap. I have a basic architectural scene with the default lighting settings. As I get farther from the mesh, shadows fade away like grass does. How do I set up realistic shadows? I am a noob to UE. I Just want ”infinite shadows” sacrificing as less performance as possible. Please help me get the amazing results that made me want to learn UE.

,

1 Like

It’s probably either distance field shadows and/or cascaded shadow map settings. There’s controls for how far from the camera the shadows are rendered when viewing them. I suggest you go through a few video tutorials in lighting essentials (most are between 3 and 10 minutes long), or at least look at the content examples maps showing how to get particular effects / results. The settings that I think are causing it are as follows:

  1. On the directional light (probably named Light Source in the World Outliner, a top right list of all objects in the scene). Click it, go to its details panel (lower right) and scroll down to Cascaded Shadow Maps settings. If the light is stationary (which it most likely is if it’s set to default), increase “Dynamic Shadow Distance Stationary Light”. If the light is movable (can change position and other features at run-time), then change “Dynamic Shadow Distance Movable Light” to increase the distance from the camera that shadows render.
  2. If it’s not enough to do the first step, then also try tweaking the “Cascade Distribution Exponent”, “Distance Fraction”, and “Distance Fadeout Fraction”. Probably need to decrease the Fraction based settings and Exponent…but not certain about that.
  3. If it’s not enabled, go to the Project Settings > Rendering, and check “Generate Mesh Distance Fields”. That generates volumes (invisible unless visualizing them with a tool in the editor) calculating lighting and shadowing for everything in the level based on the lights’ settings and positions of objects and more. Restart the editor so it activates for the level, then go to the directional light’s settings to Distance Field Shadowing and tweak those settings. The first is called “Distance Field Shadow Distance”, which controls for how far in the view shadows are rendered by distance fields. "Trace Distance is another one to change. Here are links to the doc pages corresponding to those settings on the directional light:
  1. Cascaded Shadow Maps settings for directional light (light source)
    Directional Lights | Unreal Engine Documentation

  2. Mesh Distance Fields (scroll down to see Distance Field Shadowing for directional light settings)
    Mesh Distance Fields Settings | Unreal Engine Documentation

2 Likes