Poisson Disk Sampling (Bridson)
Generates random points that are no closer than a minimum radius and fill space evenly, using a background grid and an active list so it runs in linear time in any dimension.
Also known as blue-noise point sampling, dart throwing with grid acceleration
In the family Procedural generation, point distributions
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | Built in | Geometry Script > GeometryScript_MeshSampling.compute_point_sampling with GeometryScriptMeshPointSamplingOptions (Poisson disk sampling_radius) docs |
| Blender 5.2 | Built in | Geometry Nodes > Distribute Points on Faces > Poisson Disk docs |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
A background grid with cell size r/sqrt(n) stores at most one sample per cell, so a distance check against neighbours is a constant-time lookup of a small window. Start with one random sample in the active list. Repeatedly pick a random active sample, try up to k (about 30) candidates in the annulus between r and 2r around it, and accept the first candidate that is at least r from all existing samples by checking nearby grid cells; add it to the grid and list. If none of the k candidates works, remove the sample from the active list. When the list empties the domain is filled to near-maximal coverage. Variable-radius versions let r depend on position for density maps, and tileable versions wrap the grid.
When to choose it
Reach for it when
- random scattering clumps and leaves gaps
- need evenly spaced trees, rocks or grass clumps
- points must keep a minimum distance apart
- generate blue-noise sample positions quickly
Choose it for evenly spaced scattering: trees, rocks, grass clumps, lights, attractor points and sample patterns, where uniform random clumps look bad. Prefer Plant Ecosystem Distribution Simulation when ecology (species, competition) matters, Voronoi Diagrams and Lloyd Relaxation when you want even cells and are fine with an iterative relaxation, and Worley (Cellular) Noise when you want per-pixel feature points without storing any samples.
Field marks
- Not strictly maximal: the k-candidate limit leaves small holes
- Output is stateful and sequential, hard to evaluate per-pixel in a shader without precomputation or tiling
- Variable-radius density gradients that change faster than r produce visible banding
- Hard boundaries cause edge effects: samples cluster against domain borders unless padded
- Tileable versions with naive wrapping show duplicated seam rows
Presets
Poisson disk samples via parallel priority dart throwing, with exclusion discs
{
"CELL": 0.055,
"RADIUS": 0.085
}Show GLSL (32 lines)
// Parallel dart-throwing Poisson disk: one random candidate per grid cell, kept only if no nearby candidate has higher priority.
const float CELL = 0.055;
const float RADIUS = 0.085; // minimum allowed distance between kept points
float h21(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
vec2 cand(vec2 c) { return (c + 0.15 + 0.7 * vec2(h21(c), h21(c + 17.3))) * CELL; }
bool kept(vec2 c) {
vec2 p = cand(c); float pr = h21(c + 5.1);
for (int j = -2; j <= 2; j++) for (int i = -2; i <= 2; i++) {
if (i == 0 && j == 0) continue;
vec2 o = c + vec2(i, j);
if (length(cand(o) - p) < RADIUS && h21(o + 5.1) > pr) return false;
}
return true;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
vec2 cell = floor(uv / CELL);
vec3 col = vec3(0.06, 0.07, 0.1);
float dmin = 1e9;
for (int j = -2; j <= 2; j++) for (int i = -2; i <= 2; i++) {
vec2 c = cell + vec2(i, j);
if (kept(c)) {
float d = length(uv - cand(c));
dmin = min(dmin, d);
col += vec3(0.1, 0.2, 0.3) * smoothstep(0.004, 0.0, abs(d - RADIUS * 0.5));
}
}
col = mix(col, vec3(1.0, 0.8, 0.4), smoothstep(0.009, 0.006, dmin));
col += vec3(0.04, 0.07, 0.1) * smoothstep(RADIUS * 0.5, 0.0, dmin);
fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| poisson-disk-sampling-specimen | Tesla T4 1920x1080 | 223× baseline (extreme) · 7.34 ms / 7.42 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| poisson-disk-sampling-specimen | NVIDIA L4 1920x1080 | 204× baseline (extreme) · 3.24 ms / 3.28 ms · 2.3× faster on L4 | opengl-timer-query · Cross-architecture validation |
| poisson-disk-sampling-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 138× baseline (extreme) · 3.98 ms / 4.01 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Crosses
- Voronoi Diagrams and Lloyd Relaxation: Poisson samples seed the Voronoi diagram that Lloyd relaxation then evens out.
Sources
- primaryRobert Bridson (2007). Fast Poisson disk sampling in arbitrary dimensions. ACM SIGGRAPH 2007 sketches.Verified via crossref · 2026-11-29doi:10.1145/1278780.1278807
- primaryRobert Bridson. Fast Poisson Disk Sampling in Arbitrary Dimensions. cs.ubc.ca.Verified via live page · 2026-11-29
- implementationkchapelier (2015). kchapelier/poisson-disk-sampling. Poisson disk sampling in arbitrary dimensionsGitHub API · license MIT · 2026-11-29