Plant Ecosystem Distribution Simulation
Places thousands of plants on terrain by simulating seeding, competition for light and space, and survival across plant generations, so species cluster in ecologically plausible patterns.
Also known as ecosystem simulation for vegetation, competition-based plant placement
In the family Procedural generation, plants and vegetation
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 | No built-in ecological plant competition/distribution simulator. |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Deussen et al. couple a procedural plant model with a population simulation. Starting from an initial set of plants, the simulation iterates over years: plants seed new individuals nearby with dispersion depending on species, each plant's growth and survival depend on its neighbours' shading and root competition and on terrain conditions such as height and moisture, and weaker plants die. Efficiency comes from sorting plants and using only the dominant competitor near each plant. The output is a distribution of species, ages and sizes, which is then rendered with LOD, billboard clouds or geometry instancing. Variants replace the individual-based loop with density maps and procedural rules for speed.
When to choose it
Reach for it when
- scattered trees look random and unnatural
- forest needs species mix, clearings and age variety
- plants should compete for light and space realistically
- placing thousands of plants by hand is impractical
Choose it for natural-looking vegetation layouts where species mix, age distribution and clearings matter (forests, meadows). Prefer Poisson Disk Sampling (Bridson) for fast, uniform blue-noise placement when ecology doesn't matter, and MAP-Elites (Quality-Diversity Search) or Infinigen (Procedural Photorealistic Worlds) pipelines if the placement is part of a larger scene-generation system.
Field marks
- Parameters (competition radii, seeding distance) need ecological calibration or the simulation yields monocultures
- Terrain suitability maps (moisture, sunlight) need to be provided or the species distribution is flat
- Simulated output is a static snapshot: no seasonal change or disturbance unless modelled
- Renderer must handle massive instance counts; the plant distribution is only half of the problem
Presets
Plant Ecosystem Distribution — Poisson competition radii & biomes (left) vs self-thinned forest canopy (right)
{
"P_MOISTURE": 0.72,
"P_COMPETE_R": 0.85,
"P_TREE_SCALE": 8.5,
"P_SPLIT": 0.46
}Show GLSL (113 lines)
const float P_MOISTURE = 0.72; // P Valley Moisture [0.15, 1.2, 0.04]
const float P_COMPETE_R = 0.85; // P Canopy Competition [0.3, 1.3, 0.04]
const float P_TREE_SCALE = 8.5; // P Stand Density [5.0, 14.0, 0.5]
const float P_SPLIT = 0.46; // P Radii / Forest Split [0.0, 1.0, 0.02]
vec2 hash22(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * vec3(0.1031, 0.1030, 0.0973));
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.xx + p3.yz) * p3.zy);
}
// Terrain elevation & river moisture field across the valley map
vec2 evalSite(vec2 uv, float moistGain) {
float river = abs(uv.x - 0.14 * sin(uv.y * 5.2 + 0.4));
float elev = clamp(0.12 + river * 1.15 + 0.18 * sin(uv.x * 4.2) * cos(uv.y * 3.8), 0.0, 1.0);
float moist = clamp(exp(-river * 4.5) * moistGain + 0.15 * (1.0 - elev), 0.0, 1.0);
return vec2(elev, moist);
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isDiagram = screenX < split;
float moistG = clamp(P_MOISTURE, 0.1, 1.4);
float compR = clamp(P_COMPETE_R, 0.25, 1.4);
float dens = clamp(P_TREE_SCALE, 4.5, 16.0);
// Subtle slow drift over the watershed ecosystem
vec2 worldUV = uv + vec2(0.0, iTime * 0.035);
vec2 site = evalSite(worldUV, moistG);
float elev = site.x;
float moist = site.y;
// Base terrain soil & alpine contour backdrop
vec3 soil = mix(vec3(0.24, 0.30, 0.16), vec3(0.46, 0.42, 0.36), smoothstep(0.42, 0.85, elev));
// Valley river strip
float inRiver = smoothstep(0.068, 0.038, abs(worldUV.x - 0.14 * sin(worldUV.y * 5.2 + 0.4)));
vec3 riverCol = vec3(0.10, 0.46, 0.68);
vec3 col = mix(soil, riverCol, inRiver);
// Subtle elevation contour lines
float contour = smoothstep(0.05, 0.012, abs(fract(elev * 9.0) - 0.5));
col = mix(col, vec3(0.12, 0.16, 0.20), contour * (isDiagram ? 0.45 : 0.14));
// Self-thinning Poisson-disk multi-species stand evaluation over 3x3 cell neighborhood
vec2 g = worldUV * dens;
vec2 cell = floor(g);
vec2 sunDir = normalize(vec2(0.65, 0.76));
for (int dy = -1; dy <= 1; dy++) {
for (int dx = -1; dx <= 1; dx++) {
vec2 nc = cell + vec2(float(dx), float(dy));
vec2 rnd = hash22(nc);
vec2 treePos = (nc + 0.18 + 0.64 * rnd) / dens;
vec2 tSite = evalSite(treePos, moistG);
float tElev = tSite.x;
float tMoist = tSite.y;
// Skip plants falling directly into river channel or barren rocky peaks
float dRiv = abs(treePos.x - 0.14 * sin(treePos.y * 5.2 + 0.4));
if (dRiv < 0.055 || tElev > 0.88) continue;
// Species selection by niche suitability (elev, moisture) + self-thinning dominance radius!
// 0 = riparian willow/alder (wet lowland), 1 = broadleaf oak (mid valley), 2 = alpine conifer (high dry ridge)
float species = (tMoist > 0.46) ? 0.0 : ((tElev < 0.52) ? 1.0 : 2.0);
float age = 0.45 + 0.55 * hash22(nc + 19.3).x;
float canopyR = (species < 0.5 ? 0.42 : (species < 1.5 ? 0.50 : 0.34)) * age * compR / dens;
vec2 diffP = worldUV - treePos;
float d = length(diffP);
if (isDiagram) {
// Left: Ecological competition circles, trunk dots & species-coded dominance rings
vec3 spCol = (species < 0.5) ? vec3(0.20, 0.92, 0.84)
: (species < 1.5 ? vec3(0.96, 0.74, 0.22) : vec3(0.46, 0.88, 0.32));
float ring = exp(-abs(d - canopyR) * 180.0);
float fill = smoothstep(canopyR, canopyR * 0.85, d) * 0.22;
float dotC = smoothstep(0.010, 0.004, d);
col = mix(col, spCol, fill);
col += spCol * ring * 0.92;
col = mix(col, vec3(0.98, 0.99, 1.0), dotC);
} else {
// Right: Rendered sunlit multi-species forest crowns with soft drop shadows!
float dShad = length(diffP + sunDir * canopyR * 0.55);
col *= mix(1.0, 0.62, smoothstep(canopyR * 1.05, canopyR * 0.6, dShad));
// Scalloped organic crown silhouette
float ang = atan(diffP.y, diffP.x);
float scallop = 1.0 + 0.12 * sin(ang * (species > 1.5 ? 9.0 : 5.0) + rnd.x * 6.28);
float rEff = canopyR * scallop;
if (d < rEff) {
float hCrown = sqrt(max(1.0 - (d / max(rEff, 1e-4)) * (d / max(rEff, 1e-4)), 0.0));
vec3 nCrown = normalize(vec3(diffP / max(rEff, 1e-4), hCrown));
float lit = max(dot(nCrown, normalize(vec3(sunDir, 0.85))), 0.0);
vec3 spCol = (species < 0.5) ? vec3(0.24, 0.66, 0.34)
: (species < 1.5 ? mix(vec3(0.32, 0.56, 0.16), vec3(0.76, 0.54, 0.16), rnd.y)
: vec3(0.08, 0.32, 0.22));
col = spCol * (0.28 + 0.90 * lit);
}
}
}
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| ecosystem-plant-distribution-live | Tesla T4 1920x1080 | 18.6× baseline (moderate) · 0.611 ms / 0.649 ms | opengl-timer-query · 32 frames · GPU Weight Atlas · Colab T4 sweep |
| ecosystem-plant-distribution-live | NVIDIA L4 1920x1080 | 16.9× baseline (moderate) · 0.269 ms / 0.272 ms · 2.3× faster on L4 | opengl-timer-query · Cross-architecture validation |
| ecosystem-plant-distribution-live | NVIDIA A100-SXM4-40GB 1920x1080 | 13.4× baseline (moderate) · 0.385 ms / 0.388 ms · 1.6× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): cited by Joint Non-Local Means (JNLM) Path-Tracing Denoiser, Procedural City Generation (L-system Road Networks), Wang Tiles (Aperiodic Tile Synthesis).
Crosses
- Regrow a photographed site: Photograph a real site, strip the messy captured vegetation off, and regrow it procedurally: true topography with clean, editable, LOD-friendly plants that still stand where the real canopy was.
- Forests that grow into the gaps: Biomes where terrain, plant placement and each tree's shape are linked. Erosion supplies wet valleys and dry ridges, an ecosystem simulation places species by moisture and competition, and every crown grows only into space its neighbours left free.
- Tiger-bush drylands: Semi-arid biomes with the banded, spotted and maze-like vegetation patterns real drylands show. A reaction-diffusion field with a downhill drift decides where plants can survive, and an ecosystem simulation fills those patches with individual species.
- Space Colonization Tree Modeling: The ecosystem simulation chooses which species goes where; tree generators supply the geometry.
Sources
- primaryOliver Deussen, Pat Hanrahan, Bernd Lintermann, Radomír Měch, Matt Pharr, Przemyslaw Prusinkiewicz (1998). Realistic modeling and rendering of plant ecosystems. Proceedings of the 25th annual conference on Computer graphics and interactive techniques - SIGGRAPH '98.Verified via crossref · 2026-11-29doi:10.1145/280814.280898