Movable meshes with cast shadow disabled not recieving shadows

Hello, I have an issue with shadows on movable meshes with the option “Cast Shadow” disabled. I’ve set up the following scene:


The ground and wall are static meshes, while the white wall box on the left is a movable mesh. I’ve been changing the mobility and Cast Shadow settings in the static mesh actors (the 12 white boxes in image).
My issue is that I want to have a movable mesh and disable cast shadow on it, but I still want the mesh to receive shadows from static meshes. Is this possible?

The movable meshes that have cast shadow enabled (top row in image) works just fine receiving shadows from the static mesh wall, but why does disabling Cast Shadows change this behavior?

Any help is appreciated! Either to fix the issue, or understand why it works like this.

Hey there @lissity! Welcome to the community! Cast shadows shouldn’t influence the object receiving shadows. Is this a project targeting mobile?

In my tests with 5.03 I can’t replicate it with an out of the box project. Swapping down to 4.26 and 4.27.

Edit: Ahhhh I see it. So out of the box 4.26/7 I had the same reaction as you, decided to test if movable and static lights have the same issue and as expected movable lights don’t have this issue, only the baked variants. I think in these versions, cast shadow also signifies whether the baked lights need to even worry about casting to the objects.

image

Thank you for your reply!

Good to know that it is working as I would expect in 5.03 at least!
I tried version 4.20 as well (in case this was something that only appeared in 4.26/7), and I had the same issue there where the movable object with cast shadow disabled don’t receive shadows from static objects.

This is an issue for me because I have certain objects that have cast shadow disabled temporarily inside an indoor environment, but it looks really strange since they get hit by the directional light/sun light when they shouldn’t.
I will have to work around this issue by either setting the directional light to movable or setting the walls to movable.

Absolutely, but beware. The directional light being moveable will cause more shadow cost. Unless you have a complex scene, it’s likely negligible, but do keep an eye on the performance and good luck!

1 Like