Non-uniform coloring of the objects which cannot be UV mapped [Solved]

Assuming I have the object with dynamic topology (Voxel Remesh or Metaballs), what is the best way to assign colors to individual parts of it? Preferably, by creating a colored zone of influence around a helper object. I’ve tried to do that by adding 3 Value inputs into shader, then wiring them to dummy position using Drivers. But this is too much work defining each “container”, provided I may need multiple of them

I would use object coordinates from an empty.


So this is how it is. Took a while to figured out how to use, but it is still more convenient than what I’ve did. Thank you.