Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lossy MagicaVoxel Import: Missing Layers, Objects Discarded #401

Open
Swivelgames opened this issue Oct 17, 2024 · 8 comments
Open

Lossy MagicaVoxel Import: Missing Layers, Objects Discarded #401

Swivelgames opened this issue Oct 17, 2024 · 8 comments
Labels

Comments

@Swivelgames
Copy link

Info

Details

I tried to import a somewhat complex object I designed in Magicavoxel, and it seems some crucial pieces got left behind.

image

The file leverages several of Magicavoxel's features, including:

  • Named Layers (incl. Hidden layers)
  • Object Reference Clones
  • High-object Count
  • Materials
    • Emission Materials
    • Transparent Materials

It seems like Goxel:

  • Discarded the layers (including the names of the layers)
  • Imported each object as a Goxel layer, discarding the object names

and gave up half way through 😅

The objects that it chose to omit almost seem like they reached an Object Ref Clone limit of some sort in Goxel. But, given that I'm not sure how Goxel works, that's purely speculation. Some clones made it in, but the majority of them didn't.

It also could be that the overall object count was too high for Goxel, and it gave up after it reached its limit.

That being said, it could have also just been an error that occurred while it was importing and it skipped the rest of the .vox file. 🤔

All I got when I ran goxel from the console was this:

42.236: Magica voxel file version 200!                               vox_import (src/formats/vox.c:410)

Here's what I ended up with in Goxel:

image

And here's what it looks like Magicavoxel:

image

@Swivelgames
Copy link
Author

Tried perusing the codebase for a debug arg or env var of some sort, but it looks like something that might have to be set at build time. I'll see what I can do to get more useful logs, but can't promise anything! 😅

@Swivelgames
Copy link
Author

Alrighty, after finagling scon, I got it to compile with -DDEBUG and -DLOG_LEVEL. Unfortunately, I didn't really get anything more useful 😓

22.683: Open Dialog (mode=Open, default_path_and_file=(null))        open_dialog (src/main.c:324)
26.735: Magica voxel file version 200!                               vox_import (src/formats/vox.c:410)

😂

@guillaumechereau
Copy link
Owner

It's probably a mix of problems. One issue with importing magical voxel files is that goxel doesn't support palette based materials, so it just discards the information on import.

In theory there is no limit to the number of layer goxel supports, but it's very possible that there is a bug there, since I never tested it on complex files like that.

I'll try to have a look, see if at least I can add some logs in case of errors.

@guillaumechereau
Copy link
Owner

The attached file 'high-rise-magicavoxel' seems to be empty. Did you upload the wrong file?

@Swivelgames
Copy link
Author

@guillaumechereau That's ... odd! I'm not sure what happened.

This one should work:

@guillaumechereau
Copy link
Owner

Thanks. I can confirm the issue. Not sure what the problem is yet.

@Swivelgames
Copy link
Author

Glad to hear I wasn't going crazy 😅 haha.

I've heard a lot of great things about Goxel, so I'm excited to start porting things over to it and trying it out in my workflow whenever this gets fixed 🎉

guillaumechereau added a commit that referenced this issue Nov 21, 2024
Parse the _name attribute of magica voxel transform node and apply them
to the layers.

Related to issue #401.
@guillaumechereau
Copy link
Owner

I committed a change to at least try to get the proper layer names in goxel.

I am still not sure why some parts are missing at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants