Scatter Algorithms

Four ways to distribute objects across terrain. Pick the one that matches nature's intent.

Algorithm Comparison

AlgorithmPatternBest ForPerformance
Poisson DiskEven natural spacingForests, orchards, evenly-spaced vegetationO(n log n)
ClusteredNatural groupingGroves, meadows, flower patchesO(n)
Density MapFalloff-basedGradual thinning from center, biome edgesO(n)
GridRegular spacingCampfires, markers, utility placementO(n)

Poisson Disk Sampling

Bridson's algorithm generates points with a minimum distance guarantee. No two instances closer than the minimum radius. The result looks natural — the kind of spacing you see in a real forest where trees compete for light and water.

Population is the dial. The algorithm just sets the rule for how points relate; you decide how many of them there are.

Clustered

Generates cluster centers first, then populates each cluster with instances. Trees grow in groves. Flowers bloom in patches. The cluster count, radius, and density are all configurable.

Eighty oaks with the Clustered algorithm — same terrain, same camera, same population as the Poisson example, but the trees pile into a single tight central grove with bare terrain visible at the edges.
Figure 2. Clustered — same population, very different distribution. Cluster centers were generated first, then each cluster was populated; the result reads as a single dense grove with open ground around it.

Density Map

Uses a falloff function to vary density across the region. Dense at the center, sparse at the edges — or any custom falloff curve. Perfect for biome transition zones where vegetation thins out gradually.

Eighty oaks distributed via the Density Map algorithm. Tree density falls off smoothly toward the terrain edges; the densest concentration is offset slightly forward of center, with thinning trees trailing off toward bare ground at the perimeter.
Figure 3. Density Map — falloff-driven concentration. Dense at the high-weight region, sparse at the low. Useful for biome edges where vegetation should thin gradually.

Grid

Regular spacing on a grid. Not very natural, but perfect for man-made placement: fence posts, campfire rings, street lamps, guard towers. Optional jitter adds slight randomness to break up the rigidity.

Seventy-three oaks placed on a regular grid across the terrain. Trees form visibly aligned rows and columns at fixed spacing, looking like a planted orchard rather than a wild forest. A few grid cells fell off the terrain edge and were dropped.
Figure 4. Grid — regular row/column placement. Reads as orchard or planted utility, not wilderness. Optional jitter softens the rigidity when needed.
ℹ Deterministic Scatter

All algorithms use a seeded PRNG (mulberry32). Same seed = same placement, every time. Critical for networked worlds where all clients must generate identical vegetation.