Correct scaling when importing heightmaps

So, I’ve developed a quick and easy process to get real-world heightmaps in UE4, but I’m stuck at getting the scaling of the imported heightmap to be correct. Because you can zoom and export from MicroDem at arbitrary zoom levels, there’s no way to tell how long one pixel in the imported file will be. If anyone can help clean up this process, I’d greatly appreciate it!

  1. Download IMG DEM data from the NED
  2. Open and merge DEMs in MicroDem, selecting the IMG file
  3. Toggle off grid display and legends
  4. Redraw map as grayscale elevation
  5. Export BMP image
  6. Open new Photoshop document at recommended landscape size, 16-bit, grayscale color mode
  7. Place BMP image in file, and fill extra space with like values (will be deleted later)
  8. Export to 16-bit grayscale .PNG, no interlacing
  9. Create new heightfield in UE4, import .PNG
  10. Delete unnecessary components
  11. HELP!!! Scale landscape to proper size

I kind of developed my own blueprint to help me figure this out. I’ll measure the height at the lowest and highest points in MicroDEM (Z range), and find the range (in my case, the difference was only 25 meters). Then I find the range in Unreal. After that, it’s just a matter of proportions and ratios to calculate what the Z scale value of the landscape should be. Unfortunately, this only works to maintain proper proportions. It will not apply the proper scaling to the landscape. The whole thing can be too big or too small. For my purposes, this will not be necessary, but if someone can figure this out that would be great!