Jump to content
  • Advertisement
Sign in to follow this  
ajm113

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

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

If you intended to correct an error in the post then please contact us.

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!

Share this post


Link to post
Share on other sites
Advertisement
From teh googlez.

Looks like they use a single normal vector to define the plane, with the fourth component of the normal vector the Euclidean distance to the origin. The remaining 3-component vectors describe the texture transform. The planes are described as infinite, thus the volume is described as the space bounded by the planes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!