---
id: "mpm-snow"
title: "Material Point Method (snow)"
aliases: [MPM]
domain: "simulation"
stage: "simulation"
realtime: "interactive"
platforms: [cpu, cuda, desktop-gpu, python, houdini]
year_introduced: 2013
inputs: [particles, voxels]
outputs: [particles]
style: "photoreal"
dynamic: "dynamic"
cost: "offline"
authority: "Stomakhin et al., 2013"
url: "https://texelatlas.vercel.app/t/mpm-snow/"
sources_verified_at: "2026-11-29"
---
# Material Point Method (snow) (Stomakhin et al., 2013)

> Particle/grid hybrid that simulates snow, sand and other elastoplastic continua, with a yield-based plasticity model that gives fracture, packing and clumping.

## Reach for it when

- snow should pack, clump and fracture
- simulating sand or mud that interacts with itself
- granular material needs plasticity and memory
- foam or snow piling against colliders
- deformable solids that remember how they were squashed

## How it works

Particles carry mass, velocity, a deformation gradient and plastic state. Each step: scatter mass and momentum from particles to a background grid (quadratic B-spline weights), compute grid forces from the elastic energy gradient, update velocities and apply collision boundaries, then gather velocities back and update each particle's deformation gradient. Snow plasticity clamps the singular values of the elastic part of the deformation gradient to a critical compression/stretch range and stores the excess as plastic deformation, with hardening that depends on the compressed volume. Because the grid handles contact and self-collision implicitly, snow can pile, break and fall without explicit collision handling.

## When to use it

