---
id: "weathering-simulation"
title: "Weathering simulation (weathered stone)"
domain: "materials"
stage: "material"
realtime: "offline"
platforms: [cpu, houdini, blender, python]
year_introduced: 1999
inputs: [mesh, texture]
outputs: [texture, material-params]
style: "photoreal"
dynamic: "static"
cost: "offline"
authority: "Dorsey et al., 1999"
url: "https://texelatlas.vercel.app/t/weathering-simulation/"
sources_verified_at: "2026-11-29"
---
# Weathering simulation (weathered stone) (Dorsey et al., 1999)

> Physically motivated ageing of surfaces: water flow, dust and salt deposition and erosion are simulated on the mesh to produce stains, crusts and wear that follow geometry and exposure rather than random noise.

## Reach for it when

- stone surfaces look too clean and new
- need realistic aging and water stains on buildings
- procedural dirt and erosion on materials
- make models look weathered over time

## How it works

Dorsey et al. model stone as a slab of layers with a water-transport simulation. Rainwater flows over the surface following gravity and exposure; where water seeps in it dissolves and transports minerals and, depending on the wetness and the saturation, deposits them in layers or erodes material. Surface and subsurface moisture are tracked on a volumetric grid (slab) beneath each surface point, and weathering creates stains, crusts (gypsum), erosion and discolouration. Appearance is rendered with subsurface-scattering since weathered stone is translucent and layered. Later work (gamma-ton tracing, Chen et al. 2005) replaces the fluid simulation with particle tracing, a stochastic transport of weathering agents across the surface, which handles dust, rust, moss and peeling paint in much less time.

## When to use it

Choose it when weathering must respond to geometry, orientation and exposure: ruins, monuments, rusting machinery. Prefer curvature- and AO-driven procedural masks in material shaders when you need a fast approximation in real-time. Prefer [Procedural noise for texturing](https://texelatlas.vercel.app/t/procedural-noise-texturing.md) for unstructured variation, and [Image quilting](https://texelatlas.vercel.app/t/image-quilting.md) to extend a scanned weathered exemplar.

## Cost

offline — Simulation runs offline on a mesh or voxel grid; results are baked to textures.
Measured GPU Weight: 100.14× baseline (extreme) — 3.2947 ms median / 3.5439 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 87.77× baseline (extreme) — 1.3955 ms median (2.36× faster on L4).
Ampere A100 scaling: 70.93× baseline (extreme) — 2.0429 ms median (1.61× faster on A100).

## Failure modes

- Needs a watertight, well-tessellated mesh and parameter tuning per material
- Simulation time and memory scale with grid resolution
- Results look plausible but are not predictive of real ageing
- Artist control is indirect; fixing one stain requires re-running the simulation

## Dataflow

- Inputs: mesh, texture
- Outputs: texture, material-params
- Platforms: cpu, houdini, blender, python

## Presets

### Stone Weathering Simulation — fresh carved limestone (left) vs moss, rain streaks & edge erosion (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_AGE_YEARS": 0.78,
  "P_MOSS_WET": 0.82,
  "P_RAIN_STREAK": 0.85,
  "P_SPLIT": 0.46
}
```

```glsl
const float P_AGE_YEARS = 0.78; // P Weathering Age [0.05, 1.0, 0.02]
const float P_MOSS_WET = 0.82; // P Moss & Moisture [0.0, 1.4, 0.04]
const float P_RAIN_STREAK = 0.85; // P Rain Wash Streaks [0.0, 1.5, 0.05]
const float P_SPLIT = 0.46; // P Fresh / Weathered [0.0, 1.0, 0.02]

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

float hash21(vec2 p) {
  p = fract(p * vec2(127.1, 311.7));
  p += dot(p, p + 34.5);
  return fract(p.x * p.y);
}

float vnoise(vec2 p) {
  vec2 i = floor(p);
  vec2 f = fract(p);
  vec2 u = f * f * (3.0 - 2.0 * f);
  return mix(
    mix(hash21(i), hash21(i + vec2(1.0, 0.0)), u.x),
    mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), u.x),
    u.y
  );
}

float fbm(vec2 p) {
  float a = 0.5, s = 0.0;
  for (int i = 0; i < 4; i++) {
    s += a * vnoise(p);
    p = p * 2.04 + vec2(13.7, 7.3);
    a *= 0.5;
  }
  return s;
}

float sdBox(vec3 p, vec3 b) {
  vec3 q = abs(p) - b;
  return length(max(q, 0.0)) + min(max(q.x, max(q.y, q.z)), 0.0);
}

// Architectural stone balustrade / temple shrine plinth
float mapStone(vec3 p, float erodeAmt) {
  float base = sdBox(p - vec3(0.0, -0.52, 0.0), vec3(0.76, 0.16, 0.52)) - 0.02;
  float colL = sdBox(p - vec3(-0.44, 0.02, 0.0), vec3(0.18, 0.42, 0.24)) - 0.02;
  float colR = sdBox(p - vec3(0.44, 0.02, 0.0), vec3(0.18, 0.42, 0.24)) - 0.02;
  float lintel = sdBox(p - vec3(0.0, 0.52, 0.0), vec3(0.72, 0.14, 0.34)) - 0.02;
  float d = min(min(base, lintel), min(colL, colR));
  // Subtle physical stone chipping & surface pitting increases with age
  float pit = (fbm(p.xy * 7.5 + p.z * 3.1) - 0.5) * 0.028 * erodeAmt;
  return (d + pit) * 0.85;
}

