Understanding dipoles in non-homogeneous materials