Where can I set bCastDynamicShadow to false?

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.

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

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


The lightmap resolutions are 128 on the foliage.

Any ideas?

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.

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.

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.

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

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

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.

…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…?


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?

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.

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

Here’s a video of the problem - UE4 - Sun shaft flicker bug - YouTube it’s not as noticeable with YouTubes low framerate but it’s bad.

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.

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.

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

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.