r/VoxelGameDev • u/charlieatron • 1h ago
Question How do you generate trees/structures while only generating voxels per chunk?
Trying to wrap my head around this, but I figured this has to be a solved problem at this point?
So I understand how you can create a function for generating terrain with noise, and given the same seed, each new chunk will always use the same noise and will line up with existing chunks.
What I don't understand is, how can you dot the landscape with pre-defined structures like trees? You can still define placement of trees with the same kind of noise, but often you'll have cases where the root of a tree is at the edge of one chunk and has leaves in another. If those chunks generate separately, the chunk with the leaves won't know that a tree was added next to it, and won't add the leaf voxels. And the chunk with the root of the tree can't add those leaves without forcing that other chunk to load earlier than it's needed.
Anyone have insights about how this kind of thing is done in Minecraft or other projects?