Choose it when you need snow, sand, mud, foam or other history-dependent solids that interact with themselves and with rigid colliders. Prefer [FLIP/PIC fluids](https://texelatlas.vercel.app/t/flip-pic-fluids.md) for pure liquids, [Real-time snow and terrain deformation](https://texelatlas.vercel.app/t/snow-terrain-deformation.md) for cheap heightfield footprints in games, and [Position Based Dynamics](https://texelatlas.vercel.app/t/position-based-dynamics.md) or [Unified particle physics](https://texelatlas.vercel.app/t/unified-particle-physics.md) for realtime solids.

## Cost

offline — Heavy per-particle and per-grid-node work; offline at film quality, interactive on GPU at tens to hundreds of thousands of particles.
Measured GPU Weight: 24.1× baseline (heavy) — 0.7567 ms median / 0.7741 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 21.44× baseline (heavy) — 0.3388 ms median (2.23× faster on L4).
Ampere A100 scaling: 15.19× baseline (moderate) — 0.4375 ms median (1.73× faster on A100).

## Failure modes

- Numerical fracture: separating chunks 'melt' back together across grid-cell gaps
- Explicit time step limits can be tight for stiff materials
- Cell crossing noise with linear shape functions (hence quadratic B-splines)
- Particles can numerically stick to colliders and each other

## Engine support

- threejs: official — `examples/webgpu_compute_particles_fluid.html` (evidence: https://github.com/mrdoob/three.js/blob/r187/examples/webgpu_compute_particles_fluid.html, checked 2026-12-01) — MLS-MPM fluid compute example, not a snow constitutive model.

## Dataflow

- Inputs: particles, voxels
- Outputs: particles
- Platforms: cpu, cuda, desktop-gpu, python, houdini

## Presets

### Material Point Method (snow) — elasto-plastic snowball fracture & P2G/G2P Eulerian grid transfer (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_PLASTICITY": 0.78,
  "P_IMPACT_SPEED": 1,
  "P_GRID_VIS": 0.85,
  "P_CLUMP_COHESION": 0.72
}
```

```glsl
const float P_PLASTICITY = 0.78; // P Plastic Fracture [0.1, 1.5, 0.04]
const float P_IMPACT_SPEED = 1.0; // P Impact Cycle [0.0, 2.5, 0.05]
const float P_GRID_VIS = 0.85; // P Eulerian Grid [0.0, 1.5, 0.05]
const float P_CLUMP_COHESION = 0.72; // P Snow Cohesion [0.2, 1.4, 0.04]

vec2 hash21(float p) {
  vec3 p3 = fract(vec3(p) * vec3(0.1031, 0.1030, 0.0973));
  p3 += dot(p3, p3.yzx + 33.33);
  return fract((p3.xx + p3.yz) * p3.zy);
}

// Evaluate MPM snow clump particle state at cycle phase tau in [0, 1]
// Models pre-impact rigid flight -> plastic compression at wedge -> fractured snow chunks & powder spray
void mpmParticle(int idx, float tau, float plast, float coh, out vec2 pos, out float strain, out float rad) {
  float fi = float(idx);
  vec2 h = hash21(fi * 19.3 + 5.7);
  // 4 cohesive sub-chunks formed upon SVD singular-value clamping fracture
  float chunkId = floor(fi / 8.0);
  float chunkAng = chunkId * 1.5708 + 0.45;
  vec2 chunkOff = vec2(cos(chunkAng), sin(chunkAng)) * 0.075;

  // Initial packed snowball disc coordinates
  float r0 = sqrt(h.x) * 0.145;
  float a0 = h.y * 6.2831853;
  vec2 local0 = mix(vec2(cos(a0), sin(a0)) * r0, chunkOff + vec2(cos(a0), sin(a0)) * r0 * 0.45, clamp(coh * 0.55, 0.0, 0.8));

  // Flight from upper-left (-0.52, 0.24) into angled basalt wedge at (0.04, -0.14)
  float tImpact = 0.34;
  if (tau < tImpact) {
    float u = tau / tImpact;
    vec2 center = mix(vec2(-0.52, 0.24), vec2(-0.04, -0.02), u);
    pos = center + local0;
    strain = 0.0;
  } else {
    float u = (tau - tImpact) / (1.0 - tImpact);
    // Split upward/downward along the wedge faces + plastic pancake compression
    float side = (local0.y + 0.02 > 0.0) ? 1.0 : -1.0;
    vec2 splitDir = normalize(vec2(0.72, side * (0.68 + 0.28 * fract(chunkId * 0.618))));
    // Plastic compression hardening near impact face, tensile fracture outward
    vec2 squashed = vec2(local0.x * (1.0 - 0.52 * min(u * 2.5, 1.0) * plast), local0.y * (1.0 + 0.48 * min(u * 2.2, 1.0) * plast));
    float scatter = (0.14 + 0.42 * plast) * u * (0.55 + 0.65 * (1.0 - coh * 0.45) * h.x);
    vec2 gravityDrop = vec2(0.0, -0.26 * u * u);
    pos = vec2(-0.04, -0.02) + squashed + splitDir * scatter + gravityDrop;
    // Keep particles above floor y = -0.34
    pos.y = max(pos.y, -0.32 + 0.03 * h.y);
    strain = clamp(u * 1.45 * plast * (0.5 + 0.6 * abs(local0.x) * 6.0), 0.0, 1.0);
  }
  rad = 0.034 + 0.016 * h.y;
}

float sdTriangle(vec2 p, vec2 a, vec2 b, vec2 c) {
  vec2 e0 = b - a, e1 = c - b, e2 = a - c;
  vec2 v0 = p - a, v1 = p - b, v2 = p - c;
  vec2 pq0 = v0 - e0 * clamp(dot(v0, e0) / dot(e0, e0), 0.0, 1.0);
  vec2 pq1 = v1 - e1 * clamp(dot(v1, e1) / dot(e1, e1), 0.0, 1.0);
  vec2 pq2 = v2 - e2 * clamp(dot(v2, e2) / dot(e2, e2), 0.0, 1.0);
  float s = sign(e0.x * e2.y - e0.y * e2.x);
  vec2 d = min(min(vec2(dot(pq0, pq0), s * (v0.x * e0.y - v0.y * e0.x)),
                   vec2(dot(pq1, pq1), s * (v1.x * e1.y - v1.y * e1.x))),
                   vec2(dot(pq2, pq2), s * (v2.x * e2.y - v2.y * e2.x)));
  return -sqrt(d.x) * sign(d.y);
}

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 px = 1.0 / max(iResolution.y, 1.0);
  float tau = fract(iTime * 0.24 * max(P_IMPACT_SPEED, 0.05) + 0.42);
  float plast = clamp(P_PLASTICITY, 0.1, 1.6);
  float gridVis = clamp(P_GRID_VIS, 0.0, 1.6);
  float coh = clamp(P_CLUMP_COHESION, 0.15, 1.5);

  // Deep winter alpine twilight studio backdrop
  vec3 col = mix(vec3(0.03, 0.048, 0.082), vec3(0.075, 0.115, 0.175), smoothstep(-0.45, 0.55, uv.y));

  // Background MPM Eulerian APIC Grid (16x16 cell grid)
  float gScale = 14.0;
  vec2 gCell = floor(uv * gScale);
  vec2 gCenter = (gCell + 0.5) / gScale;
  vec2 gf = abs(fract(uv * gScale) - 0.5);
  float gLine = smoothstep(0.47, 0.50, max(gf.x, gf.y));
  float gNode = smoothstep(0.11, 0.04, length(fract(uv * gScale + 0.5) - 0.5));

  // Accumulate Lagrangian snow density, plastic strain, and P2G Eulerian grid activation
  float snowDens = 0.0;
  float strainSum = 0.0;
  float gridAct = 0.0;
  float minP = 1e5;
  for (int i = 0; i < 32; i++) {
    vec2 pp; float st; float rr;
    mpmParticle(i, tau, plast, coh, pp, st, rr);
    float d = length(uv - pp);
    minP = min(minP, d);
    float w = exp(-(d * d) / max(rr * rr * 1.15, 1e-5));
    snowDens += w;
    strainSum += w * st;
    // Quadratic B-spline P2G grid weight near current Eulerian cell
    float dg = length(gCenter - pp);
    gridAct += exp(-dg * dg * 95.0);
  }

  // Highlight active P2G Eulerian grid cells carrying transferred momentum
  if (gridVis > 0.01) {
    float act = clamp(gridAct * 0.42, 0.0, 1.0);
    col += vec3(0.12, 0.44, 0.72) * act * 0.34 * gridVis;
    col += vec3(0.24, 0.46, 0.68) * gLine * (0.14 + 0.45 * act) * gridVis;
    col += vec3(0.45, 0.86, 1.0) * gNode * act * 0.55 * gridVis;
  }

  // Rigid basalt impact wedge & snowy ground plane
  float dWedge = sdTriangle(uv, vec2(-0.04, -0.02), vec2(0.32, -0.35), vec2(0.32, 0.22));
  float dFloor = -uv.y - 0.35;
  if (dWedge < 0.0 || dFloor > 0.0) {
    vec3 rock = vec3(0.13, 0.16, 0.22) * (0.85 + 0.25 * smoothstep(-0.35, 0.2, uv.y));
    col = mix(col, rock, 0.94);
  }
  col = mix(col, vec3(0.58, 0.72, 0.88), smoothstep(px * 3.0, px * 0.6, abs(dWedge)) * 0.85);
  col = mix(col, vec3(0.48, 0.64, 0.82), smoothstep(px * 2.5, px * 0.5, abs(dFloor)) * 0.75);

  // Shaded MPM Snow Clumps (fresh snow white -> icy blue under high plastic hardening strain!)
  float snowMask = smoothstep(0.42, 0.72, snowDens);
  if (snowMask > 0.005) {
    float avgStrain = strainSum / max(snowDens, 1e-4);
    float sparkle = fract(sin(dot(floor(fragCoord * 0.75), vec2(12.98, 78.23))) * 43758.5);
    vec3 freshSnow = vec3(0.92, 0.95, 0.99);
    vec3 compressedIce = vec3(0.32, 0.74, 0.98);
    vec3 fracturedTint = vec3(0.98, 0.62, 0.28);
    vec3 sCol = mix(freshSnow, compressedIce, clamp(avgStrain * 0.85, 0.0, 1.0));
    sCol = mix(sCol, fracturedTint, smoothstep(0.65, 1.0, avgStrain) * 0.45);
    // Soft powdery rim lighting + crystalline glint
    float rim = smoothstep(1.35, 0.45, snowDens);
    sCol *= (0.76 + 0.26 * rim);
    sCol += vec3(0.55) * step(0.965, sparkle);
    col = mix(col, sCol, snowMask);
  }

  // Crisp Lagrangian material-point cores
  col = mix(col, vec3(1.0, 0.96, 0.85), smoothstep(0.012, 0.004, minP) * 0.55);

  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: Original interactive WebGL2 fragment shader written for Texel Atlas (MIT).

## Sources

1. [primary] Alexey Stomakhin, Craig Schroeder, Lawrence Chai, Joseph Teran, Andrew Selle (2013) A material point method for snow simulation. ACM Transactions on Graphics. https://doi.org/10.1145/2461912.2461948 (verified via crossref on 2026-11-29)
2. [implementation] taichi-dev (2020) taichi-dev/taichi_elements. https://github.com/taichi-dev/taichi_elements License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Material Point Method (snow)." https://texelatlas.vercel.app/t/mpm-snow/ (accessed 2026-12-01).
