Shadows setup question

So lets say I have this:

  🌞            ____
              /     \
     \o/      |     |
      |       |     |
-----/ \=====--      ===========
          A             B

where A is player shadow and B is house shadow. What I want is for A to be bound by small shadow camera around the player, and B to be in much larger shadow camera, as if there were two separate directional lights, sort of. But, at the same time, I want:
a) these 2 lights to behave as if there was only 1 light,
b) player shadow map to not contain any other objects shadows,
c) larger shadow map with B to be static (rendered only once).

Is there a way to achieve this kind of setup without hacking deep into 3js renderer / shaders?

No, this is not possible. One obvious setup is to have a single directional light which only illuminates the scene and two directional lights which have a light intensity of 0 and only as shadow projectors for the player and house. However, the problem is that shadows are defined by the absence of light. So you can’t have a shadow casting light in your scene which does not illuminate objects.

The only way I can think of is to have a quad below your player/house and apply ShadowMaterial on it. This special type of material still shows a shadow even if the light has a 0 intensity. However, the shadows might be too strong and there is no way right now to modulate their darkness, see:

1 Like

how about now, @Mugen87 ?