# Lingering shadows that stick to the ground after movement - how to resolve?

**URL:** <https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering, question\
**Created:** [March 20, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898 "2023-03-20T15:13:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Auticus.Daerk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/auticus.daerk/32/553980_2.png) [@Auticus.Daerk](https://forums.unrealengine.com/u/Auticus.Daerk)\
**Post date:** [March 20, 2023, 3:13pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/1 "2023-03-20T15:13:22Z")

</div>

![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/8/f28b5ec42aaa99a568526deab62a8b8cc882e821.gif)

Whenever I have a niagra effect finish, it leaves a shadow behind like its burnt into the world. Refer to animated gif, you can see the shadow remain after the firing animation completes.

This burnt in shadow lasts until I zoom in, after which the artifact corrects itself and goes away until I shoot again.

How does one correct this graphical issue with niagra fx? (or if its not just pertaining to niagra, in general?)

EDIT: This is not a niagara issue, this is a virtual shadow map issue and the actual problem is the top of the staff here is having its shadow linger on the ground until I zoom in or rotate. This is covered in the solution on how to fix.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 20, 2023, 6:42pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/2 "2023-03-20T18:42:23Z")

</div>

I notice someone here having the same problem

> [@Niagara disable sprite shadow?](https://forums.unrealengine.com/t/niagara-disable-sprite-shadow/149422):
>
> … How do I disable shadow casting on a mostly empty sprite emitter? I’m spawning a bunch of particles that follow the actor with a custom material. the material is emissive. The renderer on the Niagara Emitter does not seem to offer any shadow settings. There must be a hidden option somewhere? AND… it’s the distance field shadows that are the issue… probably due to the contact shadows…

Have you tried changing the emitter to CPU?

---

<div class="post-metadata">

**Author:** ![Auticus.Daerk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/auticus.daerk/32/553980_2.png) [@Auticus.Daerk](https://forums.unrealengine.com/u/Auticus.Daerk)\
**Post date:** [March 20, 2023, 6:49pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/3 "2023-03-20T18:49:07Z")

</div>

I have not. I have been assembling some information that may solve the problem. Your reply is a new solution to try.

So far what I’ve found is that the issue derives from a virtual shadow map cache not updating itself properly.

Some solutions I have seen to try:

- Disable Virtual Shadow Maps (not something I want to do unless I have to)
- Disable shadow map caching if the performance hit is acceptable

Using console command “r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1” to show the actor bounds scale and see whats popping out thats not causing a refresh.

Also suggested to try: View Mode (usually Lit) in Viewport → Virtual Shadow Map → Cached Page to see valid and invalid spots.

Another person posted something about “character mesh bound scale works for him” and he showed him setting the BoundsScale to 100 on his character mesh.

This leads me to believe that the problem is the staff mesh in the mannequin’s hand is larger than the bounds scale, and it is that staff shadow that keeps getting left behind on the ground. Not just when he shoots like in my graphic, but when he’s walking around as well.

I will play around with a few of these and post what worked, and likely do a video on my youtube page highlighting this one simply because it was a bit more ornery. Thank you for the added suggestion to try and look into as well!

---

<div class="post-metadata">

**Author:** ![Auticus.Daerk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/auticus.daerk/32/553980_2.png) [@Auticus.Daerk](https://forums.unrealengine.com/u/Auticus.Daerk)\
**Post date:** [March 20, 2023, 7:35pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/4 "2023-03-20T19:35:33Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/7/837354e994eed63e16f07e69f24d0fa5b036b87a.jpeg)

So running the game, and then running the command  
_r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1_

Shows the above image. Note that the top of my staff is sticking out. That is the culprit and what is causing the issues with “shadows sticking/lingering”.w

**How to Fix**  
There were two ways that would accomplish the fix. The first is going into the skeletal mesh of the character in blueprint, (make sure the skeletal mesh is selected) and pulling its Bounds Scale.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/c/6acc011338c2d2a4535aac6e06f4825d4ce4eefe.png)

Bumping this to 2.0 resulted in the following bounds being shown me in the editor when running the game:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/9/6e9fdbe3fd1889233448462d771e47cfde5bf1b3.jpeg)

This fixed the issue. However… this is not the best solution. Doing some research in Unreal docs regarding shadow maps found here: [Virtual Shadow Maps in Unreal Engine | Unreal Engine 5.0 Documentation](https://docs.unrealengine.com/5.0/en-US/virtual-shadow-maps-in-unreal-engine/)

The larger this area is that we are defining, the more space will be invalidated everytime we move. Now this can cause performance hits. We want these volumes to be as tight as possible.

I noticed that the staff had a volume as well. See how small that is in the image above? What if we set the bounds of the weapon instead? Because the issue is that the staff is causing these artifacts because the staff head and tail are sticking out of its bounding box (the tail tends to not cause the problem but thats because its encapsulated in the character box).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/0/e1021204d64cd5a3dfb2bbb662b27828f3450cc6.jpeg)

I set the character back to a 1.0 scale, and the staff after dorking around a bit found that 1.65 encapsulated it. See image above. (also note the sword guy next to him has the point of the sword sticking out of its box… which also can cause this problem)

![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/3/9d3975b34f405cc616bf5e86f27db004eec71702.gif)

That also fixes the problem as you can see in the gif. No more shadow relic. And the bounding boxes are tighter resulting in a better solution since I am making sure that the invalidation of the shadow map is as small as possible for better performance.

---

<div class="post-metadata">

**Author:** ![deuzex85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@deuzex85](https://forums.unrealengine.com/u/deuzex85)\
**Post date:** [February 14, 2024, 5:40am UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/5 "2024-02-14T05:40:25Z")

</div>

This answer was super helping in solving this for me. But when I use the command `r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1` I don’t see any bounding boxes? Is there something else I need to enable? (fixed it by trial and erroring a value in the bounds box for now, but showing the bounds would be better).

---

<div class="post-metadata">

**Author:** ![caesiumone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@caesiumone](https://forums.unrealengine.com/u/caesiumone)\
**Post date:** [April 13, 2024, 9:17pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/6 "2024-04-13T21:17:06Z")

</div>

Same for me. I can’t manage to work `r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1`. And I don’t know how to change bounds on the mesh.

---

<div class="post-metadata">

**Author:** ![tancen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tancen](https://forums.unrealengine.com/u/tancen)\
**Post date:** [April 14, 2024, 1:10pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/7 "2024-04-14T13:10:19Z")

</div>

I have the same issue. I made it work by setting up the character’s physics asset

---

<div class="post-metadata">

**Author:** ![Rasgefaanu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rasgefaanu](https://forums.unrealengine.com/u/Rasgefaanu)\
**Post date:** [September 3, 2024, 2:04pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/8 "2024-09-03T14:04:58Z")

</div>

Did you manage to figure out how to be able to see the debug box using the command _r.Shadow.Virtual.Cache.DrawInvalidatingBounds 1_ and how to change the bounds on the mesh?

---

<div class="post-metadata">

**Author:** ![PixelFireXY](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pixelfirexy/32/1195765_2.png) [@PixelFireXY](https://forums.unrealengine.com/u/PixelFireXY)\
**Post date:** [October 28, 2024, 3:21pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/9 "2024-10-28T15:21:43Z")

</div>

You don’t need to use the command to see the bounds, just go to Show-\>Advanced-\>Bounds and you can see the bounds in the scene.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/9/e798aa983ad3af244ad03f84890d8e5bd770e76a.jpeg)

After that just go to the mesh bounds and change the value there as @Auticus.Daerk said.

---

<div class="post-metadata">

**Author:** ![feralmoans](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/feralmoans/32/974428_2.png) [@feralmoans](https://forums.unrealengine.com/u/feralmoans)\
**Post date:** [November 4, 2024, 9:07pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/10 "2024-11-04T21:07:29Z")

</div>

It’s odd that the console command doesn’t seem to do anything though.

---

<div class="post-metadata">

**Author:** ![TorQueMoD](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/torquemod/32/710746_2.png) [@TorQueMoD](https://forums.unrealengine.com/u/TorQueMoD)\
**Post date:** [November 21, 2024, 11:44am UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/11 "2024-11-21T11:44:34Z")

</div>

Alternatively, you can also switch back to Shadow Maps instead of Virtual Shadow maps.

---

<div class="post-metadata">

**Author:** ![feralmoans](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/feralmoans/32/974428_2.png) [@feralmoans](https://forums.unrealengine.com/u/feralmoans)\
**Post date:** [November 28, 2024, 4:53pm UTC](https://forums.unrealengine.com/t/lingering-shadows-that-stick-to-the-ground-after-movement-how-to-resolve/794898/12 "2024-11-28T16:53:04Z")

</div>

I posted this in another thread and thought I’d add here too: I’m noticing that this happens with the default mannequin and default settings **whenever the quality is changed from Medium to High without restarting the engine**. I don’t know how the internals work, but I’m wondering if there is some kind of cache that is not being updated or invalidated properly.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/2/7120bdf0df20d7a34e75d2220ad612fd92d27ae8.jpeg)

> [@Player mesh leaves shadow residues on ground when moving](https://forums.unrealengine.com/t/player-mesh-leaves-shadow-residues-on-ground-when-moving/1509986/3):
>
> I ran into this issue with 3rd party models and found the solution mentioned above about a month or two ago. However, this is also happening to me with default template projects (using the default engine mannequin), and I noticed that it seems to occur if I switch from Medium quality to High without restarting the engine. Restarting the engine after changing the quality slider seems to fix the issue. I’m wondering if there is some sort of cache that isn’t updating or invalidating properly?

edit: Well, not even an hour later I’ve been exclusively working in the engine on High and the shadow residue thing is still an issue with the default mannequin. 😕
