Max Volume size, Stress Test

0
arieel posted this 18 August 2017

Hi! Can you please say more about Volume size limitations ? I want to build a large volume and I'm wondering what is the best approach there: should I better have a few volumes, or go with just one, but big ? So far I tried to increase volume size to 320 x 320 x 64 , and bigger ones freezed my Unity. Though, when "Only Runtime" were checked, seems like bigger one were also possible ....

So could you tell please, is it possible to get for example a voxel Volume of say 1000 x 1000 x 1000 ? And what is the best way to do it ?

Would rly appreciate your answer.

2 Comments
Order By: Standard | Newest | Votes
0
GarethIW posted this 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:

https://gist.github.com/GarethIW/46e6f46cdbd5474e77aebc37bd4a827a

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

0
arieel posted this 18 August 2017

Thanks a lot for such a detailed answer ! It is very helpfull ! And once again thx for great asset :)


Our 355 members have posted 422 times in 101 discussions