MagicaVoxel-Importer-with-Extensions icon indicating copy to clipboard operation
MagicaVoxel-Importer-with-Extensions copied to clipboard

Importing big models are slow

Open fxgenstudio opened this issue 4 years ago • 2 comments

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".

level1_1.zip

fxgenstudio avatar Feb 08 '21 20:02 fxgenstudio

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

fxgenstudio avatar Feb 09 '21 10:02 fxgenstudio

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.

CloneDeath avatar Feb 09 '21 11:02 CloneDeath