how to make a z-depth AND height pass?
Basic idea : render additional layer with overriding material which assign a grayscale value based on the point height  , use this layer as height pass 

Details :

create the overriding material that will replace all materials in the height pass as follows :



setup an the height pass to use the override material :



in the compositor use the color output of the Height layer as a height pass :



after compositing here is the result :
no height :

 with height :