No dynamic shadow with "light as if static" on

Hello,

I noticed this bug since the version 4.8 (was working with the previous version)

So when I used the option “light as if static”, I ve got no dynamic shadow anymore.

I noticed also “light as if static” is always off when I reload the project, but this bug has been reported already.

Thanks for your help!

Hello Maxxi,

In order to assist you with this issue I am going to need a bit more information.

  • What is your main light source casting shadows (assuming it is the default stationary directional)?
  • What is the lighting quality when you build your lighting, is it set to Production?
  • Would you mind providing me with some simple steps to follow in order to reproduce this issue on my end?
  • Are you working in engine version 4.8.3?

Thank you and let me know if you have further questions,

Hi Andrew,
Sorry for late answer, I didn’t get a notification.
You can reproduce this bug with the minimal_default scene, just set both chairs as movable and one of them set “light as if static”. you can see there is no shadow on the left chair (light as id static “on”). I did this test with 4.8.3 and 4.9.0

Hey Maxxi,

This is not a bug and is working as intended. Since your object is set as Movable, it is now a dynamic object that will cast dynamic shadows. However, you have marked the object to perceive its lighting to be static, but turned off the static shadow.

The documentation below can help you gain further insight on how shadow casting with different mobility types and settings work in the engine.

Shadow Casting

Cheers,

Hi Andrew,

Thanks for your quick answer!

This option was working perfectly until version 4.8.3, was it a bug before??

“Light as if static” is not about the shadow cast by the object, it’s about to get a baked static lighting (with lightmass) on a movable object.

Working for architecture, it is the only way to have movable doors with the same lighting as the static objects (walls, ceiling).

Or is there another way now to get a uniform lighting between static and movable object since 4.8.3?

I’ve got also the same bug reported here: "Light as if Static" setting not persisted - Rendering - Unreal Engine Forums

Could it be the reason it doesn’t work anymore?

Thanks for your help!

As I mentioned this is not a bug, but is working as intended. The bug that you are referring to, was addressed by the developers who determined this was by design. The information below is taken directly from the tooltip when you hover over the ‘Light as if Static’ option.

58138-lightasifstatic.png

If your static mesh object has static shadows ticked off, its mobility set to movable, and this option selected, it will not create a shadow. When an object has it’s mobility set to movable it no longer bakes into lightmass and casts a completely dynamic shadow.

Thank you,

“light as if static” option is only available for movable object. It wouldn’t make any sense to have a static shadow for an object you want to move. It means a movable object with baked lighting couldn’t get anymore a dynamic shadow. Something doesn’t add up. It’s like a major drawback!
So is the only solution to get back to version 4.7.6 or is there a another way to do that since version 4.8.3?
cheers

This is why we have stationary lights. They have the ability to cast dynamic and static shadows.

I suggest you take another read over the documentation below to get a better understanding of how lighting and shadowing work within the Engine between different mobility types.

Light Mobility

Thank you,

Thanks Andrew,

I guess I’m gonna get back to 4.7.6 then.

Btw there is the same kind of pb with the option “dynamic inset shadow”. It was working until 4.7.6. Now, from version 4.8.3, on the project “lightroom: interior daylight” made by Koola, you can see the tree has no dynamic shadow anymore.

this is indeed quite a drawback. Making a movable static mesh recieve lightmass lightmap calculation while casting a dynamic shadows is useful in so many cases. is there any way to force/hack this?

You can try this as a workaround:

  • duplicate your mesh

Mesh 1: Light as if Static

  • Enable Light as if Static
  • Disable cast static shadow

Mesh 2: shadow caster

  • Set it to Cast Hidden Shadow
  • Uncheck cast static shadow (shouldn’t though since it’s movable)
  • Check the option for Actor Hidden in Game
  • Uncheck Visible (Affects Editor only)

Now you have your mesh that can bake a static shadow to it and move, but this one will not cast a dynamic shadow. Using the other hidden mesh with a shadow that can cast while the mesh is hidden makes it so you can have the dynamic shadow without any issue.

I hope this helps you work around the issue you’re having.

-Tim

hah thats actually quite an obvious solution yet i didnt think of it. works great, thanks tim.