Making displacementmapping from 2 meshes

hi all gifted freinds and foes!

I rember having seen a tutorial about making a displacement map from a low and a highdetail-mesh using a node caled somthing like closest distance.
I cant rember where it was.
Can any of you point me in the direction?

Thanks!
Mads