Node for "is a shadow falling on me?" spot?

i had a feeling dbw had something like that but might be 2015.

perhaps logic node and ray cast or spot info
 

perhaps use a gradient w/distance to, and using the light as a source for the gradient ?

or ray cast node ?
 
To check whether there are obstacles between light and spot, take World Position of Item light, subtract Spot World Position, normalize, and plug to Ray Cast Node Ray Direction. Take Spot World Position and use as Ray Origin. If result of Ray Cast is -1 there is no obstacles at all, if result is between 0.0 and Math > Vector > Distance between Spot World Position and Light Item Info node World Position, there are obstacles. Higher values that that calculated distance would mean that there is geometry behind light in that direction. The easiest would be making Gradient node with -1 key, and keys 0 and dynamic key (Show Output), taking Distance node output as key value.
 
Back
Top