First of all, I created the map using the heightmap (with an 16bit image, so 0-65535, to avoid rounding errors)

var heightMap = wp.getHeightMap().fromFile(heightmap.png').go();
var westShift = -Math.round(537.6 * scale);var northShift = -Math.round(268.8 * scale);
var world = wp.createWorld().fromHeightMap(heightMap).shift(westShift, northShift).fromLevels(0, 65535).toLevels(0, 255).go();

All additional layers and the terrain were imported, too.

var riverLayer = wp.getLayer().fromFile('Rivers.layer').go();
var terrain = wp.getTerrain().fromFile('Custom_Mesa.terrain').go();
var customMesa = wp.installCustomTerrain(terrain).toWorld(world).inSlot(1).go();

Apply a lot of layer, e.g. the Border Layer (first apply it to the whole map and then remove it on water)

.shift(westShift, northShift)
.fromLevels(1, 255)

.shift(westShift, northShift)

Last but not least, save the map to the disk


Wanna see the full script and images I used? Get it on GitHub (external link).

One more thing: You should change the “worldpainter.vmoptions” file. Just add one row to the end of the file.


The best is to use the maximum of your RAM. (If you only have 4 GB installed, it is possible that you are not able to generate the world.)