{
 "id": "ihmsen-unified-whitewater",
 "title": "Ihmsen Unified Spray, Foam, and Bubble Whitewater Simulation",
 "aliases": [
  "unified whitewater",
  "diffuse fluid particles",
  "secondary spray foam bubble simulation"
 ],
 "domain": "simulation",
 "subdomain": "particle fluids",
 "stage": "simulation",
 "realtime": "realtime",
 "platforms": [
  "webgl2",
  "webgpu",
  "desktop-gpu",
  "cuda",
  "cpu",
  "houdini",
  "blender"
 ],
 "year_introduced": 2012,
 "inputs": [
  "particles",
  "voxels"
 ],
 "outputs": [
  "particles"
 ],
 "style": "photoreal",
 "dynamic": "dynamic",
 "summary": "Generate and advect secondary spray, surface foam, and submerged air-bubble particles from a single one-way-coupled particle pool driven by primary fluid turbulence, wave crests, and local fluid density.",
 "how_it_works": "Primary liquid solvers such as [sph-fluids](sph-fluids) and [flip-pic-fluids](flip-pic-fluids) resolve bulk water motion but lack the resolution to directly capture fine droplets, bubbly wakes, and lingering frothy sheets. Ihmsen's unified model runs a lightweight secondary particle pool coupled one-way to the liquid.\n\nEach step, emission potential is evaluated at primary fluid particles (or sampled fluid cells) by combining three physical cues: **trapped air** from velocity differences with nearby fluid (or FLIP/PIC disagreement and impact impulses), **wave crests** where surface curvature and outward motion peak, and **kinetic energy** so calm water emits nothing. High-potential regions spawn diffuse particles into free pool slots.\n\nAll diffuse particles share one state representation and are dynamically classified every step solely by the surrounding primary fluid density (or neighbor count): particles in low-density air act as **spray** flying ballistically under gravity and drag; particles at the free surface act as **foam** advected passively by the underlying fluid velocity while gradually decaying; and particles surrounded by dense liquid act as **air bubbles** experiencing upward buoyancy plus drag toward the local water velocity. Because classification is continuous and stateless, plunging spray seamlessly turns into submerged bubbles that rise back into surface foam.",
 "when_to_use": "Choose it whenever particle-based waterfalls, splashes, ocean breakers, or water spells need believable aerated detail without shrinking the primary fluid particle spacing.\n\nPrefer [flow-map-water](flow-map-water) or [fft-ocean](fft-ocean) with Jacobian foam masks when rendering large open water surfaces that do not use 3D fluid particles. Prefer [soft-particles](soft-particles) for hand-placed mist or waterfall billboard sheets when no physical fluid solver is present.",
 "cost": {
  "class": "medium",
  "notes": "One-way coupling avoids expensive inter-particle pressure solves; cost scales linearly with secondary particle count and grid/neighbor density lookups, fitting easily into GPU compute or fragment passes."
 },
 "failure_modes": [
  "One-way coupling means dense foam mats cannot dampen surface waves or exert buoyancy back onto the liquid",
  "Poorly tuned trapped-air or kinetic-energy thresholds either flood calm pools with snow-like foam or starve energetic splashes",
  "Coarse primary fluid grids cause foam particles to float slightly above or sink below the reconstructed liquid surface",
  "Dense overlapping whitewater sprites cause heavy overdraw and sorting pops unless rendered with order-independent blending"
 ],
 "sources": [
  {
   "role": "primary",
   "key": "doi:10.1007/s00371-012-0697-9",
   "type": "paper",
   "title": "Unified spray, foam and air bubbles for particle-based fluids",
   "authors": [
    "Markus Ihmsen",
    "Nadir Akinci",
    "Gizem Akinci",
    "Matthias Teschner"
   ],
   "year": 2012,
   "venue": "The Visual Computer",
   "url": "https://doi.org/10.1007/s00371-012-0697-9",
   "ids": {
    "doi": "10.1007/s00371-012-0697-9"
   },
   "license": null,
   "extra": {
    "csl_type": "journal-article"
   },
   "provenance": {
    "title": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1007/s00371-012-0697-9",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "authors": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1007/s00371-012-0697-9",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "year": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1007/s00371-012-0697-9",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "venue": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1007/s00371-012-0697-9",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "url": {
     "authority": "crossref",
     "endpoint": "https://api.crossref.org/works/10.1007/s00371-012-0697-9",
     "checked_at": "2026-11-30T17:59:51.239Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-30T17:59:51.239Z",
   "title_sim": 1,
   "__bib": "ihmsen2012unified"
  },
  {
   "role": "implementation",
   "key": "gh:humpalumps/ultra-elements",
   "type": "code",
   "title": "Humpalumps/ultra-elements",
   "description": "Real-time elemental spell VFX lab for three.js (WebGL2): 39 tunable spells",
   "authors": [
    "Humpalumps"
   ],
   "year": 2026,
   "venue": "GitHub",
   "url": "https://github.com/Humpalumps/ultra-elements",
   "ids": {
    "repo": "Humpalumps/ultra-elements"
   },
   "license": "MIT",
   "extra": {
    "stars": 131,
    "stars_checked": "2026-11-30",
    "archived": false,
    "fork": false,
    "pushed_at": "2026-10-30T21:54:34Z",
    "language": "JavaScript",
    "homepage": null,
    "license_name": "MIT License"
   },
   "provenance": {
    "title": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "authors": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "year": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "venue": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "url": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    },
    "license": {
     "authority": "github",
     "endpoint": "https://api.github.com/repos/Humpalumps/ultra-elements",
     "checked_at": "2026-11-30T17:59:51.239Z"
    }
   },
   "status": "verified",
   "checked_at": "2026-11-30T17:59:51.239Z",
   "title_sim": null,
   "__bib": "humpalumps2026humpalumps"
  }
 ],
 "presets": [],
 "related": [
  "sph-fluids",
  "flip-pic-fluids",
  "position-based-fluids",
  "screen-space-fluid-rendering",
  "gpu-particle-systems"
 ],
 "extends": [
  "sph-fluids"
 ],
 "supersedes": [],
 "combines_with": [
  {
   "id": "flip-pic-fluids",
   "why": "Primary FLIP particle velocity, trapped-air aeration, and grid density fields seed, classify, and advect the secondary whitewater pool."
  },
  {
   "id": "screen-space-fluid-rendering",
   "why": "Spray, foam, and bubbles layer over the smoothed liquid depth surface to add turbulent visual breakup and splash detail."
  },
  {
   "id": "weighted-blended-oit",
   "why": "Order-independent compositing renders tens of thousands of translucent foam and spray sprites without per-frame depth sorting."
  }
 ],
 "provenance": {
  "prose": "original text written for this index (research draft, editorially reviewed)",
  "sources_verified_at": "2026-11-30T17:59:51.239Z",
  "draft": "data/drafts/simulation/ihmsen-unified-whitewater.json"
 },
 "solves": [
  "particle fluid simulation lacks convincing spray foam and underwater bubbles",
  "need physically driven whitewater emission from breaking waves and splashes",
  "spawn secondary foam particles automatically where fluid air gets trapped",
  "transition whitewater smoothly between ballistic spray surface foam and bubbles",
  "make real-time sph or pbf water splashes look turbulent and aerated"
 ],
 "authority": "Ihmsen et al., 2012",
 "url": "https://texelatlas.vercel.app/t/ihmsen-unified-whitewater/",
 "execution_fidelity": "none",
 "fidelity_label": "No Live Specimen",
 "benchmark_eligible": false
}