• 12
• 27
• 9
• 9
• 20

# The ".map" Format, Where Is The Forth 3D Vector?

This topic is 2499 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello all I've been looking through the .map files from game editors such as. "Hammer, Warcraft (Half Life's Editor), Doom3, etc". I'm thinking on making my own map compiler for my own binary map format so I have more flexability on using 3rd Party map editors or 3D applications to turn 3D files into my own map format my game engine can read and I find the .map very user friendly from Hammer Editor and easy as heck to parse, but one thing has made me scratch my head.

There appears to be only 3 3D vectors to specifiy a quad/face on a brush. I was able to draw most of the 3D vectors and such, but I couldn't draw the 4th vector on them, becuase I didn't know or couldn't predict where the forth vector would be.

Here is a Doom .map file.
 Version 2 // entity 0 { "classname" "worldspawn" // primitive 0 { brushDef3 { ( 0 0 -1 0 ) ( ( 0.125 0 -1 ) ( 0 0.125 1 ) ) "_emptyname" 0 0 0 ( 0 0 1 -8 ) ( ( 0.125 0 -1 ) ( 0 0.125 -1 ) ) "_emptyname" 0 0 0 ( 0 -1 0 0 ) ( ( 0.125 -0 -1 ) ( 0 0.125 0 ) ) "_emptyname" 0 0 0 ( 1 0 0 -8 ) ( ( 0.125 0 -1 ) ( 0 0.125 0 ) ) "_emptyname" 0 0 0 ( 0 1 0 -8 ) ( ( 0.125 0 1 ) ( 0 0.125 0 ) ) "_emptyname" 0 0 0 ( -1 0 0 0 ) ( ( 0.125 -0 1 ) ( 0 0.125 0 ) ) "_emptyname" 0 0 0 } } } 

One thing I found interesting instead of using only 3D vectors they have a 4D vector as the first and 3rd. So I'm sorta confused on how to figure out the hole shape of a face on a quad/ of a "brush".

If anyone can explain why they use this method or can tell me how to figure out the "4th" vector for a quad from those variables, that would be appeciated,

thank you!