This is another example where you can use this method to generate your height field:
http://www.planetside.co.uk/forums/index.php/topic,21311.0.htmlThe advantage here is that you can set up an orthographic camera anywhere you like to sample the environment. This was written for the generation of a vector displacement map which can represent all axes of displacement, but with modification of the map can be used to generate height fields as well.
The logical thing to do would be to replace the displacement to vector shader with a displacement to scalar shader as you only need a single value (the Y or vertical displacement), but I think there's a bug in Terragen (version 3) which renders incorrectly, so the workaround would be to render the vector version then copy the green channel to red and blue in an external paint program. (There might even be some combination of nodes in Terragen to do this internally).
Then, depending on your intended use of the height field, you can convert to map produced by this method into a height field . I use World Machine to convert a .tif file into a .ter file for Terragen. The freebie program TerraConv could also be used.
If you intend to bring the height field back into Terragen (for instance to "bake" out a processor intensive Alpine terrain) then the displacement map can just be brought back into Terrain to create a displaced terrain.
p.s This method tests the displacement against the planet node, so planet curvature is taken into consideration.