1
\$\begingroup\$

When player is walking on terrrain, around him Unity is rendering shadow coming from directional light.

But after some radius in the distance, shadows are not rendered.

Only when player walks close to some prefab, shadow is being drawn.

This is not very realistic. I would like that shadows are visible in the distance as in real terrain.

How to fix that ?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ This is done to save performance. All major games (and probably other, minor games) do this. \$\endgroup\$ Aug 4, 2018 at 1:24

2 Answers 2

1
\$\begingroup\$

You probably need to increase the radius of the light source.

Unity models light using the Inverse Square Law, so the farther from the source, the less light hits the target, and thus the less distinct the shadow.

Also, ensure that the mesh is set to Receive Shadows, and the player is set to Cast Shadows.

\$\endgroup\$
4
  • \$\begingroup\$ How to increase radius of the light source? \$\endgroup\$
    – eon
    Aug 3, 2018 at 18:28
  • \$\begingroup\$ it's an option on the lighting component \$\endgroup\$
    – Stephan
    Aug 3, 2018 at 18:30
  • \$\begingroup\$ I can't find radius for directional light. It only has near plane parameter. \$\endgroup\$
    – eon
    Aug 5, 2018 at 9:33
  • \$\begingroup\$ @eon I have the same problem no shadow radius in directional light and I can't fix this issue at all \$\endgroup\$
    – Arsenius
    Apr 19, 2019 at 6:03
1
\$\begingroup\$

You can have a look at the shadow distance settings in your project : if it is low, the shadows for real time lights will not be rendered in the distance, which allows for better performance but causes the effect you are describing.

https://docs.unity3d.com/Manual/shadow-distance.html

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .