tommyettinger / spotvox

Renders MagicaVoxel .vox files to pixel art. Successor to IsoVoxel.
Apache License 2.0
39 stars 0 forks source link

Hello, #5

Closed andreaszdw closed 1 year ago

andreaszdw commented 1 year ago
          Hello,

I got this error:

C:\Users\agraetz\AppData\Documents\Downloads\spotvox-windows-x64-0-0-6>spotvox -r=32 heavyTank1.vox
Exception in thread "main" java.lang.NoClassDefFoundError: Ljava/lang/IndexOutOfBoundsException;
        at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:348)
        at java.io.FileInputStream.readBytes(FileInputStream.java)
        at java.io.FileInputStream.read(FileInputStream.java:276)
        at com.github.tommyettinger.LittleEndianDataInputStream.read(LittleEndianDataInputStream.java:89)
        at com.github.tommyettinger.io.VoxIOExtended.readVox(VoxIOExtended.java:230)
        at com.github.tommyettinger.headless.HeadlessLauncher.call(HeadlessLauncher.java:58)
        at com.github.tommyettinger.headless.HeadlessLauncher.call(HeadlessLauncher.java:19)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at com.github.tommyettinger.headless.HeadlessLauncher.main(HeadlessLauncher.java:46)

C:\Users\agraetz\AppData\Documents\Downloads\spotvox-windows-x64-0-0-6>

If I use the copter.vox which is delieverd with the executable it works, but if I load copter.vox in magicavoxel and save it again, it doesn't work. Do you have a hint for me?

Best regards

Andreas

Originally posted by @andreaszdw in https://github.com/tommyettinger/spotvox/issues/1#issuecomment-1479326291

tommyettinger commented 1 year ago

What MagicaVoxel version are you using? I know that I've gotten the reverse of what happens here to occur, when a .vox model from 2018 or so fails to render, but saving it with the current MagicaVoxel allows it to render again. The latest MagicaVoxel release was in 2021, so it isn't like a new version broke things suddenly... Hm...

andreaszdw commented 1 year ago

I'm using the latest version.

tommyettinger commented 1 year ago

I can't reproduce this with Copter.vox . I literally just now re-downloaded MagicaVoxel-0.99.7.0-win64.zip , opened Copter.vox, rotated it 4 times, resaved it, and ran the command you gave (spotvox -r=32 Copter.vox), which produced working renders, such as:

Copter_angle2

The worst I can get by resaving is by disabling all options in Export, which makes it use the default palette instead of what it should use, and looks like:

Copter_angle0

I could only get that level of buggy appearance to happen by intentionally changing the import/export settings, which are accessed with the up and down arrows under File (screenshot at https://i.imgur.com/5icd9cI.png ), and disabling all the export options. For the render to look normal, all export options should be enabled, and have a green dot next to them (screenshot at https://i.imgur.com/SUsj3qB.png ).

If you have a .vox file that fails to render, can you upload it here? Copter.vox would be a good one for me to see, since I can compare it with my working Copter.vox .

andreaszdw commented 1 year ago

I tested it on a other machine, there it works. It must be a problem on my computer.

tommyettinger commented 1 year ago

I'm wondering if it might be an older version of MagicaVoxel opening the .vox file even though you have the current MagicaVoxel installed... That has happened to me, and it's confusing for sure. I've tried to keep SpotVox compatible with both old and new MagicaVoxel file formats, but they aren't really compatible, and there's no indication that the version is different in the files. If it is a local problem for that machine only, I guess I can't do much about that. I'm glad it works on another machine though! Closing.