Quake brush to polygon generation
BlitzMax Forums/BlitzMax Programming/Quake brush to polygon generation
| ||
I'm working on a .MAP loader, specifically for Quake 1 maps. (Not BSP!) But the actual vertices of a brush are not stored in the map file. Here's how it works: https://quakewiki.org/wiki/Quake_Map_Format#Brush_definition I'm terrible at math and I'm really struggling to understand how this works, so any kind of help is welcome. Here's what I've got so far. Notice that I've used the brush plane positions as vertex positions at line 123, just to get some sort of visuals. And here's a map from Quake 1 to test with. https://dl.dropboxusercontent.com/u/2842751/dm1.map |
| ||
i once did something similar for quake 2 in blitz3d good luck im glad people are still into quake :p |
| ||
The Quake 2 .MAP files are the same. (Not the BSP files!) So if you have any code you'd like to share, I'd gladly have a look at it, even if it's Blitz3D code. |
| ||
According to that documentation those MAP files are run through a compiler that generates the BSPs, and the BSPs do have geometry in them. Is there a reason why you need to read the MAPs? You'd avoid all the algebra necessary to find the geometry. Blitz3D itself only loaded BSPs. |
| ||
I'm not using any of the BSP stuff and it's waste of time compiling it to BSP when I'm not even going to use it. I'm really just in need of a map format and I really like to work with TrenchBroom (a Quake 1 editor) It (along with all other Quake editors) quick saves the maps as .MAP files. I'm not using Blitz3D so either way I'm going to have to write a loader for .MAP or .BSP and I figured that since I don't need any of the BSP stuff I'd just go with .MAP. |
| ||
DeleD CE seems to import MAP files: http://www.delgine.com/index.php?filename=deled_features Not sure how compatible it is: https://www.garagegames.com/community/forums/viewthread/135318/1#comment-852345 You can then export to OBJ or B3D. Good luck. EDIT: I'm hoping you find a way without having to code anything, because plane-plane intersection is hairy: http://geomalgorithms.com/a05-_intersect-1.html#Intersection-of-2Planes (unless you use some library that does this for you). |
| ||
I was hoping that maybe someone had some plane to plane intersection code used for something else that could be modified to work with this. I've decided to instead load the BSP: http://www.blitzbasic.com/Community/posts.php?topic=106945 |
| ||
i was looking for my blitz3d quake 2 project but couldnt find it if i will than ill share it |