---
id: "flip-pic-fluids"
title: "FLIP/PIC fluids"
aliases: [FLIP, PIC, PIC/FLIP]
domain: "simulation"
stage: "simulation"
realtime: "interactive"
platforms: [cpu, cuda, houdini, blender, desktop-gpu]
year_introduced: 2005
inputs: [particles, voxels]
outputs: [particles, volume-density]
style: "photoreal"
dynamic: "dynamic"
cost: "offline"
authority: "Zhu & Bridson, 2005"
url: "https://texelatlas.vercel.app/t/flip-pic-fluids/"
sources_verified_at: "2026-11-29"
---
# FLIP/PIC fluids (Zhu & Bridson, 2005)

> Hybrid fluid method: particles carry mass and velocity, a grid solves pressure, and FLIP-style delta transfer gives splashy, low-dissipation liquid motion.

## Reach for it when

- water simulation looks too damped and viscous
- splashy liquid with lots of detail and particles
- pure grid fluid loses small scale motion
- simulate liquid pouring and splashing for vfx

## How it works

Each step: transfer particle velocities to a staggered MAC grid, add gravity, enforce boundary conditions, project the velocity field to be divergence-free with a pressure solve (PCG or multigrid), then transfer back. PIC copies the new grid velocity to particles, which is stable but very viscous. FLIP transfers only the change in grid velocity, preserving detail but noisy. Production solvers blend them (for example 95-99% FLIP). Particles are advected with the grid velocity, and re-seeded to keep about 8 per fluid cell. Sand and granular media can be modelled by adding a friction-based yield model on top. The surface is extracted from particles via a level-set or anisotropic kernel.

## When to use it

Choose it when you want film-quality liquids with energetic splashes and little numerical dissipation. Prefer [Smoothed Particle Hydrodynamics (fluids)](https://texelatlas.vercel.app/t/sph-fluids.md) or [Position Based Fluids](https://texelatlas.vercel.app/t/position-based-fluids.md) for realtime GPU liquids, [Material Point Method (snow)](https://texelatlas.vercel.app/t/mpm-snow.md) when you also need elastoplastic solids (snow, sand, mud) in the same solver, and [Stable Fluids](https://texelatlas.vercel.app/t/stable-fluids.md) for smoke on a pure grid.

## Cost

offline — Pressure solve on the grid dominates; production solvers are offline or interactive at modest resolution.
Measured GPU Weight: 44.69× baseline (heavy) — 1.3855 ms median / 1.4413 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 43.97× baseline (heavy) — 0.6991 ms median (1.98× faster on L4).
Ampere A100 scaling: 31× baseline (heavy) — 0.8929 ms median (1.55× faster on A100).

## Failure modes

- FLIP noise: high-frequency velocity jitter and splash 'fizz' when blend ratio is too high
- Volume drift or loss without particle-count-per-cell maintenance and volume correction
- Thin features below the grid resolution are lost or turn into clumps
- Pressure solve with free-surface and solid boundaries is sensitive to bad Neumann/Dirichlet setups

## Engine support

- blender: builtin — `Physics Properties > Fluid > Type = Domain, Domain Type = Liquid > Liquid > Simulation Method = FLIP or APIC` (evidence: https://docs.blender.org/manual/en/5.2/physics/fluid/type/domain/settings.html, checked 2026-12-01) — FLIP and APIC; the solver is Mantaflow.
- unreal: official — `Enable Niagara Fluids plugin > Grid 3D FLIP Liquid emitter templates` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/niagara-fluids-reference-in-unreal-engine, checked 2026-12-01)

## Dataflow

- Inputs: particles, voxels
- Outputs: particles, volume-density
- Platforms: cpu, cuda, houdini, blender, desktop-gpu

## Presets

### FLIP/PIC Fluids — damped PIC grid transfer (left) vs energetic FLIP velocity-delta blend (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_FLIP_RATIO": 0.95,
  "P_GRID_RES": 10,
  "P_WAVE_AMP": 1,
  "P_SPLIT": 0.48
}
```

```glsl
const float P_FLIP_RATIO = 0.95; // P FLIP Blend Beta [0.0, 1.0, 0.02]
const float P_GRID_RES = 10.0; // P MAC Grid Cells [6.0, 18.0, 1.0]
const float P_WAVE_AMP = 1.0; // P Splash Energy [0.3, 1.8, 0.05]
const float P_SPLIT = 0.48; // P PIC / FLIP Split [0.0, 1.0, 0.02]

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);
}

