Ok, I've done some experiments and found that the main problem I'm having is, that there isn't an easy way to feed a single material/shader with animated values from the individual objects. There are some approaches which are not developed far enough though. Just as an instance:
(early stage with bugs)
Use custom properties (variable values) in the node editor
(changes the property for all objects that own the material)
And I really would prefer to do the syncing within Blender itself. So you can actually divide this into two problems: 1st you need to somehow send color information to the shader. And there are some ways depending on what rendering engine is used.
For Blender Render that would be the objects color (can be found in the objects properties). You can then choose to use the "object color" within the options section of the material properties.
Now if you use Cycles that options falls away. As a slightly more complex and probably less performant solution, vertex colors can be used.
And as Jerryno suggested using an animated texture is also a great way to do complex lighting animations.
Secondly we need to animate the colors, and for that drivers would be the easiest, but least dynamic way. For a little more dynamic, scripted drivers can be written in python, which honestly helped me a lot. But for the maximum control you can write a handler for blender's handler functions.
This is just a little test script which messes around with an objects color and vertex colors:
def distance(va, vb):
return math.sqrt( (va-vb)**2 + (va-vb)**2 + (va-vb)**2 )
sphere = bpy.data.objects['Sphere']
sloc = sphere.location
sphere.color = 0.4;
for a in bpy.data.groups['Lichterkette'].objects:
aloc = a.location
d = 2**(-distance(aloc, sloc) * 1) * 5
# Color the object
c = a.color
c = d * 1.0
c = d * 0.5
c = d * 0.05
# Color the vertices
if hasattr(a.data.vertex_colors, 'Col'):
col = a.data.vertex_colors['Col']
for poly in a.data.polygons:
for idx in poly.loop_indices:
b.color = d * 1.0
b.color = d * 0.5
b.color = d * 0.0
For a reference of blender handler functions see
I'm not sure but it might also be possible to use "modal operators" but think that might make more sense for actual operators like grabbing, rotating etc.