Thanks to the quick and useful responses on the Celestal Heavens forum, I could extract the height map of the Emerald Island to recreate it in Godot.
In order to do it:
- I installed Might and Magic 7 vanilla and then the GrayFace’s patch.
- Afterwards, I downloaded the MM7Extension and pasted it into the game installation directory.
- Start a new game, Ctrl+F1 to bring up the debug menu. The debug menu accepts Lua scripts. The following suffices to dump the height map data to a CSV format:
map_file = io.open("emerald_height_map.txt", "w")
for k in Map.HeightMap do
for j in Map.HeightMap[k] do
map_file:write(Map.HeightMap[k][j], ",")
end
map_file:write("\n")
end
map_file.close()
The height map, when copied into LibreCalc with value based colors gave the following, ok-ish looking result:

- I could then use Python to convert the CSV file to an image:
from PIL import Image
import numpy
my_data = numpy.genfromtxt("emerald_height_map.txt", delimiter=',')
im = Image.fromarray(my_data)
im2 = im.convert("L")
im2.save("emerald.png")
- Since Godot height maps’ seem to prefer OpenEXR format, I used Gimp to open the PNG file, and simply export as EXR.
- I then followed a concise tutorial, starting from the half, to get a collision map, and a mesh for the island.
The final result, imperfect but showing the map loaded into Godot, looks like this:
Compared to the following original, you can recognize the major features of the island, although its height is not ideal, textures are wrong and it’s more “spiky”.
