How to render heightmap from 3d mesh

Hello can anyone tell me how to render heighmap from 3d terrain mesh?