MagicaVoxel-Importer-with-Extensions
MagicaVoxel-Importer-with-Extensions copied to clipboard
Importing big models are slow
Import a 256x256x128 model take more than 10 minutes to process.
One optimisation that can be done is to precalculate normals per faces into a table and don't use "generate_normals".
I added traces with time in ms for each steps with "monu1.vox" importation ...
Why combine_data is called 3 times ?
Importing: res://monu1.vox (scale: 0.1, file version: 150, greedy mesh: False) num_models 1 Elapsed VoxFile Read:574 ms Starting Generate Mesh... combine_data size: 156942 combine_data size: 156942 combine_data size: 156942 Elapsed unify_voxels:3067 ms Elapsed Gen mesh :3685 ms Elapsed Gen surface :279 ms Total Elapsed Generate Mesh:7052 ms
Thanks! Off the top of my head, I believe it is called once per axis (x, y, and z).
This gives me enough data to start. I'll take a look tonight, and let you know if I have questions.
And I agree, 10 minutes is unacceptable.