Dylancyclone / VMF2OBJ

Convert source-engine VMF files into OBJ files with materials (including brushes, displacements, entities, and models)
MIT License
113 stars 6 forks source link

converting problem #41

Closed Sirfiwzh closed 4 months ago

Sirfiwzh commented 1 year ago

hi when im trying to convert my vmf to obj this error showing to me

Starting VMF2OBJ conversion v2.0.0 [1/5] Reading VPK file(s) and custom content... [2/5] Reading geometry... SEVERE: Fatal error: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 4260 path $.solids[0].sides[0].null

sorry for my bad english

Dylancyclone commented 1 year ago

Hi! What map are you trying to convert?

Sirfiwzh commented 1 year ago

this is my own map

Dylancyclone commented 1 year ago

Is it possible to upload it so I can take a closer look at might be causing the problem?

Sirfiwzh commented 1 year ago

Is it possible to upload it so I can take a closer look at might be causing the problem?

sure mate https://www.mediafire.com/file/8p4spfai6u269oh/coop_pishicavern.vmf/file

VictorMolokanov commented 1 year ago

just resave project from hammer ++ into hammer, in other place. it's can fix that.

Dragon20C commented 7 months ago

Hello I also have/had the same issue where saving the vmf file in hammer++ causes this issue, I saved it in normal hammer but when I import the obj model in blender 4.0 it only shows the vertices and not the whole mesh/geometry. Screenshot_20240302_170904

Dragon20C commented 7 months ago

Okay I figured out that I was missing some VPK files and that allowed me a step closer, another issue.

Issue: 0% [> ] 1/121 (0:00:00 / 0:00:00) ?/sSEVERE: Failed to extract material: dev/dev_measuregeneric01b SEVERE: java.io.IOException: Cannot run program "/tmp/vmf2objtemp/VTFCmd.exe": error=13, Permission denied SEVERE: Fatal error: java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0

I should mention I am on linux so it trying to run an .exe file is probably causing some issues since java is cross plat it works except from this program from running causing the meshes to not be constructed.

Dylancyclone commented 6 months ago

just resave project from hammer ++ into hammer, in other place. it's can fix that.

Thank you for the lead, when I find time I will look into how hammer++ saves VMF files differently from original hammer

Okay I figured out that I was missing some VPK files and that allowed me a step closer, another issue.

Issue: 0% [> ] 1/121 (0:00:00 / 0:00:00) ?/sSEVERE: Failed to extract material: dev/dev_measuregeneric01b SEVERE: java.io.IOException: Cannot run program "/tmp/vmf2objtemp/VTFCmd.exe": error=13, Permission denied SEVERE: Fatal error: java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0

I should mention I am on linux so it trying to run an .exe file is probably causing some issues since java is cross plat it works except from this program from running causing the meshes to not be constructed.

Unfortunately, even though Java is cross platform, the dependencies this project uses are only compiled for windows. I'm not sure how wine or any other compatibility software will handle them. As much as I love (and use) linux, I don't really have the time to support it for this project sorry.

Dylancyclone commented 4 months ago

I've released an update that fixes the error when trying to decompile any VMF file saved in Hammer++ https://github.com/Dylancyclone/VMF2OBJ/releases/tag/v2.0.1

I'm going to close this as the original issue is fixed, though definitely let me know if you have any other issues!