guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.72k stars 219 forks source link

MagicaVoxel import only imports one section out of multiple #208

Open Metadorius opened 3 years ago

Metadorius commented 3 years ago

What the title says. When I try to import the VOX file from MagicaVoxel, only one of the multiple sections is imported.

poVoq commented 3 years ago

I am also trying to work with .vox files from the Veloren project https://veloren.net/ and apparently only one part of the various models in the scene graph is imported. Here are some example files to test it: https://drive.google.com/drive/folders/1jkn8v9I0fo1nJlM29YAI_wWb_V-w456q

guillaumechereau commented 3 years ago

Right. The current magica voxel import/export code is based on the old magica voxel format that didn't support layers. I will see if I can get a reference to the new format and update the code.

Metadorius commented 3 years ago

Right. The current magica voxel import/export code is based on the old magica voxel format that didn't support layers. I will see if I can get a reference to the new format and update the code.

One of my mates did a hardfork of Goxel for our own purposes (we lack a decent voxel editor for the games our community is modding) and implemented a partial support here: https://gitlab.com/TheChosenEvilOne/goxel/ Maybe you'd find that useful.

guillaumechereau commented 3 years ago

I just checked the new magica voxel format. It's a bit complicated because they have concept of both layers and shapes. I think I will first try to only support loading each magica voxel shape into a different goxel layer and ignore the magica voxel layers.

Also I realize material sync between goxel and magica voxel is never going to be good unless I implement palette based material like magica voxel does...

guillaumechereau commented 3 years ago

I started to add the support for the import. What model do you think is a good test for that? I haven't added translation or rotation support yet.

poVoq commented 3 years ago

Great. For me and many others being able to import (and later export) the base reference model for Veloren which can be found here: https://drive.google.com/drive/mobile/folders/1jkn8v9I0fo1nJlM29YAI_wWb_V-w456q/1qMhRQCDxKjejDKOAdk4myKfe8-gA4G3F/1MFzGWoofekpukY5GDiZpoCtQKYAHAeAs?sort=13&direction=a

guillaumechereau commented 3 years ago

This is what I get at the moment with the first image:

Screen Shot 2020-08-22 at 1 03 30 AM
poVoq commented 3 years ago

Cool, that is already much more than before when only the bow was imported into Goxel 😅