Movable static mesh not casting shadows

Hi,

I’ve created a vehicle blueprint and set it to movable but cant seem to get it to cast shadows to the ground. I had a directional light in my scene and have tried setting it to both Stationary and Movable but I can only seem to get the shadows to appear on the ground plane if the vehicle is set to static, which is not an option.

What am I doing wrong and how can I fix it?

Thanks

That should not be the case. If the car is set to movable and your light is set to either stationary or movable, it should cast dynamic shadow. The screenshot you provided has “lighting only” view mode on btw.

That is the lit scene. I had it in lighting mode so I could just see the shadows. What could be over riding this or preventing it then?

Not sure, really. Try checking the following:

Engine Scalability settings. Make sure everything is on epic.

Shadow casting options for car, floor and light. Try returning everything to default.

One of materials using unlit shading model.

Hi HomeGrownHeroz,

From the looks of the screenshot you’ve provided (which isn’t the best to get a sense of your scene’s setup), the car mesh is in an indirectly lit area where the light source is not directly shining on it the car to generate a shadow. I can get a sense of this because of the shading for the scene in this area and the post process effect for Ambient Occlusion around the bottom of the tire where it meets the ground.

Movable actors cannot cast shadows in indirectly lit areas. This is why the technique for capsule shadowing was added to the engine, but it doesn’t work well for arbitrary shapes like cars, chairs, etc. It’s mostly been designed for skeletal meshes for characters to have soft shadowing in indirectly lit areas.

For something like this, you can use a material derived method to fake soft shadowing underneath the car. This effect was used in the Showdown demo that is available on the Epic Games Launcher in the Learn Tab. Just look at the car we have in that scene and check out the Blueprint to see how it was done.

-Tim

Thanks for all the replies.

@Tim, you were right, the car wasn’t in direct view of the directional light. I’d still have expected some shadows to be rendered underneath the car. I took a look at the example you recommended but it seems a little too in depth for my needs. I was able to achieve the result I needed by just baking the shadows to a ground plane and then using a material instance to increase the darkness of the shadows.

Thanks again people!

With any direct light, there is no way to know what should be shadowed or not for movable objects. This is why we have capsule shadows now and hopefully in the not too distance future we’ll have arbitrary shapes for capsules so we can do soft ambient shadowing for objects like cars. With direct lighting on the object it’s easy to put that into a shadow map and know how it should be shadowed, Indirect lighting has no direct shadow caster.

For the showdown demo, The material is interchangeable between other objects, the only thing you would have to change in the material is the Texture Sample that is used for the shadowing. Just have something that is more fitting for the car you have.

Anyway, I’m glad you have a setup that works for you!

Tim