Handling Data Streaming & Chunk Loading for Large 3D Maps in Godot

You expect people on the forum to innovate for you? :open_mouth:

There’s no mystery whatsoever in scattering stuff. It’s straightforward:

  • Generate sample positions that uniformly cover the chunk using blue noise (aka poisson disk sampling)
  • Reject positions based on heightmap gradient (which you always have)
  • Additionally reject positions based on biome map (which you need to generate one way or another)
  • Place objects on remaining positions.

Sampling the heightmap and calculating the gradient is much cheaper than doing it from a mesh.
Generating a large amount of blue noise samples is somewhat expensive for real time but if you’re only streaming the database, then you can pre-process it.

2 Likes