I have the following scenario in cycles:
I would like to know if it is possible to create a gradient on a plane like the one on the image above where the colours depend on the distance to an object (sphere in this case). In this case, the surface right below the ball would be the nearest one and hence would be of one colour. As we move away from the plane's center the colour should change accordingly to the distance to the sphere. I would like to automatize the process so that blender takes the coordinates of the sphere and automatically draws a colour gradient on the plane's surface. I have managed to create the gradient but I cannot make it dependant of the distance to an object.
Thanks in advance






