Polygon Map Generation (Voronoi Islands)
Build fantasy-style island maps on a relaxed Voronoi graph: noise or radial shape sets land versus water, elevation grows from the coast, rivers follow downhill edges and moisture picks biomes.
Also known as mapgen2, Voronoi island generation
In the family Procedural generation, terrain generation
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | FastNoiseLite exposes cellular noise textures, not a built-in Voronoi polygonal island terrain generator. |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Place seed points (Poisson or relaxed random), compute the Voronoi/Delaunay graph, and treat each polygon as a map cell. A shape function (radial or noise-based) marks cells as land or water; ocean is flood-filled from the border so lakes remain distinct. Elevation increases with distance from the coast, rivers are traced down steepest edges and accumulate flow, moisture comes from distance to rivers and lakes, and a biome table maps elevation and moisture to colour. The graph is explicit, so cells carry data for gameplay, and the result can be turned into a heightmap or mesh.
When to choose it
Reach for it when
- generate fantasy world maps with islands
- need game map with biomes and rivers
- polygon based terrain for strategy games
- noise maps look unnatural for coastlines
Choose it for game worlds, board-game maps and stylised overworld terrain where graph data (provinces, rivers) matters. Prefer Fractal Brownian Motion and Multifractals or Stream-Power Erosion (Fluvial Terrain Uplift) for realistic heightfields, Terrain from Hydrology (River-First Terrain Synthesis) when river structure should shape terrain, and Procedural City Generation (L-system Road Networks) to lay out settlements.
Field marks
- Voronoi cell edges leave visibly polygonal coastlines unless smoothed or noise-perturbed
- River courses are constrained to cell edges, producing zigzag rivers
- Elevation from distance-to-coast gives uniform island-like shapes with little variety
- Biome tables overfit to Earth-like climates, giving odd maps on non-island layouts
Presets
Voronoi polygon island map with elevation-based biomes
{
"CELLS": 12,
"SEA_LEVEL": 0.32
}Show GLSL (38 lines)
// Polygon island map: Voronoi cells from jittered sites get elevation (noise minus radial falloff) and biome by height.
const float CELLS = 12.0;
const float SEA_LEVEL = 0.32;
vec2 hash2(vec2 p) { return fract(sin(vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)))) * 43758.5453); }
float vnoise(vec2 p) {
vec2 i = floor(p), f = fract(p), u = f * f * (3.0 - 2.0 * f);
float a = hash2(i).x, b = hash2(i + vec2(1, 0)).x, c = hash2(i + vec2(0, 1)).x, d = hash2(i + 1.0).x;
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
float elev(vec2 s) {
float n = 0.55 * vnoise(s * 4.0) + 0.3 * vnoise(s * 9.0 + 3.0) + 0.15 * vnoise(s * 19.0 + 9.0);
float r = length(s - 0.5) * 2.0;
return n * 1.1 - r * r * 0.8 + 0.18;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
vec2 p = uv * CELLS, ip = floor(p);
float d1 = 1e9, d2 = 1e9; vec2 best = vec2(0), second = vec2(0);
for (int j = -2; j <= 2; j++) for (int i = -2; i <= 2; i++) {
vec2 c = ip + vec2(i, j);
vec2 s = c + 0.15 + 0.7 * hash2(c);
float d = distance(p, s);
if (d < d1) { d2 = d1; second = best; d1 = d; best = s; } else if (d < d2) { d2 = d; second = s; }
}
float e = elev(best / CELLS);
vec3 col;
if (e < SEA_LEVEL) col = mix(vec3(0.05, 0.12, 0.3), vec3(0.15, 0.35, 0.55), smoothstep(-0.3, SEA_LEVEL, e));
else if (e < SEA_LEVEL + 0.04) col = vec3(0.85, 0.78, 0.55);
else if (e < 0.55) col = mix(vec3(0.3, 0.55, 0.25), vec3(0.15, 0.4, 0.2), (e - SEA_LEVEL) / 0.25);
else if (e < 0.7) col = mix(vec3(0.45, 0.4, 0.33), vec3(0.6, 0.57, 0.52), (e - 0.55) / 0.15);
else col = vec3(0.95);
float edge = (d2 - d1);
col *= 0.78 + 0.22 * smoothstep(0.0, 0.14, edge);
float es = elev(second / CELLS);
if ((e >= SEA_LEVEL) != (es >= SEA_LEVEL)) col = mix(col, vec3(0.1, 0.08, 0.05), smoothstep(0.1, 0.0, edge) * 0.8);
fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| voronoi-island-map-generation-specimen | Tesla T4 1920x1080 | 18.4× baseline (moderate) · 0.605 ms / 0.631 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| voronoi-island-map-generation-specimen | NVIDIA L4 1920x1080 | 18.4× baseline (moderate) · 0.292 ms / 0.295 ms · 2.1× faster on L4 | opengl-timer-query · Cross-architecture validation |
| voronoi-island-map-generation-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 12.3× baseline (moderate) · 0.355 ms / 0.355 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Sources
- primaryAmit Patel. Mapgen2 Procedural Island Map Generator. redblobgames.com.Verified via live page · 2026-11-29
- implementationredblobgames (2017). redblobgames/mapgen2. JavaScript version of mapgen2 polygon map generator algorithmsGitHub API · license Apache-2.0 · 2026-11-29