Is there are way to create a material that will colour according to the thickness of the mesh it covers, based, perhaps, on length of edges at right angles to the mesh surface?
For example, white for a zero thickness plane, through a spectrum, to black at an arbitrary thickness beneath, that will change automatically if the mesh is manipulated.