# Instanced Static Meshes Don't Receive Direct Light From Shadow Casting Stationary Lights

**URL:** <https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871>\
**Category:** Rendering\
**Tags:** static-light, Instanced-Mesh, unreal-engine, bug-report, question\
**Created:** [August 22, 2016, 5:09am UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871 "2016-08-22T05:09:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rujuro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rujuro](https://forums.unrealengine.com/u/rujuro)\
**Post date:** [August 22, 2016, 5:09am UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/1 "2016-08-22T05:09:24Z")

</div>

When I bake lighting on actors I have placed that add instanced static mesh components via blueprint, the direct lighting from stationary shadow casting lights is missing. If I turn off shadow casting on the lights and bake again, it works fine. It also seems to work if the light radius encompasses the bounds of the parent actor that holds the instanced static meshes.

The baked indirect lighting seems to work fine in both cases.

Pre-Baking:

![103891-beforebake.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/9/a29fa8dcd3fef9112a5bab1d78a1bb61ae7b9bb1.png)

Post-Bake:

![103892-baked.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/9/3392bdb7bb25f3b5e798083d6ce1bd639c5f7bd2.png)

Is this a bug, because it seems serious if so. If not, I assume I am missing something and would appreciate any help

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c62419a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c62419a](https://forums.unrealengine.com/u/anonymous_user_0c62419a)\
**Post date:** [August 31, 2016, 8:25pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/2 "2016-08-31T20:25:44Z")

</div>

Hi Rujuro,

I was able to reproduce this issue and have filed a bug report here: [Unreal Engine Issues and Bug Tracker (UE-35414)](https://issues.unrealengine.com/issue/UE-35414)

While testing I noticed at times that the shadow would bake as if the light was casting towards the root component location. The only work around I can think of in this situation is strategically placing the Blueprints in a way so that they intersect the attenuation radius at the root component.

Hope that helps,

---

<div class="post-metadata">

**Author:** ![rujuro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rujuro](https://forums.unrealengine.com/u/rujuro)\
**Post date:** [August 31, 2016, 8:35pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/3 "2016-08-31T20:35:06Z")

</div>

Ed, unfortunately I am just having to eat the performance cost and use actual static mesh components until this is resolved. It is pretty impossible to always make sure that the root is within all possible influencing lights when the point is to cheaply render a large number of meshes (since often that implies some area coverage, at least in our use case).

Glad the bug is filed though, hopefully it will be addressed, I voted for it.

---

<div class="post-metadata">

**Author:** ![OwenWP](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OwenWP](https://forums.unrealengine.com/u/OwenWP)\
**Post date:** [March 17, 2017, 6:43pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/4 "2017-03-17T18:43:18Z")

</div>

The cause of the problem is that the bounds of the instanced mesh component are not recalculated after new instances are added, causing static lights to be culled incorrectly during light baking.

I was able to fix the issue locally by adding a to UpdateBounds() at the end of UInstancedStaticMeshComponent::AddInstance.

---

<div class="post-metadata">

**Author:** ![rujuro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rujuro](https://forums.unrealengine.com/u/rujuro)\
**Post date:** [March 17, 2017, 11:02pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/5 "2017-03-17T23:02:38Z")

</div>

Owen! I’ll try this and see if it fixes my test case.

---

<div class="post-metadata">

**Author:** ![rujuro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rujuro](https://forums.unrealengine.com/u/rujuro)\
**Post date:** [July 10, 2017, 10:18pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/6 "2017-07-10T22:18:34Z")

</div>

So the problem with this is it does require a change to the engine code, and can’t be fixed in the Blueprint since there is no UpdateBounds() BP function.

---

<div class="post-metadata">

**Author:** ![Warlockaditya11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Warlockaditya11](https://forums.unrealengine.com/u/Warlockaditya11)\
**Post date:** [March 18, 2023, 3:45pm UTC](https://forums.unrealengine.com/t/instanced-static-meshes-dont-receive-direct-light-from-shadow-casting-stationary-lights/367871/7 "2023-03-18T15:45:11Z")

</div>

hey could you tell where specifically i have to change this
