It can probably be done by scripts right now… Unfortunately, I’m not much good at scripting. And I don’t think it can be accomplished just with a node group afaik.
But what I’d like is a node for Cycles materials that…
- Has the ability to browse/lookup and select an object (or empty) from the index, to which it references.
- Can measure the distance from the centerpoint of the object which the node containing material is applied to the centerpoint of the object selected via the lookup feature.
- Returns a vector that points towards the centerpoint of the looked up object from the center of the object having the node containing material applied to it.
- Has a true/false socket for collision of bounds of it’s containing object vs. lookup object.
- Has a true/false socket for any bounds collision of the containing object.
- Also generic proximity node that’s like the distance between two objects, but returns distance of multiple nearby objects. (Should have some level of clamp that limits number of objects and/or max distance, so it doesn’t get too crazy.)
I’m sure there are some other things… But there are a lot of cool effects that would be made easier if there was a ready-made node that gave some relationship feedback between two or even more objects. I hope the way I described it made enough sense so you could picture the usefulness of it.