vec3 calcNormal(vec3 p, float erodeAmt) {
  vec2 e = vec2(0.0025, 0.0);
  return normalize(vec3(
    mapStone(p + e.xyy, erodeAmt) - mapStone(p - e.xyy, erodeAmt),
    mapStone(p + e.yxy, erodeAmt) - mapStone(p - e.yxy, erodeAmt),
    mapStone(p + e.yyx, erodeAmt) - mapStone(p - e.yyx, erodeAmt)
  ));
}

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 isWeathered = screenX >= split;
  float age = clamp(P_AGE_YEARS, 0.05, 1.0);
  float mossGain = clamp(P_MOSS_WET, 0.0, 1.5);
  float streakGain = clamp(P_RAIN_STREAK, 0.0, 1.6);

  float spin = sin(iTime * 0.38) * 0.42;
  vec3 ro = vec3(0.0, 0.16, 2.38);
  vec3 rd = normalize(vec3(uv - vec2(0.0, 0.03), -1.48));
  ro.xz = rot2(spin) * ro.xz;
  rd.xz = rot2(spin) * rd.xz;

  vec3 col = mix(vec3(0.030, 0.036, 0.052), vec3(0.075, 0.092, 0.128), smoothstep(-0.55, 0.55, uv.y));
  float erodeAmt = isWeathered ? age : 0.05;

  float t = 0.0;
  bool hit = false;
  for (int i = 0; i < 60; i++) {
    float d = mapStone(ro + rd * t, erodeAmt);
    if (d < 0.0025) { hit = true; break; }
    t += d;
    if (t > 6.0) break;
  }

  if (hit) {
    vec3 p = ro + rd * t;
    vec3 n = calcNormal(p, erodeAmt);
    vec3 lDir = normalize(vec3(0.62, 0.78, 0.52));
    float diff = max(dot(n, lDir), 0.0);
    float spec = pow(max(dot(n, normalize(lDir - rd)), 0.0), 22.0);

    // Multi-scale ambient occlusion / crevice accessibility & convex edge curvature
    float dNear = mapStone(p + n * 0.08, erodeAmt);
    float dMid = mapStone(p + n * 0.22, erodeAmt);
    float ao = clamp(0.32 + 0.68 * (dNear / 0.08 * 0.5 + dMid / 0.22 * 0.5), 0.18, 1.0);
    float crevice = clamp(1.0 - ao, 0.0, 1.0);
    float edgeWear = clamp((dNear - 0.078) * 18.0, 0.0, 1.0);

    // Base fresh warm limestone
    float grain = fbm(p.xy * 12.0 + p.z * 5.0);
    vec3 stoneAlb = mix(vec3(0.76, 0.72, 0.64), vec3(0.88, 0.84, 0.76), grain);

    if (isWeathered) {
      // 1) Gravity-driven vertical rain-runoff stains & calcium carbonate leaching streaks under lintel!
      float streakNoise = fbm(vec2(p.x * 16.0 + p.z * 9.0, p.y * 2.2));
      float underLintel = smoothstep(0.55, 0.32, p.y) * smoothstep(-0.55, 0.35, p.y) * (1.0 - abs(n.y));
      float streaks = smoothstep(0.42, 0.72, streakNoise) * underLintel * streakGain * age;

      // 2) Upward-facing & damp-crevice biological moss colonization
      float mossNoise = fbm(p.xz * 9.0 + p.y * 4.0);
      float mossMask = smoothstep(0.38, 0.72, n.y * 0.65 + crevice * 0.75 + mossNoise * 0.45 - 0.32) * mossGain * age;
      mossMask = clamp(mossMask, 0.0, 1.0);

      // 3) Soot/dirt darkening inside recessed crevices + pale leached limestone on exposed convex edges
      stoneAlb = mix(stoneAlb, vec3(0.24, 0.22, 0.20), clamp(crevice * 0.85 * age + streaks * 0.62, 0.0, 0.85));
      stoneAlb = mix(stoneAlb, vec3(0.92, 0.90, 0.84), edgeWear * 0.55 * age);
      vec3 mossCol = mix(vec3(0.14, 0.34, 0.12), vec3(0.34, 0.54, 0.16), mossNoise);
      stoneAlb = mix(stoneAlb, mossCol, mossMask);
      // Damp glossy sheen along rain runoff channels
      spec *= (0.65 + 1.45 * streaks);
    }

    col = stoneAlb * (0.24 + 0.84 * diff) * ao + vec3(0.96, 0.94, 0.90) * spec * 0.22;
  }

  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

- [Weathering that creeps along the surface](https://texelatlas.vercel.app/ideas/geodesic-weathering-sources/)

## Sources

1. [primary] Julie Dorsey, Alan Edelman, Henrik Wann Jensen, Justin Legakis, Hans Køhling Pedersen (1999) Modeling and rendering of weathered stone. Proceedings of the 26th annual conference on Computer graphics and interactive techniques  - SIGGRAPH '99. https://doi.org/10.1145/311535.311560 (verified via crossref on 2026-11-29)
2. [primary] Yanyun Chen, Lin Xia, Tien-Tsin Wong, Xin Tong, Hujun Bao, Baining Guo, Heung-Yeung Shum (2005) Visual simulation of weathering by γ-ton tracing. ACM Transactions on Graphics. https://doi.org/10.1145/1073204.1073321 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Weathering simulation (weathered stone)." https://texelatlas.vercel.app/t/weathering-simulation/ (accessed 2026-12-01).