// Divergence-free MAC grid velocity field u(x,y) = curl(psi)
vec2 macVelocity(vec2 p, float t, float flipBeta) {
  float k = 4.2;
  float vx = cos(p.y * k + t * 1.4) * sin(p.x * 3.1 - t * 0.9);
  float vy = -sin(p.y * k + t * 1.4) * cos(p.x * 3.1 - t * 0.9) * 0.72;
  // FLIP preserves fine high-frequency sub-grid vorticity that PIC diffuses away
  float sub = flipBeta * 0.55;
  vx += sub * sin(p.y * 11.5 - t * 2.8) * cos(p.x * 9.2 + t * 1.9);
  vy += sub * cos(p.y * 11.5 - t * 2.8) * sin(p.x * 9.2 + t * 1.9);
  return vec2(vx, vy);
}

float sdArrow(vec2 p, vec2 a, vec2 b) {
  vec2 pa = p - a;
  vec2 ba = b - a;
  float h = clamp(dot(pa, ba) / max(dot(ba, ba), 1e-5), 0.0, 1.0);
  return length(pa - ba * h);
}

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 screenX = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  bool isFlip = screenX >= split;
  float beta = isFlip ? clamp(P_FLIP_RATIO, 0.0, 1.0) : 0.04;
  float res = clamp(floor(P_GRID_RES + 0.5), 6.0, 18.0);
  float amp = clamp(P_WAVE_AMP, 0.2, 2.0);
  float t = iTime;

  vec3 col = mix(vec3(0.022, 0.032, 0.052), vec3(0.052, 0.072, 0.112), smoothstep(-0.5, 0.5, uv.y));

  // Tank domain
  vec2 tankBox = abs(uv) - vec2(0.68, 0.39);
  float dTank = length(max(tankBox, 0.0)) + min(max(tankBox.x, tankBox.y), 0.0);
  float inTank = step(dTank, 0.0);

  // Background staggered MAC pressure/velocity grid
  vec2 cellUV = uv * res;
  vec2 cellId = floor(cellUV);
  vec2 cellF = fract(cellUV) - 0.5;
  vec2 cellCenter = (cellId + 0.5) / res;

  float gridLine = smoothstep(0.045, 0.01, min(abs(cellF.x - 0.5), abs(cellF.y - 0.5)));
  gridLine = max(gridLine, smoothstep(0.045, 0.01, min(abs(cellF.x + 0.5), abs(cellF.y + 0.5))));
  col += vec3(0.045, 0.075, 0.125) * gridLine * inTank;

  // Draw MAC velocity vectors inside each grid cell
  vec2 vCell = macVelocity(cellCenter, t, beta);
  float vMag = length(vCell);
  vec2 arrowEnd = (vCell / max(vMag, 1e-4)) * min(vMag * 0.24, 0.38);
  float dArr = sdArrow(cellF, -arrowEnd * 0.35, arrowEnd);
  col += mix(vec3(0.14, 0.38, 0.62), vec3(0.28, 0.85, 0.92), clamp(vMag * 0.7, 0.0, 1.0)) *
         smoothstep(0.055, 0.015, dArr) * 0.42 * inTank;

  // Evaluate 36 Lagrangian fluid particles transferring velocity with MAC grid
  float fluidField = 0.0;
  float speedSum = 0.0;
  float minP = 1e5;
  float splashMask = 0.0;

  for (int i = 0; i < 36; i++) {
    float fi = float(i);
    vec2 h = hash21(fi * 13.7 + 1.9);
    float colI = mod(fi, 9.0);
    float rowI = floor(fi / 9.0);

    // Base wave + PIC viscous damping vs FLIP ballistic cresting
    float bx = (colI - 4.0) * 0.142 + 0.05 * sin(t * 1.4 + rowI * 0.8);
    float crest = sin(bx * 4.2 - t * 2.1) * 0.095 * amp * (0.35 + 0.65 * beta);
    float by = -0.27 + rowI * 0.102 + crest;

    // FLIP retains sharp sub-grid spray arcs above the wave crest
    vec2 vLocal = macVelocity(vec2(bx, by), t, beta);
    float lift = (rowI > 2.5) ? (beta * 0.115 * amp * pow(max(0.5 + 0.5 * sin(t * 2.4 + fi * 1.3), 0.0), 2.0)) : 0.0;
    vec2 pPos = vec2(bx, by + lift) + vLocal * (0.022 + 0.055 * beta) * amp;
    pPos.x = clamp(pPos.x, -0.63, 0.63);
    pPos.y = clamp(pPos.y, -0.35, 0.34);

    float d = length(uv - pPos);
    minP = min(minP, d);
    float rK = 0.135;
    if (d < rK) {
      float q = 1.0 - d / rK;
      float w = q * q * q;
      fluidField += w;
      speedSum += w * (length(vLocal) + lift * 6.0);
    }
    if (rowI > 2.5 && beta > 0.3) {
      splashMask = max(splashMask, smoothstep(0.024, 0.008, d) * beta);
    }
  }

  float mask = smoothstep(0.42, 0.58, fluidField) * inTank;
  if (mask > 0.005) {
    float avgSpd = speedSum / max(fluidField, 1e-4);
    vec3 picCol = mix(vec3(0.08, 0.28, 0.56), vec3(0.22, 0.52, 0.74), clamp(avgSpd * 0.5, 0.0, 1.0));
    vec3 flipCol = mix(vec3(0.05, 0.42, 0.78), vec3(0.18, 0.92, 0.88), clamp(avgSpd * 0.65, 0.0, 1.0));
    flipCol = mix(flipCol, vec3(0.95, 0.98, 1.0), smoothstep(1.1, 2.0, avgSpd) * 0.65);
    vec3 water = mix(picCol, flipCol, beta);
    float edgeFoam = smoothstep(0.75, 0.44, fluidField);
    water += vec3(0.85, 0.96, 1.0) * edgeFoam * (0.18 + 0.38 * beta);
    col = mix(col, water, mask * 0.88);
  }

  // Particle dots + ballistic FLIP spray droplets
  col = mix(col, vec3(0.88, 0.96, 1.0), smoothstep(0.015, 0.006, minP) * 0.72 * inTank);
  col += vec3(0.82, 0.97, 1.0) * splashMask * 0.75 * inTank;

  // Border and split bar
  col = mix(col, vec3(0.68, 0.84, 0.98), smoothstep(0.009, 0.002, abs(dTank)) * 0.85);
  col = mix(col, vec3(0.95, 0.97, 1.0), smoothstep(0.0035, 0.0008, abs(screenX - split)));

  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

- [Oblique-clipped planar reflections on sloshing FLIP fluid pools](https://texelatlas.vercel.app/ideas/flip-fluid-oblique-planar-reflections/)

## Sources

1. [primary] Yongning Zhu, Robert Bridson (2005) Animating sand as a fluid. ACM Transactions on Graphics. https://doi.org/10.1145/1073204.1073298 (verified via crossref on 2026-11-29)
2. [tutorial] Matthias Müller Ten Minute Physics. matthias-research.github.io. https://matthias-research.github.io/pages/tenMinutePhysics (verified via http on 2026-11-29)

## Cite this entry

Texel. "FLIP/PIC fluids." https://texelatlas.vercel.app/t/flip-pic-fluids/ (accessed 2026-12-01).
