I want to create a 3D block-based infinite world.
For any block, I want to be able to compute its block type.
3D perlin noise is the usual building block of such a world. If you ask the 3D noise function the value for a 3D point, it'll give you a value between -1 and 1.
How do you turn this number into a block type?
I want blocks on the surface to be turf, and different minerals to have different probabilities based on depth. I want sprawling caves and caverns and lava flows but not small ones. And so on.
So how do you turn noise into block types into a coherent subterranean world? Particularly how do you make things like coal appear in seams and crystals only appear in caves and any other rules that can be invented that make the type of a block dependent upon its neighbours?
And how to do this efficiently, in an oracle function rather than by having to create large 3D arrays to store the decided outcomes of some terraforming?