Open krazyjakee opened 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
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.
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
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