Directional light cull mask

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Andrea

Hello,
i got a solar system scene and i’m looking for a way to illuminate it in a “realistic way”, meaning each planet will be illuminated on the side facing the sun.
The planets are farther away than both the Omnilight and Spotlight ranges, so they do not work.

I was hoping to assign one directional light to each planet, but i cannot find a way to make one light affect a single mesh only, it seems the cull mask is not working properly and every directional light illuminates every planet (each planet will be illuminated from 8 different direction)

I’m stuck here, any suggestion on how to solve this problem?

It is discussed here Cull mask in DirectionalLight appears to have no effect · Issue #19438 · godotengine/godot · GitHub but unfortunately I don’t have any solution. I just ran into the issue myself.

cptnron | 2021-01-04 08:31

yeah, i found that github post myself, i was hoping somebody else in the forum found a way around the issue to make it work, i guess i have to way godot4

Andrea | 2021-01-04 11:45