Image to Heightmap converter

Two weeks ago I mentioned one more feature I want to add to make heightmap truly customizable — “get Heightmap from the image” function. I found the idea promising and now I want to describe the way it was implemented. Let's start from the idea I had. Currently there are 2 options for a heightmap customization: … Continue reading Image to Heightmap converter


Polygonal rivers and river editor

Even I've already wrote two posts about rivers and got a positive feedback, rivers are still a weak point and need to be re-worked. First thing you notice when you start to edit maps in vector graphics editor is that rivers are just a bunch of separate curved segments with different width. I had to use this … Continue reading Polygonal rivers and river editor


The previous post was mostly devoted to the Fluvial Network calculation and rivers rendering was not covered enough. I stayed on the straightforward and even unexpected solution: draw rivers based on their length only. It’s rather elegant, but tributaries don’t increase the main stem volume and this may be a problem. In real world tributaries … Continue reading Confluences

River systems

Now it's a good time to draw some rivers. As we already have a heightmap we do not need to fabricate rivers out of nothing and will calculate river systems based on precipitation drainage. The first step is to build a precipitation model. Frankly speaking, we can omit this step and consider that each cell has the same precipitation. It will be … Continue reading River systems


We already got scalable Voronoi graph and heightmap on it. The next step is to draw a coastline that will make the border between water a land masses clearer. The easiest way to separate land and water is just to omit the water rendering. We can set background to our svg element to represent the water and then draw … Continue reading Coastline