18 August 2017
You're getting into the kind of territory here where you would need to stream chunks in from disk in the same way that Minecraft does. PicaVoxel does not and will never support this out of the box, it's really not what the tool is aimed at. It might be possible to create such a system using PicaVoxel chunks, but it's outside of the scope of what I wanted to achieve with the asset.
When you create a large volume in the editor, all of the chunks have their meshes generated, and then each of those meshes is saved as an asset, which is why it takes such a long time to do the initial create.
Take for instance a 320^3 volume, with a chunk size of 16. 320/16=20, so that's 20^3 chunks = 8000 chunks. So PicaVoxel has to create 8000 GameObjects and generate and save meshes for each one. To continue with the Minecraft analogy, that's roughly the equivalent of attempting to store in memory and render 400 biomes at once.
1000^3 is definitely not possible, that just gave me an out of memory error when attempting to create a volume of that size.
At any rate, there is literally no use-case for creating a volume of that size at edit-time, because it's not practical to hand-edit a volume of that size to any useful degree. There might be a use-case for importing an external model, but AFAIK neither Magica or Qubicle support volumes of such large sizes.
It would be possible to generate a volume of such large size at runtime, as you may want to procedurally generate. In this case, you would programatically resize a small PicaVoxel volume at runtime, then create the data and generate the meshes. Here's some code to do that with a 320^3 volume:
On a Core I7, that takes 160 seconds to generate Greedy meshes, and 60 seconds to generate Culled. Probably still impractical for a production game.
So really, that comes back to my original point. For something so large, you'll need to either load from disk or generate on the fly as you move through the world.
It's really important to remember the kind of data you're dealing with here where voxels are involved, and why voxel engines have only become practical in recent times. 320 may not sound like a large number, but 320^3 is 32 million. 32 million * 6 bytes per voxel = 192 megabytes of voxel data alone, before you even start to generate meshes, which require a minimum of 4 verts per voxel.
Hope that gives some insight into what you're asking.
Last edited 18 August 2017