Why foliage doesnt receive static shadows if i disable cast static shadow?

I want my foliage (grass) to cast dynamic shadow because its has a wind effect, but if i set it to cast static shadow lightmass takes ages to build light so i disable cast static shadow on my grass but it doesnt receive static shadow. How can i make my grass cast only dynamic shadows and receive both?

1 Like

Anyone can help me?

Hey Almusx,

I am not sure which version of the engine you are running, but these settings should be universal within the last few builds. Even with the new feature improvements to foliage in 4.7 with instanced static meshes.

Here are some before and after images of a test bed I have set up with a grass material that has a wind normal effect like the one you described. These images will provide you with some reference for how to set up your foliage so it displays dynamic shadows based your ‘Directional Light’ being set to ‘Movable’

Foliage Instanced Mesh Settings

Foliage Static Mesh Settings

Dynamic Foliage Shadows On

The main thing you want to pay attention to here are your Foliage Instance Settings and the Static Mesh settings. Be sure they both have ‘Cast Shadow’ checked and ‘Dynamic Shadows’ are on as well.

Hopefully this resolved your issue, but if you are still having trouble let me know and we can try some other steps.

Cheers,

Hi, i will try to explain what i want…
I want my grass to cast dynamic shadows and receive static shadows from static meshes and bsp. The problem is to receive static shadow my grass need to cast static shadow but this make lightmass too slow because i have thousands of grass instances. So, to make lightmass happy i turn of static shadow on my grass (because i want it to cast only dynamic shadows) but after disabling cast static shadow on my grass it not receive static shadows from static meshes and bsp.

i forgot to tell you that my sun light is stationary because i am using lightmass.

Like you mentioned, in order to get static shadows to appear on your grass, you will need to have the ‘Cast Static Shadow’ enabled in the foliage mode. It cannot take in the information it needs to compute for the meshes casting shadows on top unless it is also casting a static shadow.

Here is a bit more in depth explanation of how Stationary Lights function within the Engine, and how to implement the light so it works as desired.

Stationary Light Shadowing

I pulled this from the ‘Shadow Casting’ documentation found on the link below. Give it a read as well to see if you understand how shadows are cast with certain light types.

If you are still confused or need help let us know and we can try a couple more things.

Thank you,

Ok. Thank you. So, even if my grass cast a dynamic shadow it needs cast static shadows on to receive static shadows. Its not possible to make a separate option for cast static shadow and receive static shadows? Because lightmass get too slow with static shadow on my grass.

You are welcome. I actually just gave an answer to a user who is trying to do something similar to you. Here is the post if you would like to see how he has set up his foliage to cast static and dynamic shadows.

One thing you could try to speed up your Lightmass build time would be to add a ‘Lightmass Importance Volume’ around your level. This binds the light computations to only what is inside of the volume space.

Another thing to try would be to use a low resolution for your grass foliage instead of something like 32 try 16.

Cheers,