How do i do poisson disk sampling?

i need to place trees far apart from each other when loading chunks in my game and also be able to use a seed in the sampling so tree placement is the same if another player wants to generate the same world


Cant really work with the limited information given, but ill try.

Whatever handles tree placements will have to auto detect if the trees are close. Idk if you wanna use perlin noise for that or not. completely up to you

The server can track where this tree placer places it trees and ensures that when a client joins a given area, it will spawn those trees for them

all of the terrain generation is done

right now 2 noise value decides placements of the trees, there should be an algorithm that decides tree placements similar to minecraft’s which is poisson disk sampling if i’m right

just seeing if anybody can explain how i can implement this because there’s a lack of devforum posts containing pds code

i could be completely wrong and there’s another method of placing trees but i did some research

There’s actually a few, if you search for “poisson”. Looking through them I found these links:

Check out the youtube video especially, it explains it and shows how to code it and everything.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.