[4.7.3] self shadow issue

I just found out that ‘self shadowing only’ became available since 4.6 build and did some tests.

It works well with directional light dynamic but point / spot lights cast shadows onto world objects
from self-shadowing only meshes. (all the lights were dynamic)

Tried to find any references about this ‘self shadow only’ feature but couldn’t find one.
Any help? Thanks

Hi STEIN84,

From what I can see “Self Shadowing Only” is working as intended. This option enabled object to not cast a shadow except on themselves, but does not guarantee that other shadows cannot be cast on to them. This will only work with movable objects as well. If you leave it as static it will bake a shadow when lights are built.

Here is a test for this:

In this test the spot lights are set to Movable. Both the Chairs in each is set to Movable.

As you can see in the first image with both using Self Shadowing Only the chairs are not casting a shadow. This is expected since they are flagged to self shadow only. They will receive light but not cast any shadows from that light.

In the second image I’ve enabled only the bottom mesh to use Self Shadow Only. The chair on the bottom is still only shadowing itself, but because the top mesh is not set to Self Shadow Only it will cast a shadow that can directly affect the mesh underneath. This is correct behavior, otherwise the meshes tagged with Self Shadow Only would never be shadowed by any other mesh.

This setting guarantees that any shadow being cast by the mesh itself is from it’s own shadows and not shadows generated by a light source. This does not say that it will prevent other shadows from affecting the mesh.

I hope this helps and if you have any questions feel free to ask.

There was a modification in ShadowSetup.cpp that I wasn’t aware of.
Getting rid of it, it works well like you said. Thanks :slight_smile:

One more question. Inset shadow (which is needed for self shadow only) isn’t available for point / spot lights for now. Is there a short term plan for making this available?

No plans that I’m aware of at the moment.