# Shadows disappear with increased camera distance

**URL:** <https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [May 20, 2014, 5:07am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690 "2014-05-20T05:07:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 20, 2014, 5:07am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/1 "2014-05-20T05:07:45Z")

</div>

I was playing with a pseudo-isometric camera style (low camera Field of View) with a larger camera distance to give it a 2.5D feeling but still maintain some perspective.

Anyhow, I’m not sure if this is a bug or if I need to change the way my lighting is being handled in the scene. When the camera distance (being driven by the SpringArm in the Blueprint) exceeds about 6500+ units all of the cast shadows seem to completely disappear or are not being rendered or registered. However, by just lowering the camera distance back down below 6000 units, they pop right back in. This can be seen in real-time while playing the game demo.

![6a595181cf22a7ff4bd3db63f5b06587dc9c145f.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

![4ebb9c2a10a854238fc2e8795ab699f6c9681757.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

Would love to hear any suggestions on how to make this work without having to have a closer camera distance.

Thanks!

**EDIT - RESOLVED**

Some gathered notes that help me solved this problem (thanks everyone!):

When using Stationary or Movable Lights on a movable mesh (not static) the shadow visibility of that movable mesh is dependent upon the size of the mesh and its distance from the camera.

Command Line Values to Tweak:

**r.Shadow.FadeResolution** - controls how big the light has to be on the screen before it _starts_ to fade out.  
- Default Value: 64  
- Can lower this value to keep shadows from fading out at further distances

**r.Shadow.MinResolution** - controls how big the light has to be on the screen before it _finishes_ fading out, at which point it no longer has cost.  
- Default Value: 32  
- Lower values seem to increase shadow visibility.

**r.Shadow.TexelsPerPixel** - Causes a higher resolution to be assigned and then it should fade out less aggressively  
- Default Value: 1.27324  
- Can increase this value to improve shadow rendering visibility & quality

**r.Shadow.RadiusThreshold**  
- Default Value: 0.03  
- A lower value of 0.02 or 0.01 greatly increases shadow visibility at far camera distances (seems to have the most impact of all the console commands).

**Useful Link:** [https://docs.unrealengine.com/latest/INT/Engine/Rendering/Scalability/ScalabilityReference/index.html](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Scalability/ScalabilityReference/index.html)

---

<div class="post-metadata">

**Author:** ![Daedalus51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daedalus51](https://forums.unrealengine.com/u/Daedalus51)\
**Post date:** [May 20, 2014, 6:22pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/2 "2014-05-20T18:22:58Z")

</div>

Just increase the max cascaded shadow distance on your directional light 😉 If I am right…the max supportet value on a movable light should be 20000 units…however you will sacrifice cascade resolution as well so its a trade off.

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 20, 2014, 6:43pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/3 "2014-05-20T18:43:32Z")

</div>

> [@Daedalus51;53907](#):
>
> Just increase the max cascaded shadow distance on your directional light 😉 If I am right…the max supportet value on a movable light should be 20000 units…however you will sacrifice cascade resolution as well so its a trade off.

Appreciate the reply.

I’ve tinkered with all of the cascaded shadow settings for the light (with the light set to both Movable and Stationary), and the results are always the same. Any shadows being cast from my movable character object (the ball) completely cease to be displayed once the camera distance passes 6900.

---

<div class="post-metadata">

**Author:** ![Daedalus51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Daedalus51](https://forums.unrealengine.com/u/Daedalus51)\
**Post date:** [May 20, 2014, 7:18pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/4 "2014-05-20T19:18:28Z")

</div>

Then its probably tied to some ini size setting. That means the ball gets so small compared to what you see on screen over distance that even if the shadows would cover it, the ball just doesnt cast one anymore because its too small on screen. I would ask Epic if there is some ini tweak to tweak the object size to screen ratio for small stuff so it can still cast shadows. (if I remeber correctly we had that issue with the stationary light once in the office as well, one of our coders did something and after that it worked xD)

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 20, 2014, 10:02pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/5 "2014-05-20T22:02:42Z")

</div>

Hmm, yeah hoping to get some official word on this as to whether or not it’s just a limitation of camera distance or if there’s a setting that can be adjusted.

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 21, 2014, 3:45am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/7 "2014-05-21T03:45:34Z")

</div>

Thanks ,

I wasn’t aware of all the shadow controls in the console commands.

In one scene where the camera isn’t too far those values do help bring some shadow visibility back. However, in my main project where the camera is a bit further (7000+ units on the SpringArm), no combination of values for those two variables seems to restore shadow visibility.

Obviously, for now, we are bringing the camera in closer and pumping the camera’s FOV back up, but I would really like to know if this is an engine limitation or if I’m just not approaching the problem properly (lighting isn’t my strongest suit!).

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 22, 2014, 2:04am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/9 "2014-05-22T02:04:52Z")

</div>

> [@DanielW;55377](#):
>
> Even when both of those settings are 1? Another one you can use is r.Shadow.TexelsPerPixel, to cause a higher resolution to be assigned and then it should fade out less aggressively.

Yeah, even at a value of 1. Could you, if you get some time, try opening something like the Rolling Blueprint project template and increasing the springarm distance on the ball blueprint to something really high, like 7000?

I’ve tinkered with the extreme values of pretty much everything I can think of at this point.

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 29, 2014, 10:09pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/10 "2014-05-29T22:09:09Z")

</div>

Bumping.

I’ve seen a couple of other AnswerHub and Forum posts with similar issues.

It all seems to be related to size of object and distance of that object from the camera. If the camera distance is great enough the dynamic shadows just won’t display.

---

<div class="post-metadata">

**Author:** ![koola](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@koola](https://forums.unrealengine.com/u/koola)\
**Post date:** [May 30, 2014, 9:58am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/11 "2014-05-30T09:58:34Z")

</div>

I have the same problem. For me, changing r.Shadow.RadiusThreshold=0.03 to 0.01 fix it.

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 31, 2014, 8:06pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/12 "2014-05-31T20:06:35Z")

</div>

> [@koola;62548](#):
>
> I have the same problem. For me, changing r.Shadow.RadiusThreshold=0.03 to 0.01 fix it.

Thanks!

It looks like the RadiusThreshold value change in conjunction with r.Shadow.TexelsPerPixel being set higher OR setting r.Shadow.FadeResolution to a lower value does the trick.

---

<div class="post-metadata">

**Author:** ![noswahj](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/noswahj/32/467449_2.png) [@noswahj](https://forums.unrealengine.com/u/noswahj)\
**Post date:** [May 31, 2014, 8:31pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/13 "2014-05-31T20:31:25Z")

</div>

Some gathered notes that help me solved this problem (thanks everyone!):

When using Stationary or Movable Lights on a movable mesh (not static) the shadow visibility of that movable mesh is dependent upon the size of the mesh and its distance from the camera.

Command Line Values to Tweak:

**r.Shadow.FadeResolution** - controls how big the light has to be on the screen before it _starts_ to fade out.  
- Default Value: 64  
- Can lower this value to keep shadows from fading out at further distances

**r.Shadow.MinResolution** - controls how big the light has to be on the screen before it _finishes_ fading out, at which point it no longer has cost.  
- Default Value: 32  
- Lower values seem to increase shadow visibility.

**r.Shadow.TexelsPerPixel** - Causes a higher resolution to be assigned and then it should fade out less aggressively  
- Default Value: 1.27324  
- Can increase this value to improve shadow rendering visibility & quality

**r.Shadow.RadiusThreshold**  
- Default Value: 0.03  
- A lower value of 0.02 or 0.01 greatly increases shadow visibility at far camera distances (seems to have the most impact of all the console commands).

**Useful Link:** [https://docs.unrealengine.com/latest/INT/Engine/Rendering/Scalability/ScalabilityReference/index.html](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Scalability/ScalabilityReference/index.html)

---

<div class="post-metadata">

**Author:** ![KOCMOHABT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KOCMOHABT](https://forums.unrealengine.com/u/KOCMOHABT)\
**Post date:** [July 23, 2014, 8:07pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/14 "2014-07-23T20:07:17Z")

</div>

Hi! How to keep these settings for the project?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bfbc1493](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bfbc1493](https://forums.unrealengine.com/u/anonymous_user_bfbc1493)\
**Post date:** [August 4, 2015, 7:14pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/15 "2015-08-04T19:14:05Z")

</div>

Hello everyone. Thanks for the advice, problem solved. Compilation is successful, it works in the finished project.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_204f068d1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_204f068d1](https://forums.unrealengine.com/u/anonymous_user_204f068d1)\
**Post date:** [January 18, 2016, 10:25am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/16 "2016-01-18T10:25:45Z")

</div>

Hi,

I facing the same problem here. Im new to UE4, can someone please guide me on where to change the value that you are are talking about ?

Thanks

---

<div class="post-metadata">

**Author:** ![cgd82](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cgd82](https://forums.unrealengine.com/u/cgd82)\
**Post date:** [February 17, 2016, 4:07am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/17 "2016-02-17T04:07:51Z")

</div>

@ansonkit

You want to change these settings in DefaultEngine.ini, it should be located at:  
_your\_project\_folder_/Config

You will want to add the shadow settings under the section:  
[/Script/Engine.RendererSettings]

I hope that helps (or if you already figured it out that this helps someone else.)

---

<div class="post-metadata">

**Author:** ![KillingWord](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KillingWord](https://forums.unrealengine.com/u/KillingWord)\
**Post date:** [March 9, 2016, 11:59pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/18 "2016-03-09T23:59:37Z")

</div>

> [@cgd82;475565](#):
>
> @ansonkit
> 
> You want to change these settings in DefaultEngine.ini, it should be located at:  
> _your\_project\_folder_/Config
> 
> You will want to add the shadow settings under the section:  
> [/Script/Engine.RendererSettings]
> 
> I hope that helps (or if you already figured it out that this helps someone else.)

hate to resurrect this but i am struggling with the same issue.  
tried changing defaultengine.ini in project config and the consolevariables.ini in UE4.10 folder but nothing seems to change.

i added:  
[/Script/Engine.RendererSettings]  
r.Shadow.FadeResolution=16  
r.Shadow.MinResolution=16  
r.Shadow.TexelsPerPixel=3  
r.Shadow.RadiusThreshold=0.01

no dice, any tips?

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 13, 2016, 4:58am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/19 "2016-05-13T04:58:31Z")

</div>

Far Shadows!

Dear Everyone,

Far Shadows are now in the engine and resolve all these issues!

> **[Thank You For UE4 !](https://forums.unrealengine.com/showthread.php?34610-Thank-You-For-UE4-%21&p=529311&viewfull=1#post529311)**
>
> Dear Everyone at Epic, I wanted to take this opportunity to thank you for UE4! I have so much fun with UE4 every day! Whether I am doing C++ coding, blueprint work, animation blendspaces, particle systems, or playing with materials, I am having a...

Rama

 ![FarShadowsInUe4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/f/af4973cee34829ea1c8829b0daf6fa0868c92775.jpeg)

---

<div class="post-metadata">

**Author:** ![rantrod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rantrod](https://forums.unrealengine.com/u/rantrod)\
**Post date:** [May 18, 2016, 5:12am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/20 "2016-05-18T05:12:08Z")

</div>

Is there a solution if you’re using spotlights instead of directional lights? My shadows seem to disappear when the camera is about 6-8k units away from the spotlight.

EDIT: So my problem was that the bounds on the meshes that had clipping/disappearing shadows had to be increased. Select Mesh-\>Rendering-\>Bounds Scale.

---

<div class="post-metadata">

**Author:** ![ficolo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ficolo/32/539576_2.png) [@ficolo](https://forums.unrealengine.com/u/ficolo)\
**Post date:** [May 15, 2018, 12:29pm UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/21 "2018-05-15T12:29:17Z")

</div>

Just playing with the shadow Bias setting a good value is: 0.05 This value can be found in the light properties

---

<div class="post-metadata">

**Author:** ![TheSubZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSubZer0](https://forums.unrealengine.com/u/TheSubZer0)\
**Post date:** [March 9, 2019, 3:26am UTC](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690/22 "2019-03-09T03:26:02Z")

</div>

Where I change this values???

**r.Shadow.FadeResolution** - controls how big the light has to be on the screen before it _starts_ to fade out.

- Default Value: 64
- Can lower this value to keep shadows from fading out at further distances

**r.Shadow.MinResolution** - controls how big the light has to be on the screen before it _finishes_ fading out, at which point it no longer has cost.

- Default Value: 32
- Lower values seem to increase shadow visibility.

**r.Shadow.TexelsPerPixel** - Causes a higher resolution to be assigned and then it should fade out less aggressively

- Default Value: 1.27324
- Can increase this value to improve shadow rendering visibility & quality

**r.Shadow.RadiusThreshold**

- Default Value: 0.03
- A lower value of 0.02 or 0.01 greatly increases shadow visibility at far camera distances (seems to have the most impact of all the console commands).

[Next page](https://forums.unrealengine.com/t/shadows-disappear-with-increased-camera-distance/4690.md?page=2)
