QodotPlugin / qodot-plugin

(LEGACY) Quake .map support for Godot 3.x
MIT License
981 stars 72 forks source link

Map made in blender export using plugin doesn't work despite having similar / same map file #140

Open babypandabear3 opened 3 years ago

babypandabear3 commented 3 years ago

Make a simple test map using Blender and export to .map using https://github.com/c-d-a/io_export_qmap Qodot can't load it but same file loads in trenchbroom, and after saved by trenchbroom the map file works map.zip

babypandabear3 commented 3 years ago

if I add an empty line at the end of blender exported map file then qodot would be able to read it

DeerTears commented 3 years ago

Thanks for the two .map files. What version of Qodot are you using? (Version number + where you downloaded it from)

I don't have a full answer, but I have more information:

Checking the diff between these two files reveals that it's basically just the way this blender plugin chooses to not name brushes. It doesn't seem like any change in curly brace depth or anything. The important thing is that Trenchbroom knows how to parse un-named and give them names, while Qodot is expecting named brushes. image

Also, it seems that something's going on where the material assignments are changing, but if it works fine (materials and all) when you go Blender -> io_export_qmap -> Trench -> Qodot then hopefully this should be fine if we can solve the named brush issue. image

Trenchbroom's doc of the .map file format doesn't seem to indicate much about why it names these brushes, I'm guessing it's a quake thing but some engines don't have/need it. https://trenchbroom.github.io/manual/latest/index.html#preliminaries

I can't say much else with certainty cause I've still got to dig into the Qodot parsing code to know how doable it'd be to parse brushes without names. Trenchbroom can do it, hopefully Qodot could too. If not, I could see if there's a way to insert placeholder brush names into the .map export of that blender plugin so it fits what Qodot expects.

babypandabear3 commented 3 years ago

It's version 1.7.1 and I downloaded from github

Most interesting part is, if I add empty space at the end of blender generated file then Qodot can import the map so changing blender export script and simply adding \n to the end of file fix it

DeerTears commented 3 years ago

Oh, literally just an EOF newline issue 😅 that's a thing with a lot of different programs. I could add that to the blender script faster than I could change qodot's parsing.

DeerTears commented 3 years ago

@babypandabear3 See if this alternative script fixes it: https://github.com/DeerTears/io_export_qmap