heightmap exporter

Hello,

Is there a script that could convert a terrain mesh from Blender to a heightmap?

or

Is it possible to make a material in which the color of each pixel is modified in relation to the position, on a certain axis, of a vertex ? I could then just render the image from a top down view and use it as a heightmap.

thanks in advance,

Robert

https://blenderartists.org/forum/viewtopic.php?t=26189

The depth map might work