jmc2obj / j-mc-2-obj

Java-based Minecraft-to-OBJ exporter.
http://www.jmc2obj.net
352 stars 59 forks source link

Texture export throws errors on larger regions, yet clicking ok exports it fine #233

Closed Privatech38 closed 11 months ago

Privatech38 commented 1 year ago

When I export larger regions from my world, this erorr shows: image Together with console throwing the error message:

javax.imageio.IIOException: Can't create an ImageOutputStream!
    at java.desktop/javax.imageio.ImageIO.write(ImageIO.java:1553)
    at org.jmc.TextureExporter.exportTextures(TextureExporter.java:159)
    at org.jmc.ObjExporter.export(ObjExporter.java:382)
    at org.jmc.gui.ExportWindow.lambda$runExport$0(ExportWindow.java:885)
    at java.base/java.lang.Thread.run(Thread.java:833)

Clicking ok on every pop-up error window seems to make it work and textures get exported as expected.

Not clicking ok and closing the program causes missing textures.

It's worth noting the actual region being exported was imported via WorldEdit schematics on a paper 1.18.2 server. I import the exported MTL and OBJ via the MCPrep project by TheDuckCow to Blender and it works perfectly fine.

jmc2obj version: 122 Blender version: 3.6.2 MCPrep version: 3.4.3 JDK version: 17

mmdanggg2 commented 1 year ago

I'd guess there may be a problem with the folder you're trying to save into and it can't save the textures into the tex folder next to the obj. You could try saving to a different location.