jitspoe / godot_bsp_importer

An importer addon to import Quake BSP files.
MIT License
112 stars 11 forks source link

Support Quake 2 & 3 BSP files #4

Open krazyjakee opened 1 year ago

krazyjakee commented 1 year ago

There are many BSP formats but a good starting point would be Q2 and Q3.

Some open questions:

Where are some resources for learning about the differences between the formats?

Is this outside the scope of this project?

Other possible BSP formats https://github.com/zturtleman/bsp-sekai

jitspoe commented 1 year ago

Definitely within the scope of this project! I've vaguely started supporting other formats but didn't get very far as it wasn't a priority for my project.

One thing to be careful of is that most of the tools and engines out there that read and write BSP files are under the GPL license, so copying code from them isn't compatible with the MIT license. There are some resources floating around explaining the formats that were from reverse engineering the format (like before the source was released).

For example, this info about the Quake 2 format came out before the source code was released: https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml

Skaruts commented 1 year ago

Is it ok to use Valve map format in TB? It seems like qbsp has no problems with it, and my test maps seem to work fine as well. Valve format supports better texture projections, so you can transfer textures between faces much better with it, and it doesn't create brushes with some textures inverted as the standard format does (noticeable with textures that have text in them, like triggers, clips, etc).


On another note, it seems qbsp limits filenames to 15 characters, though, and I don't know if that can be changed. I'm getting this warning because of it.

WARNING: texture DiamondPlate008C name too long for Quake miptex

And it really cuts the texture names, such that the BSP importer then only sees DiamondPlate008, and fails to load the texture.

jitspoe commented 1 year ago

Yep. That only impacts the .map file, so if you have a modern qbsp compiler that can handle the valve format, it's fine.

And, yeah, the texture names are pretty limited, which is a down side. I think the Q2 format supports longer texture names, but q2bsp support would have to be implemented, which might take a while.

If you wanted to have more properly named materials, you could use longer names for the materials, shortened names for the quake texture names, and use the material remap dictionary on the importer, but that's kind of yucky. In this case, you could strip off a 0 or two. Probably not going to have more than 99 diamond plates. :D

CSLRDoesntGameDev commented 1 week ago

this is a year too late probably, anyway https://github.com/jitspoe/godot_bsp_importer/pull/24