Search Unity

How can i Import multiple optimized vox models with one texture

Discussion in 'Asset Importing & Exporting' started by Lapish, Jul 12, 2021.

  1. Lapish

    Lapish

    Joined:
    Oct 2, 2014
    Posts:
    2
    Hello. I am new to Unity and i have a problem with import multiple optimized vox models with one texture. The fact is that I have not completely decided on the color palette and when developing a project I want to dynamically change the colors of all models in real time. I will create a script that will export all my colors to the MagicaVoxel palette and it will be both like the palette in the program and the texture of the material in Unity.

    MagicaVoxel
    If directly export models to .obj i can create one material for 99% of the models in the project, but MagicaVoxel does not optimize the mesh very well.

    VoxelShop
    I tried the way to open .vox files in VoxelShop and export them to .dae with maximum optimization. The resulting file is imported into Blender and exported to .obj. Yes, there are fewer polygons, but the .dae export replaces the standard MagicaVoxel uv-map. I need to create a separate texture and material for each model.

    Python scripts
    On github I found .py scripts to optimize voxel models. More often MagicaVoxel optimizes better than these scripts(

    Qubicle
    Out of despair, I bought Qubicle Indie Edition in incentive only for export, because it is inconvenient for work (for me personally), unlike MagicaVoxel. Qubicle is the best at optimizing the grid and opening large .vox files, which is good news. When exporting, a new uv-map is created and, as in the case of VoxelShop, I have to create my own texture and material for each model.

    Maybe I need to remove the uv map when exporting from Qubicle and insert the uv map that MagicaVoxel generated into the model, but for now I'm figuring out how to do this in Blender. And this is for every model. This is if I'm right.

    P.S 2500 models with one camera and one directional light produce ~ 180 fps on gtx 1060 / i5 10400 and 230-240 fps with optimization from Qubicle. The difference is tangible for me.

    P.P.S Sorry for my bad english.
     
  2. Lapish

    Lapish

    Joined:
    Oct 2, 2014
    Posts:
    2
    Probably the only option is to use unity assets voxel importer / toolbox