{
 "id": "nubis-volumetric-clouds",
 "title": "Nubis-style Ray-marched Volumetric Clouds",
 "aliases": [
  "Horizon Zero Dawn clouds",
  "Nubis",
  "Volumetric Cloud Rendering",
  "Volumetric Clouds"
 ],
 "domain": "volumes",
 "subdomain": "clouds",
 "stage": "volume",
 "realtime": "realtime",
 "platforms": [
  "desktop-gpu",
  "webgpu",
  "unreal"
 ],
 "year_introduced": 2015,
 "inputs": [
  "texture",
  "depth",
  "material-params"
 ],
 "outputs": [
  "radiance",
  "volume-density"
 ],
 "style": "photoreal",
 "dynamic": "dynamic",
 "summary": "Sky-scale clouds from a coverage map and tiling 3D noise textures, ray-marched in a thick layer with cheap lighting and temporal reprojection to hit a few milliseconds.",
 "how_it_works": "Cloud density is composed on the fly. A weather texture gives coverage and cloud type; a height-gradient function shapes each type vertically; a low-frequency Perlin-Worley 3D texture carves the base shape and a higher-frequency Worley 3D texture erodes the edges, with curl noise distorting the lookup for wispy detail. A ray is marched through the layer (a spherical shell) with large steps that shrink when density is first found. At each sample a handful of cone-spread samples toward the sun estimate optical depth; a Beer-Lambert term, a powder-style darkening term for edges and a dual-lobe HG phase give the lighting. To fit the budget, only one pixel in each block of a small pattern is traced per frame and the result is reprojected and blended, and sky color and aerial perspective come from the atmosphere model.",
 "when_to_use": "Choose it for large, dynamic, fly-through skies in games and real-time visualisation where artists drive weather via a coverage map.\n\nPrefer `multiple-scattering-octaves` as an add-on when clouds look too dark and flat inside thick regions. Prefer `volume-ray-marching` with a full 3D grid (`openvdb`, `nanovdb`) for authored hero clouds. Use Sky/Atmosphere (`hillaire-sky-atmosphere`) for the lighting environment rather than a plain gradient.",
 "cost": {
  "class": "medium",
  "notes": "Tuned in production for a few ms on console-class GPUs using reduced-resolution tracing plus temporal reprojection; full-res without reprojection is much heavier."
 },
 "failure_modes": [
  "Ghosting and trailing of clouds under fast camera motion or wind from temporal reprojection",
  "Low-res tracing flickers or shimmers at cloud edges without careful jitter and history clamping",
  "Overly dark cloud interiors because only single scattering is evaluated",
  "Banding in the layer where step size is too coarse along grazing rays near the horizon",
  "Tiling of the noise volumes visible in the distance or at the layer boundary",
  "Cloud shadow on the ground needs a separate shadow-map-like pass"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "url:https://advances.realtimerendering.com/s2015/The%20Real-time%20Volumetric%20Cloudscapes%20of%20Horizon%20-%20Zero%20Dawn%20-%20ARTR.pdf",
   "type": "talk",
   "title": "The Real-time Volumetric Cloudscapes of Horizon Zero Dawn",
   "authors": [
    "Andrew Schneider"
   ],
   "year": null,
   "venue": "SIGGRAPH 2015, Advances in Real-Time Rendering",
   "url": "https://advances.realtimerendering.com/s2015/The%20Real-time%20Volumetric%20Cloudscapes%20of%20Horizon%20-%20Zero%20Dawn%20-%20ARTR.pdf",
   "ids": {},
   "license": null,
   "extra": {
    "http_status": 200,
    "live": true,
    "archive": {
     "url": "http://web.archive.org/web/20261001062600/https://advances.realtimerendering.com/s2015/The%20Real-time%20Volumetric%20Cloudscapes%20of%20Horizon%20-%20Zero%20Dawn%20-%20ARTR.pdf",
     "timestamp": "20261001062600"
    },
    "page_title": null,
    "host": "advances.realtimerendering.com",
    "title_confirmed_by_page": false,
    "title_unconfirmed": false
   },
   "provenance": {
    "title": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "http",
     "endpoint": "GET https://advances.realtimerendering.com/s2015/The%20Real-time%20Volumetric%20Cloudscapes%20of%20Horizon%20-%20Zero%20Dawn%20-%20ARTR.pdf → 200",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "research-draft",
     "endpoint": "title_hint/author_hint, checked against page title where available",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "schneidervolumetric"
  },
  {
   "role": "implementation",
   "key": "gh:takram-design-engineering/three-geospatial",
   "type": "code",
   "title": "takram-design-engineering/three-geospatial",
   "description": "Geospatial Rendering in Three.js",
   "authors": [
    "takram-design-engineering"
   ],
   "year": 2024,
   "venue": "GitHub",
   "url": "https://github.com/takram-design-engineering/three-geospatial",
   "ids": {
    "repo": "takram-design-engineering/three-geospatial"
   },
   "license": "MIT",
   "extra": {
    "stars": 1798,
    "stars_checked": "2026-11-29",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-05-27T06:40:25Z",
    "language": "TypeScript",
    "homepage": "https://takram-design-engineering.github.io/three-geospatial",
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/takram-design-engineering/three-geospatial",
     "checked_at": "2026-11-29T15:51:27.588Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-29T15:51:27.588Z",
   "title_sim": null,
   "__bib": "takramdesignengineering2024takram"
  }
 ],
 "presets": [
  {
   "id": "nubis-volumetric-clouds-specimen",
   "title": "Toy Nubis-style cloud layer with height gradient, coverage and detail erosion",
   "runtime": "glsl-fragment",
   "params": {
    "LAYER_LO": 1.2,
    "LAYER_HI": 3.2,
    "COVERAGE": 0.55,
    "DENSITY": 14
   },
   "code": "// Toy Nubis-style cloud layer: height-fraction gradient shapes the noise, coverage threshold carves\n// cumulus-like cells, detail noise erodes edges; lit by a short light-march with Beer + powder terms.\nconst float LAYER_LO = 1.2;\nconst float LAYER_HI = 3.2;\nconst float COVERAGE = 0.55;\nconst float DENSITY = 14.0;\n\nfloat h31(vec3 p) { p = fract(p * 0.1031); p += dot(p, p.zyx + 31.32); return fract((p.x + p.y) * p.z); }\nfloat vn(vec3 x) {\n  vec3 i = floor(x), f = fract(x); f = f * f * (3.0 - 2.0 * f);\n  return mix(mix(mix(h31(i), h31(i + vec3(1, 0, 0)), f.x), mix(h31(i + vec3(0, 1, 0)), h31(i + vec3(1, 1, 0)), f.x), f.y),\n             mix(mix(h31(i + vec3(0, 0, 1)), h31(i + vec3(1, 0, 1)), f.x), mix(h31(i + vec3(0, 1, 1)), h31(i + vec3(1, 1, 1)), f.x), f.y), f.z);\n}\nfloat fbm(vec3 p) { return 0.5 * vn(p) + 0.25 * vn(p * 2.0) + 0.125 * vn(p * 4.0) + 0.0625 * vn(p * 8.0); }\nfloat dens(vec3 p) {\n  float hf = clamp((p.y - LAYER_LO) / (LAYER_HI - LAYER_LO), 0.0, 1.0);\n  float grad = clamp(hf / 0.12, 0.0, 1.0) * clamp((0.85 - hf) / 0.45, 0.0, 1.0);\n  vec3 q = p * 0.6 + vec3(iTime * 0.05, 0.0, 0.0);\n  float shape = fbm(q * vec3(1.0, 1.4, 1.0)) * 1.9 * grad;\n  float d = shape - (1.0 - COVERAGE) * 0.9;\n  d -= 0.22 * (1.0 - hf) * fbm(q * 5.0 + 7.0);\n  return max(d, 0.0) * DENSITY;\n}\nvoid mainImage(out vec4 fragColor, in vec2 fragCoord) {\n  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;\n  vec3 ro = vec3(0.0, 0.05, 0.0);\n  vec3 rd = normalize(vec3(uv.x, uv.y * 0.9 + 0.22, -1.0));\n  vec3 L = normalize(vec3(0.5, 0.4, -0.6));\n  vec3 skyc = mix(vec3(0.75, 0.82, 0.92), vec3(0.2, 0.42, 0.8), clamp(rd.y * 2.2, 0.0, 1.0));\n  skyc += vec3(1.0, 0.9, 0.7) * pow(max(dot(rd, L), 0.0), 100.0) * 2.0;\n  vec3 col = skyc;\n  if (rd.y > 0.01) {\n    float t0 = (LAYER_LO - ro.y) / rd.y, t1 = min((LAYER_HI - ro.y) / rd.y, t0 + 14.0);\n    float ds = (t1 - t0) / 56.0; float T = 1.0; vec3 S = vec3(0.0);\n    float cs = dot(rd, L);\n    float ph = 0.7 * (1.0 - 0.5) / (12.566 * pow(1.25 - 0.9 * cs, 1.5)) + 0.3 * 0.0796;\n    for (int i = 0; i < 56; i++) {\n      vec3 p = ro + rd * (t0 + (float(i) + 0.5) * ds); float d = dens(p);\n      if (d < 0.01) continue;\n      float tau = 0.0;\n      for (int k = 1; k <= 4; k++) tau += dens(p + L * float(k) * 0.18) * 0.18;\n      float hf = clamp((p.y - LAYER_LO) / (LAYER_HI - LAYER_LO), 0.0, 1.0);\n      float light = (exp(-tau) + 0.35 * exp(-tau * 0.25)) * (1.0 - exp(-2.0 * d * 0.2));\n      vec3 amb = mix(vec3(0.25, 0.3, 0.4), vec3(0.6, 0.7, 0.9), hf) * 0.5;\n      S += T * (vec3(1.0, 0.93, 0.8) * light * ph * 10.0 + amb) * d * ds;\n      T *= exp(-d * ds);\n    }\n    float fade = exp(-t0 * 0.03);\n    col = mix(skyc, skyc * T + S, fade);\n  }\n  col = 1.0 - exp(-col * 1.3);\n  fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);\n}\n",
   "basis": "original",
   "license_note": "written for this index",
   "execution_fidelity": "conceptual-diagram",
   "proof": {
    "kind": "rendered",
    "label": "rendered 2026-11-29",
    "ok": true,
    "proof": {
     "ok": true,
     "technique": "nubis-volumetric-clouds",
     "runtime": "glsl-fragment",
     "checked_at": "2026-11-29T15:51:50.471Z",
     "renderer": "Chromium 145.0.7632.6 headless, WebGL2 via ANGLE/SwiftShader, 512×512, iTime=1.5",
     "stats": {
      "mean": 0.7024,
      "std": 0.0877,
      "unique_colors": 41
     },
     "image": "/specimens/nubis-volumetric-clouds-specimen.webp",
     "reason": null
    }
   }
  }
 ],
 "related": [
  "multiple-scattering-octaves",
  "volume-ray-marching",
  "hillaire-sky-atmosphere",
  "henyey-greenstein-phase-function"
 ],
 "extends": [
  "volume-ray-marching",
  "multiple-scattering-octaves"
 ],
 "supersedes": [],
 "combines_with": [
  {
   "id": "hillaire-sky-atmosphere",
   "why": "Atmosphere LUTs give sun colour at the cloud, and clouds are composited under the aerial-perspective pass."
  },
  {
   "id": "multiple-scattering-octaves",
   "why": "Replaces the single-scatter shading with a multi-octave approximation that brightens cloud interiors."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-29T15:51:27.588Z",
  "draft": "data/drafts/volumes/nubis-volumetric-clouds.json"
 },
 "solves": [
  "need dynamic fly-through clouds in a game",
  "artists want to paint weather coverage",
  "sky clouds must render in a few milliseconds",
  "cloud layers need cheap lighting at large scale"
 ],
 "authority": "Schneider",
 "url": "https://texelatlas.vercel.app/t/nubis-volumetric-clouds/",
 "execution_fidelity": "conceptual-diagram",
 "fidelity_label": "Visual Diagram",
 "benchmark_eligible": false,
 "gpu_weight": {
  "weight_x": 3355.35,
  "tier": "extreme",
  "p50_ms": 110.3911,
  "p95_ms": 110.787,
  "baseline_p50_ms": 0.0329,
  "gpu": "Tesla T4/PCIe/SSE2",
  "resolution": "1920x1080",
  "method": "opengl-timer-query",
  "frames": 20,
  "preset_id": "nubis-volumetric-clouds-specimen",
  "execution_fidelity": "conceptual-diagram",
  "fidelity_label": "Visual Diagram",
  "benchmark_eligible": false,
  "generated_at": "2026-11-30T21:07:47Z",
  "l4": {
   "weight_x": 2713.18,
   "tier": "extreme",
   "p50_ms": 43.1396,
   "p95_ms": 44.2504,
   "speedup_x": 2.56,
   "gpu": "NVIDIA L4/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0159
  },
  "a100": {
   "weight_x": 2148.34,
   "tier": "extreme",
   "p50_ms": 61.8721,
   "p95_ms": 61.9978,
   "speedup_x": 1.78,
   "gpu": "NVIDIA A100-SXM4-40GB/PCIe/SSE2",
   "resolution": "1920x1080",
   "baseline_p50_ms": 0.0288
  }
 }
}