---
id: "climbing-plants-simulation"
title: "Interactive Climbing Plant Modeling"
aliases: [ivy growth, vine simulation]
domain: "procgen"
stage: "procedural"
realtime: "interactive"
platforms: [cpu, desktop-gpu]
year_introduced: 2017
inputs: [mesh]
outputs: [curves, mesh]
style: "photoreal"
dynamic: "both"
cost: "offline"
authority: "Hädrich et al., 2017"
url: "https://texelatlas.vercel.app/t/climbing-plants-simulation/"
sources_verified_at: "2026-11-29"
---
# Interactive Climbing Plant Modeling (Hädrich et al., 2017)

> Simulates climbing vines such as ivy growing over scene geometry, using a physically motivated stem model with attachment, free-hanging behaviour and user guidance.

## Reach for it when

- need ivy to grow across buildings and ruins
- vines should follow and cling to existing geometry
- dress sculptures with hanging creepers
- hand-placing vines on walls takes forever

## How it works

Each plant is a tree of stem segments that grow at their tips toward light-like or user-chosen goals. A tip senses the scene surface; when it touches geometry it attaches and follows the surface, while tips that lose contact may hang under gravity or search for a new support. Stem mechanics treat the plant as a flexible rod with bending resistance so free segments sag and swing. The authors expose artist controls (growth seeds, directional hints, painting areas to cover) and keep the simulation interactive so the user can steer growth on complex scenes, then instantiate leaves along stems. It is an agent-based growth model constrained by collision with the scene.

## When to use it

Choose it for dressing buildings, ruins and sculptures with convincing ivy or vines, where coverage should depend on the actual geometry. Prefer [Space Colonization Tree Modeling](https://texelatlas.vercel.app/t/space-colonization-trees.md) for free-standing trees, [L-Systems](https://texelatlas.vercel.app/t/l-systems.md) for stylised plants, and [Plant Ecosystem Distribution Simulation](https://texelatlas.vercel.app/t/ecosystem-plant-distribution.md) when you need to place many plants across a landscape rather than grow one on a wall.

## Cost

offline — Per-step collision and attachment queries against scene geometry; interactive in the paper's setup, minutes for dense coverage of large scenes.
Measured GPU Weight: 98.12× baseline (extreme) — 3.2283 ms median / 3.5529 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 82.64× baseline (extreme) — 1.314 ms median (2.46× faster on L4).
Ampere A100 scaling: 63.66× baseline (extreme) — 1.8335 ms median (1.76× faster on A100).

## Failure modes

- Stems penetrate thin geometry or clump in concave corners
- Dense leaf instancing is expensive and often needs LOD or impostors
- Result depends on the seed placement and guidance, so unguided runs can leave bare areas
- Reference code is not widely available, so replicating the exact behaviour requires reimplementation

## Dataflow

- Inputs: mesh
- Outputs: curves, mesh
- Platforms: cpu, desktop-gpu

## Presets

### Climbing Plant Simulation — clinging vine tendrils & anchor nodes (left) vs sunlit ivy foliage on stone pillar (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_VINE_GROW": 0.86,
  "P_LEAF_DENS": 0.9,
  "P_ROT_SPEED": 0.48,
  "P_SPLIT": 0.46
}
```

```glsl
const float P_VINE_GROW = 0.86; // P Climb Height [0.2, 1.0, 0.02]
const float P_LEAF_DENS = 0.90; // P Leaf Density [0.1, 1.3, 0.04]
const float P_ROT_SPEED = 0.48; // P Orbit Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.46; // P Stems / Ivy Split [0.0, 1.0, 0.02]

mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }

// Evaluate helical thigmotropic vine clinging to stone column (radius 0.42)
// Returns vec3(distToVineStem, distToLeafBlade, climbMask)
vec3 evalClimbingVine(vec3 p, float growH, float leafDens) {
  float r = length(p.xz);
  float ang = atan(p.z, p.x);
  float yMax = mix(-0.62, 0.72, growH);
  float grown = smoothstep(yMax + 0.08, yMax - 0.08, p.y);

  // 3 phototropic climbing primary vines spiraling upward around the cylinder surface
  float dStem = 1e5;
  float dLeaf = 1e5;
  for (int v = 0; v < 3; v++) {
    float fv = float(v);
    float phase = fv * 2.094395 + p.y * (3.8 + fv * 0.45) + 0.25 * sin(p.y * 5.0 + fv);
    float dAng = atan(sin(ang - phase), cos(ang - phase));
    float arcD = abs(dAng) * 0.42;
    float radD = abs(r - 0.432);
    float dV = length(vec2(arcD, radD)) - 0.018;
    dStem = min(dStem, dV);

    // Alternating botanical ivy leaves sprouting off the clinging vine stem!
    float leafRow = floor(p.y * 11.0 + fv * 3.1);
    float yLocal = fract(p.y * 11.0 + fv * 3.1) - 0.5;
    float side = (mod(leafRow, 2.0) > 0.5) ? 1.0 : -1.0;
    float leafAngOff = dAng - side * 0.16;
    vec2 lUV = vec2(leafAngOff * 0.42, yLocal / 11.0);
    // Heart/ivy-lobe leaf silhouette
    float rL = length(lUV * vec2(1.0, 1.25));
    float lobe = 0.052 * (0.78 + 0.22 * cos(atan(lUV.y, lUV.x) * 3.0)) * leafDens;
    float dL = max(rL - lobe, abs(r - 0.455) - 0.018);
    dLeaf = min(dLeaf, dL);
  }
  return vec3(dStem, dLeaf, grown);
}

