mcmonkey 10 Posted October 4, 2014 Share Posted October 4, 2014 Can anyone help me understand JK2's .map file format? Specifically, the brushes. I can't seem to identify how the numbers in the brush definition correlate to the actual brush. I assumed at first they were vertices, but then several vertices would be well outside the brush itself. So... I don't even know what to think. How is the brush format designed? A brush def, for reference, would be like this example: // brush 0 { ( -64 64 0 ) ( -64 64 8 ) ( -64 -64 8 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 ( -64 64 8 ) ( -64 64 0 ) ( 64 64 0 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 ( 64 -72 8 ) ( 64 64 8 ) ( 64 64 0 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 ( -48 -64 8 ) ( 72 -64 8 ) ( 72 -64 0 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 ( -56 -72 8 ) ( -56 64 8 ) ( 64 64 8 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 ( 64 64 0 ) ( -56 64 0 ) ( -56 -72 0 ) skylands/wall1 0 0 0 0.250000 0.250000 0 0 0 } I don't get why it has things like 72 and -56 and etc. when it's corners are at 64/-64/0/8, no other points. Link to post Share on other sites
mcmonkey 10 Posted October 9, 2014 Author Share Posted October 9, 2014 Update: I've determined the sides of the box: ( 64 64 -64 ) ( -64 64 -64 ) ( -64 -64 -64 ) bottom 0 0 0 0.250000 0.250000 0 0 0 ( -64 -64 64 ) ( -64 64 64 ) ( 64 64 64 ) top 0 0 0 0.250000 0.250000 0 0 0 ( -64 -64 8 ) ( 64 -64 8 ) ( 64 -64 0 ) yminus 0 0 0 0.250000 0.250000 0 0 0 ( 64 -64 8 ) ( 64 64 8 ) ( 64 64 0 ) xplus 0 0 0 0.250000 0.250000 0 0 0 ( 64 64 8 ) ( -64 64 8 ) ( -64 64 0 ) yplus 0 0 0 0.250000 0.250000 0 0 0 ( -64 64 8 ) ( -64 -64 8 ) ( -64 -64 0 ) xminus 0 0 0 0.250000 0.250000 0 0 0 and discovered that if you only read the relevant digits: the Z's for top/bottom, the Y digits from Y+/Y-, and the X digits from X+/X-, you can build a reasonably accurate cuboid representing the object... this doesn't explain what the extra digits are for, or how to read more complex shapes. Link to post Share on other sites
acdcfanbill 10 Posted October 15, 2014 Share Posted October 15, 2014 JK2 and JKA share the the Q3 map format with a few caveats I assume. Here's some info on Quake3 and the original Quake .map files. There's obviously been some updates to the format since Quake era, I don't think Quake supported patches? anyway, it should help a bit. Link to post Share on other sites
Recommended Posts