0
$\begingroup$

I have one point light and one model in my scene, rendered in Cycles. What I'd like to do is create a proximity around the model, so that when the light approaches it, or any point light approaches it, it gradually becomes brighter. The closer it is to the object, the brighter the light. If the light leaves the proximity, it fades, until the light is shut off completely.

I know I could animate this by hand, but I'd like to have it happen automatically, like some videos I've seen where you have a null object, you move it near the model and it alters the models shape, or makes something grow around it. Just want to have this functionality with lights instead.

The only other alternative I thought of, is if there is some kind of setting somewhere, that I can define the reach of the light. So for example, I wouldn't have to move the light so far across the screen before it fades out.

Is there someway to achieve what I'm looking for?

$\endgroup$

1 Answer 1

1
$\begingroup$

You could use a driver for the power of the light:

enter image description here

Select your light, right click in the Power field and select "Add new driver". Then open a driver editor view and edit your driver type (the button to the left of "var") to be distance, and specify your lamp and the proximity target. Here, I've set the brightness of the lamp to 1000 divided by the distance, so when the lamp is close, it will be very bright, and when it is far, it will be dim.

Note that this gives the distance between objects, not the distance from the lamp to the surface of a mesh. If you want the distance to the nearest surface of the mesh, we might make a quick armature to take advantage of a shrinkwrap constraint:

enter image description here

Here, a parent bone has a copy location constraint targeting the light, while a child of that bone has a shrinkwrap constraint targeting Suzanne. Then I can use the distance between those two bones in the driver instead.

$\endgroup$
1
  • $\begingroup$ Very nice! This is perfect! Thank you! $\endgroup$ Jan 13, 2022 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .