3DEM can open various DEM formats and save them as Terragen ter files. Terragen can (in addition to doing many other things) export ter files to image files for use as Height Maps. All that is required to convert a ter file to an image is to Open the ter file with Terragen and Export it, selecting the desired file format to save as.
When selecting the area of the DEM, I recommend selecting a larger area then what you are planning to put in game and make sure to include unique features that will make lining up the height map with other textures easier.