Fade geometry inside a volume or another mesh?

I was wondering if it’s possible to write an effect like follows :

  • One mesh is partially overlapped either by a volume or another mesh
  • The overlapped area can then be faded or an effect applied to the material

What would be the method to achieve such an effect?

Location based opacity in UE4 :