How to to calculate view factor


I want to calculate a simple view factor.
In other words, I fire rays from a certain point and want to know what the object the ray hits first.

However, if you use “Mesh | Ray”, each object is calculated separately, so the ray will pass through it. If you use “ShootRay”, you only know the coordinates.
Is there a good way to do it?

Thanks. (24.6 KB)

Isn’t that exactly what “IsoVist Ray” component does?
You need a specific solution inside python?

Is this what you want? (26.9 KB)


Thanks for the fast reply!

It is exactly what I was looking for.

Thank you for attaching an easy-to-understand sample.

It seems that we are finally able to proceed to the next step.