Approaching an object chunking system on a sphere

I’m making planets, I have all the terrain and everything. I’m at the point where I’m generating grass with a compute shader and plopping down trees with object pooling. They work fine enough (well they at least can put something down where I tell them), but for this and other reasons, I need to define some kind of chunking system so I only load what I want within a certain range and don’t need to run over every single point on the planet to find the 0.2% I actually need.

My first thought is to create a spherical array of chunk zones using the the direction from the center of the planet outward. In 2D, this would be slicing up a pizza and determining where you are on the crust by the vector from the pizza center to your position. If you’re past a certain threshold angle x, say 46 degrees, it knows you’re in the chunk “45-90” based on your vector, and then the nearby chunks are the vectors that lead to “0-45” and “90-135”. Like a 2D grid where your index is based on your cartesian coordinates, each 3D chunk index would have three values corresponding to it’s angle/vertex.

This is only my first thought and I’m positive there’s a nice simple way to go about this. I’m posting to see if anyone has any advice on where to look for some applications, or has general advice, or realizes I’m already overthinking this or making a mistake. This is a difficult topic to search as the vast majority of terrain-related results lead to the terrain itself, and anything related to chunks takes you to minecraft (though that may still be somewhat relevant).

  1. Create a detailed planet in a sculpting application and then split the model up into multiple objects/regions.

  2. Bring it into Unity and create a script that disables any of planet regions that are out of view.

  3. Create a script that resets the camera’s position to zero and offsets the planet if the camera/player gets too far from world position zero. This is because floating point numbers have limited precision and so the camera will jiggle around if it gets to far from the world center.

  4. Release game, make lots of money. Send me some money for the helpful advice.

Thanks,

Zulo3D