Scatter Algorithms
Four ways to distribute objects across terrain. Pick the one that matches nature's intent.
Algorithm Comparison
| Algorithm | Pattern | Best For | Performance |
|---|---|---|---|
| Poisson Disk | Even natural spacing | Forests, orchards, evenly-spaced vegetation | O(n log n) |
| Clustered | Natural grouping | Groves, meadows, flower patches | O(n) |
| Density Map | Falloff-based | Gradual thinning from center, biome edges | O(n) |
| Grid | Regular spacing | Campfires, markers, utility placement | O(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.
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.
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.
All algorithms use a seeded PRNG (mulberry32). Same seed = same placement, every time. Critical for networked worlds where all clients must generate identical vegetation.