How to get which obj is shaded by shadow?

when I use sunlight I can see the shadow,but how can I get the obj id which is shaded by the shadow and the solar shadow trajectories on the obj surface

If you were looking for a simple answer “Just do this.” style… you will not find one.

This is a “non-trivial” problem. There are multiple ways to go about it but they all involve quite a bit of extra infrastructure.

…what is it that you are actually trying to do? Perhaps there is a simpler way to do that.

1 Like

thanks。what I want is :If there are many objects in the scene, I want the objects that are shaded to be highlighted, such as turning red. It would be better if I could obtain the coordinate range of the shadow in space or plane.

1 Like

The reason that it’s tricky is that shadows (cast by other objects) are a screen-pixel level post-processing effect. It doesn’t know anything about “objects” at that point. It’s just doing math combining one texture with another.

2 Likes

Thanks.I had thought about that,but I ask ChatGPT these days and it gave me a bunch of fake answers, :smile:.

For the things that 80 out of 100 developers could tell you how to do, I think chatGPT is pretty good. For the things that only 5 out of 100 developers know what you are talking about, I suspect it will always make up total nonsense.

3 Likes