Jump to content

Home

Strange Request: JK2 Map Format


mcmonkey

Recommended Posts

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 comment
Share on other sites

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 comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...