Curl noise for procedural fluid motion
Take the curl of a smooth noise potential to get a velocity field with zero divergence, so advected particles swirl like fluid without bunching up or draining away.
Also known as curl noise, divergence-free noise, pseudo-fluid flow
In the family Simulation & animation, procedural flow
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | Official add-on | import { curlNoise } from 'three/addons/tsl/math/curlNoise.js' docs |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | Built in | GPUParticles3D > ParticleProcessMaterial.turbulence_enabled = true (evaluates 3D curl_3d noise field) docs |
| Unity | Official add-on | VFX Graph > Operator > Perlin Curl Noise (also Cellular/Value); Turbulence block docs Requires the Visual Effect Graph package. |
| Unreal 5.7 | Built in | Material graph: VectorNoise (Function = VNF_CURL_ALU); Niagara: Curl Noise Force module docs |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Pick a smooth scalar noise potential psi(x, y) in 2D, or a vector potential of three noise functions in 3D. The velocity is its curl: in 2D v = (dpsi/dy, -dpsi/dx), in 3D v = curl of the vector potential. Because the divergence of a curl is identically zero, the field is incompressible: advected points neither pile up nor spread out in a net way. Derivatives come analytically from gradient noise or by central differences of a few samples. Boundaries are handled by ramping the potential toward zero near an obstacle, or by blending with the distance-based gradient so the flow becomes tangent to the surface and goes around it. Animating the potential over time, or offsetting noise octaves, changes the flow and adds turbulence at several scales. The result is evaluated per particle each step with no neighbour search, and a few octaves already read as smoke or ink in water.
When to choose it
Reach for it when
- particles bunch up or drain away under plain noise motion
- want swirling smoke motion without running a fluid solver
- need divergence free turbulence for cheap pseudo fluid
- dust and embers should flow around in believable eddies
Choose it for cheap, art-directable turbulence for smoke, dust, embers, magic and ambient flow where real fluid dynamics is unnecessary. Prefer Stable Fluids, FLIP/PIC fluids or Lattice Boltzmann fluids when the flow must respond to moving objects, buoyancy or vorticity from real physics. Prefer Domain Warping for static texture patterns, and plain Perlin Noise (gradient lattice noise) or Simplex Noise offsets when divergence does not matter. Use it as the force input to GPU particle systems and as a wind source for Procedural foliage wind animation.
Field marks
- No true dynamics: flow ignores obstacles and sources unless the potential is explicitly modified near them
- Boundary ramping produces visible stagnation or ring artefacts around colliders
- Low-frequency potentials give long coherent loops that look mechanical
- Finite-difference step too large or too small causes visible blockiness or noise in the derivative
- Streams in 3D can spiral into tubes and closed orbits, so particles keep circling instead of dispersing
Presets
Curl-noise flow visualised with line integral convolution
{
"freq": 2.5,
"steps": 18,
"step_len": 0.006,
"grain_density": 110,
"drift": 0.15
}Show GLSL (48 lines)
// GLSL ES 3.0, Shadertoy-style. Curl of a scalar noise potential, drawn as line-integral-convolution streaks.
const float FREQ = 2.5; // spatial frequency of the potential
const int STEPS = 18; // integration steps each way
const float STEP = 0.006; // step length in uv units
const float DENSITY = 110.0; // grain resolution of the smeared noise
const float DRIFT = 0.15; // potential animation speed
float hash21(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
float vnoise(vec2 p) {
vec2 i = floor(p), f = fract(p);
f = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);
return mix(mix(hash21(i), hash21(i + vec2(1, 0)), f.x),
mix(hash21(i + vec2(0, 1)), hash21(i + vec2(1, 1)), f.x), f.y);
}
float potential(vec2 p) {
vec2 q = p * FREQ + vec2(iTime * DRIFT, 0.0);
return vnoise(q) + 0.5 * vnoise(q * 2.0 + 7.3);
}
vec2 curl(vec2 p) { // divergence-free by construction
const float e = 0.01;
float dx = potential(p + vec2(e, 0)) - potential(p - vec2(e, 0));
float dy = potential(p + vec2(0, e)) - potential(p - vec2(0, e));
return vec2(dy, -dx) / (2.0 * e);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float sum = 0.0, wsum = 0.0;
for (int dir = 0; dir < 2; dir++) {
vec2 p = uv;
float s = dir == 0 ? 1.0 : -1.0;
for (int i = 0; i < STEPS; i++) {
vec2 v = curl(p);
p += s * STEP * v / (length(v) + 1e-4);
float w = 1.0 - float(i) / float(STEPS);
sum += w * hash21(floor(p * DENSITY));
wsum += w;
}
}
float g = sum / wsum;
vec2 v = curl(uv);
vec3 tint = 0.5 + 0.5 * cos(atan(v.y, v.x) + vec3(0.0, 2.1, 4.2));
fragColor = vec4(mix(vec3(g), tint * g * 1.6, 0.55), 1.0);
}Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| curl-noise-lic-field | Tesla T4 1920x1080 | 425× baseline (extreme) · 14.0 ms / 14.1 ms | opengl-timer-query · 20 frames · GPU Weight Atlas · Colab T4 sweep |
| curl-noise-lic-field | NVIDIA L4 1920x1080 | 359× baseline (extreme) · 5.71 ms / 5.82 ms · 2.5× faster on L4 | opengl-timer-query · Cross-architecture validation |
| curl-noise-lic-field | NVIDIA A100-SXM4-40GB 1920x1080 | 300× baseline (extreme) · 8.64 ms / 8.64 ms · 1.6× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): its primary source cites Perlin Noise (gradient lattice noise).
Crosses
- GPU particle systems: Each particle samples the curl field as its velocity or acceleration, giving swirling motion without neighbour interaction.
- Procedural foliage wind animation: The curl field acts as a divergence-free wind source sampled at each vertex's world position.
Sources
- primaryRobert Bridson, Jim Houriham, Marcus Nordenstam (2007). Curl-noise for procedural fluid flow. ACM SIGGRAPH 2007 papers.Verified via crossref · 2026-11-29doi:10.1145/1275808.1276435