Is it possible to have a movable actor receive shadows from other actors?

The level only has the ground mesh, the directional light, the occluder (7 shape - 2 static meshes), the tall movable cube, and a small static cube for reference)

  • All Engine Scalability Settings are set to ‘EPIC’
  • Directional light is set to: Stationary, Affects World, Cast Shadows, Cast Static Shadows, Cast Dynamic Shadows, and Dynamic Indirect Lighting.
  • The occluder is set to Static, Cast shadow, Affect Dynamic Indirect Lighting, Affect Distance Field Lighting, Dynamic Shadow, and Static Shadow.
  • The movable actor is set Movable, and the rest are the same as the occluder. The occluder is set to move 500cm side-to-side (x axis as indicated by my red arrows), in and out of the occluder’s shadow.
  • After any change I hit the Build button.

I simply want the movable actor to receive the shadow from the occluder while it’s behind it.

Eventually I want to have a character running around from bright areas to shadowed areas and have shadows affect him.

If I set the light to Movable, the occluder no longer casts a shadow.

If I set the directional Cascaded Shadow Maps->Dynamic Shadow Distance StationaryLight to cover the area, the occluder no longer casts a shadow.

If I set the movable actor to “Light as if Static” it’ll start with the correct shadow, but when it moves into the light, it doesn’t change (keeps looking shadowed).

Ideally a solution would work for other lights as well, like point lights and spotlights.

Hi Rantrod,

There are a couple of things to check.

Looking at your image it looks like your scalability settings are not set to EPIC. I do see you mention you’ve checked this, but the image looks like there that Temporal AA anti-aliasing is not being used, which is an indication of lower scalability setting when using basic scenes. Also, shadow casting is more limited when lower scalability settings are set. This is partly speculation base on your image though.

If I set the directional Cascaded Shadow Maps->Dynamic Shadow Distance StationaryLight to cover the area, the
occluder no longer casts a shadow.

So, with this, are you saying that if you set the Dynamic Shadow Distance Stationary to any value other than 0 the shadows stop working? If so, that’s a pretty clear indication for Scalability settings. The reason being that A stationary dynamic light will bake a shadow for any static objects. If the Dynamic shadow distance is left at 0 it will only use the baked lighting. If you change this, anything within that range will be dynamic shadows.If the scalaibilty is set too low for the Shadow option this can cause shadows to disappear. Make sense?

If I set the movable actor to “Light
as if Static” it’ll start with the
correct shadow, but when it moves into
the light, it doesn’t change (keeps
looking shadowed).

This is to be expected. You’re baking a light/shadow texture onto your movable object. Even moving it will keep the same lighting/shadowing baked into it.

Let me know what you find with the scalability. If it’s persistent in this project, start a new blank project and see if the problem follows.

Tim

Everything was set to ‘Epic’, however, I decided to close Unreal, close VS, opened them again, and then they worked as expected. grrrr.

Thank you.

How about with Pointlights and Spotlights?