Occlusion: Showing Object that blocks Line of Sight

Godot Version

Godot Engine v4.5.1.stable.steam.f62fdbde1

Question

I have a simple top-down 2D setup with a tilemap.
For some tiles (house & tree), I have defined the occlusion layer.
With the PointLight2D and CanvasModulate, the view is blocked by houses and trees.
See Screenshot.

What I want to achieve is that the house and tree are completely visible (without being in the shadow), but still cast the shadow / block the vision behind them.

I know I could reduce the shape of occlusion polygon, but that would only show the outline of the house and tree and look really odd.

Set the LightOccluder to Show Behind Parent.

1 Like

thanks, I tried that, but nothing changes.

Can I see what it looks like now?

1 Like

sadly, exactly the same.

1 Like

Try increasing the Ordering > Z Index of your sprites.

The ground was on 0, the tree and house already on 1. I set the tree now to 2. Nothing changed.

Found a partial solution:

There are two solutions in there, since the original problem is now fixed, just use the initial instructions. There is one issue though, the objects that block the view are also visible if they are in the dark area and “fully lit up”.
The second solution, is the workaround, using a second light. I am currently using that approach, since it allows for more customization.

1 Like