Posts

Poisson Disk Sampler Usage Guide

Image
Want to fill a region with rocks, trees, or other foliage? Placing each prefab by hand can be a nightmare, and creating a script to place them randomly can create unnatural results. The Poisson Disk Sampler, available on the Unity Asset Store, can solve that! How does it work? It's simple! Using Poisson Disk Sampling, a minimum distance between each prefab can be specified, creating much more aesthetically pleasing results. Just pick a region to generate in and let the Poisson Disk Sampler take care of the rest! Basic Usage Using the Poisson Disk Sampler is simple! 1) Create a new game object and add the Poisson Disk Sampler component to it. 2) Use the bounds property to specify the region you would like to generate in. It will be indicated by a green outline in the viewport (if you don't see a green outline, make sure that Gizmos are enabled). 3) Assign a prefab to the spawn prefabs list. You can optionally assign multiple prefabs and assign custom spawn weights. 4) Press &quo