// Combined scene SDF: stone column (mat=1), vine stem (mat=2), ivy leaves (mat=3)
vec2 mapScene(vec3 p, float growH, float leafDens, bool withLeaves) {
  // Fluted ancient stone column + capital
  float ang = atan(p.z, p.x);
  float dCol = max(length(p.xz) - (0.42 - 0.01 * cos(ang * 12.0)), abs(p.y) - 0.78);
  vec2 res = vec2(dCol, 1.0);

  vec3 vine = evalClimbingVine(p, growH, leafDens);
  if (vine.z > 0.05) {
    float dS = mix(1.0, vine.x, vine.z);
    if (dS < res.x) res = vec2(dS, 2.0);
    if (withLeaves) {
      float dL = mix(1.0, vine.y, vine.z);
      if (dL < res.x) res = vec2(dL, 3.0);
    }
  }
  return vec2(res.x * 0.78, res.y);
}

vec3 calcNormal(vec3 p, float growH, float leafDens, bool withLeaves) {
  vec2 e = vec2(0.0025, 0.0);
  return normalize(vec3(
    mapScene(p + e.xyy, growH, leafDens, withLeaves).x - mapScene(p - e.xyy, growH, leafDens, withLeaves).x,
    mapScene(p + e.yxy, growH, leafDens, withLeaves).x - mapScene(p - e.yxy, growH, leafDens, withLeaves).x,
    mapScene(p + e.yyx, growH, leafDens, withLeaves).x - mapScene(p - e.yyx, growH, leafDens, withLeaves).x
  ));
}

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 withLeaves = screenX >= split;
  float growH = clamp(P_VINE_GROW, 0.15, 1.0);
  float leafDens = clamp(P_LEAF_DENS, 0.1, 1.4);
  float spin = iTime * max(P_ROT_SPEED, 0.0) * 0.45;

  vec3 ro = vec3(0.0, 0.08, 2.22);
  vec3 rd = normalize(vec3(uv, -1.52));
  ro.xz = rot2(spin) * ro.xz;
  rd.xz = rot2(spin) * rd.xz;

  vec3 col = mix(vec3(0.032, 0.042, 0.062), vec3(0.085, 0.115, 0.165), smoothstep(-0.55, 0.55, uv.y));

  float t = 0.0;
  vec2 hit = vec2(1e5, 0.0);
  for (int i = 0; i < 64; i++) {
    vec2 h = mapScene(ro + rd * t, growH, leafDens, withLeaves);
    if (h.x < 0.0022) { hit = vec2(t, h.y); break; }
    t += h.x;
    if (t > 5.0) break;
  }

  if (hit.x < 1e4) {
    vec3 p = ro + rd * hit.x;
    vec3 n = calcNormal(p, growH, leafDens, withLeaves);
    vec3 l1 = normalize(vec3(0.62, 0.78, 0.52));
    vec3 l2 = normalize(vec3(-0.68, 0.18, -0.55));
    float diff1 = max(dot(n, l1), 0.0);
    float diff2 = max(dot(n, l2), 0.0);
    float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 28.0);

    vec3 alb;
    if (hit.y < 1.5) {
      // Limestone column
      float grain = 0.5 + 0.5 * sin(p.y * 18.0 + sin(p.x * 12.0));
      alb = mix(vec3(0.60, 0.56, 0.50), vec3(0.76, 0.72, 0.64), grain);
    } else if (hit.y < 2.5) {
      // Woody climbing stem + bright cyan thigmotropic anchor nodes on left side!
      alb = vec3(0.30, 0.24, 0.14);
      if (!withLeaves) {
        float anchor = smoothstep(0.78, 0.96, sin(p.y * 42.0));
        alb = mix(vec3(0.24, 0.86, 0.58), vec3(0.98, 0.82, 0.24), anchor);
      }
    } else {
      // Lush translucent sunlit ivy leaves
      float leafVar = 0.5 + 0.5 * sin(p.y * 24.0 + p.x * 18.0);
      alb = mix(vec3(0.12, 0.42, 0.14), vec3(0.42, 0.72, 0.18), leafVar);
    }

    col = alb * (0.24 + 0.84 * diff1 + 0.24 * diff2) + vec3(0.96, 0.98, 0.90) * spec * (hit.y > 2.5 ? 0.36 : 0.14);
  }

  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.

## Combination ideas

- [Overgrown grammar cities](https://texelatlas.vercel.app/ideas/ivy-on-grammar-architecture/)

## Sources

1. [primary] Torsten Hädrich, Bedrich Benes, Oliver Deussen, Sören Pirk (2017) Interactive Modeling and Authoring of Climbing Plants. Computer Graphics Forum. https://doi.org/10.1111/cgf.13106 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Interactive Climbing Plant Modeling." https://texelatlas.vercel.app/t/climbing-plants-simulation/ (accessed 2026-12-01).
