measuredweighed / BSP2OBJ

🎮 BSP2OBJ is a command-line utility capable of converting Quake, Quake 2, Daikatana, Hexen 2, Kingpin and Half-Life map files into OBJ meshes
MIT License
47 stars 6 forks source link

Unpack error #3

Open Lufims opened 1 year ago

Lufims commented 1 year ago

Some maps just doesn't convert, something related to the unpacking.

BSP version 30
Traceback (most recent call last):
  File "C:\Users\LUÍS\AppData\Local\Programs\Python\Python310\lib\site-packages\bsp2obj-0.3-py3.10.egg\bsp2obj\command_line.py", line 59, in main
    bsp = BSP(data, paks, palettePath, game)
  File "C:\Users\LUÍS\AppData\Local\Programs\Python\Python310\lib\site-packages\bsp2obj-0.3-py3.10.egg\bsp2obj\bsp.py", line 79, in __init__
    self.textures = self.parseTextures(lumps[2])
  File "C:\Users\LUÍS\AppData\Local\Programs\Python\Python310\lib\site-packages\bsp2obj-0.3-py3.10.egg\bsp2obj\bsp.py", line 318, in parseTextures
    textures.append(TextureLoader.loadWAL(self.game, self.data, self.palette))
  File "C:\Users\LUÍS\AppData\Local\Programs\Python\Python310\lib\site-packages\bsp2obj-0.3-py3.10.egg\bsp2obj\image.py", line 93, in loadWAL
    index, = struct.unpack("B", data.read(1))
struct.error: unpack requires a buffer of 1 bytes

I tried to convert "boot_camp"

measuredweighed commented 1 year ago

Would you be able to provide the command line arguments you're using and also a link to download the boot_camp map?

Lufims commented 1 year ago

Would you be able to provide the command line arguments you're using and also a link to download the boot_camp map?

here's the maps and gfx folders, in the maps folder have a script that I made to mass convert the maps, I think it will be more easy to see on what maps it doesn't work.

https://drive.google.com/file/d/1NbfWQ4Qr-00D1fe20GKyiPxsLGlmFFZV/view?usp=sharing

And the command line is this: bsp2obj -g hl1 -o boot_camp -m C:/Users/LUÍS/Desktop/valve/maps/boot_camp.bsp -c C:/Users/LUÍS/Desktop/valve/gfx/palette.lmp