# Where can I set bCastDynamicShadow to false?

**URL:** <https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075>\
**Category:** Rendering\
**Tags:** Frame-Rate, foliage-paint, unreal-engine, message-log, editor, Lighting, question\
**Created:** [September 6, 2014, 10:43pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075 "2014-09-06T22:43:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 6, 2014, 10:43pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/1 "2014-09-06T22:43:37Z")

</div>

After placing a bunch of SpeedTree foliage down with the paint tool, I’m getting a very low frame rate and this message in the log -

> InstancedFoliageActor\_0 Large actor receives a pre-shadow and will cause an extreme performance hit unless bCastDynamicShadow is set to false.

I’ve searched around and looked at other forum topics about this, but I cannot find where the option is specifically in the UI.

Can anyone please chime in? Thank you.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 6, 2014, 10:46pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/2 "2014-09-06T22:46:56Z")

</div>

In Foliage mode \> Show Instance tab \> scroll down to Lighting and you’ll see.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 6, 2014, 10:56pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/3 "2014-09-06T22:56:04Z")

</div>

I did a production quality lighting build after unchecking ‘Cast Dynamic Shadow’, on each foliage object but all of the shadows are messed up and the frame rate is sitting at around 30FPS.

Example - [http://i.imgur.com/4873JDy.jpg](http://i.imgur.com/4873JDy.jpg)

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/c/53c36d06506706b202332548283c6dbfcaf6ed4d.jpeg)  
The lightmap resolutions are 128 on the foliage.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 6, 2014, 11:08pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/4 "2014-09-06T23:08:06Z")

</div>

If you are talking about the shadows on the ground you need to increase the lightmap resolution of the landscape. Also make sure you have a lightmass importance volume covering the area.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 7, 2014, 12:09am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/5 "2014-09-07T00:09:24Z")

</div>

I didn’t have a lightmass importance volume covering the area, I’ll add that and re-bake.

Where is the lightmap resolution setting for the landscape stored at?

Thank you for your reply.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 7, 2014, 12:12am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/6 "2014-09-07T00:12:59Z")

</div>

Select the landscape and find **Static Lighting Resolution** in details panel. Increase it to 4 then go higher slowly if you need. And definitely place that lightmass importance volume and make sure it covers the whole area you want to build lights for. Not having that is the biggest reason you’ve been having messy shadows so far.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 7, 2014, 12:42am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/7 "2014-09-07T00:42:36Z")

</div>

Thank you, I was looking for a number with the power of 2 since it said resolution. I bumped the static lighting resolution up to 4 and added the light mass volume.

After a 15 minute rebake, this is the result from playing in game - [http://i.imgur.com/DBT4U6H.png](http://i.imgur.com/DBT4U6H.png)

The ground shadows look quite a bit better but the trees still look weird don’t you think?

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 7, 2014, 12:50am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/8 "2014-09-07T00:50:39Z")

</div>

Hmm, they do. The leaves especially. It may be a normals issue with the models or something with the materials so i’m not sure. Turn Cast Dynamic Shadows on and see if it changes anything. Also let us know if you have change any lightmass related setting in the light and world settings.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 7, 2014, 1:44am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/9 "2014-09-07T01:44:56Z")

</div>

…I don’t understand…I restarted the editor before turning the dynamic shadows on because some of the scene object detail panes wouldn’t show up.

I popped the dynamic shadows back on and now I’m getting 40+ FPS with lighting that looks much better…?

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/5/a75c052c35ae269405a80a22acc6f8d942ba20a1.jpeg)  
The only lighting changes I’ve made are to change the color of the sun light and rotate the directional light source to make it seem evening like.

I’m also getting a weird bug where the main sun shaft light is flicking very fast when looking right at the sun, my image won’t show it obviously, but have you heard of that?

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/d/59d6966bbc8a05c694531f9834890287b6202079.jpeg)

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 7, 2014, 1:53am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/10 "2014-09-07T01:53:44Z")

</div>

Yeah, now they look good. I wouldnt worry about that warning really. You should be more careful with your materials and meshes when it comes to foliage.

About the lightshafts; i dont know what may be causing it, unfortunately.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 7, 2014, 2:05am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/11 "2014-09-07T02:05:34Z")

</div>

Gotcha. Any ideas about this very rapidly flickering sun shaft?

Here’s a video of the problem - [UE4 - Sun shaft flicker bug - YouTube](http://youtu.be/DVJhs_YYwAA) it’s not as noticeable with YouTubes low framerate but it’s bad.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 7, 2014, 2:14am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/12 "2014-09-07T02:14:37Z")

</div>

It looks like bloom is too intense. I would reduce the bloom intensity and see if it helps. I have seen this kind of flickering with lightshafts and bloom but i believe it is the nature of the thing when you go too high with those values.

---

<div class="post-metadata">

**Author:** ![Vallamost\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost\_1](https://forums.unrealengine.com/u/Vallamost_1)\
**Post date:** [September 7, 2014, 2:18am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/13 "2014-09-07T02:18:23Z")

</div>

Hmm, I set the light shaft bloom value to 0.01 where the shafts are now gone but just the sun is flickering. Must be something else…

What’s weird is that I can toggle the Light Source visibility off and still get sun shafts and the flickering light.

I appreciate your help and time.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [September 7, 2014, 4:59pm UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/14 "2014-09-07T16:59:19Z")

</div>

Try deleting the light and create a new one, see if that helps. Other than that i’m out of ideas for now unfortunately.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_de2d5c40](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_de2d5c40](https://forums.unrealengine.com/u/anonymous_user_de2d5c40)\
**Post date:** [March 24, 2016, 8:00am UTC](https://forums.unrealengine.com/t/where-can-i-set-bcastdynamicshadow-to-false/293075/15 "2016-03-24T08:00:59Z")

</div>

I am getting the same message except mine doesn’t start with (InstancedFoliageActor) instead mine starts with (BP\_ThumbnailRenderStage\_2891) because I’m doing something else. But the rest of the message is the same, and I can’t find the Cast Dynamic Shadow setting any where. Since I’m not using Speed Tree the answer here is no use to me.  
Can anyone help please.
