Jump to content
  • Advertisement

Archived

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

webmunkey

Why are .map files jerks?

This topic is 6209 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

Hey, I was just wondering if anyone has had any experience with the map files generated by q3radiant (the quake 3 editor). I try to read the vertices, but they make no sense whatsoever. I tried to make a 64x64x64 cube with a vertex at 0 and projecting out along postive axi (is that the plural of axis? doesn't look right, maybe axes, anyway) so each vertex should either be 0 or 64, right? Heh, tell q3rad that. This is what it gave to my poor engine:
    
{
"classname" "worldspawn"
// brush 0

{
( 128 64 0 ) ( 0 64 0 ) ( 0 0 0 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
( 16 0 64 ) ( 16 64 64 ) ( 144 64 64 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
( 0 0 8 ) ( 128 0 8 ) ( 128 0 0 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
( 64 -8 8 ) ( 64 56 8 ) ( 64 56 0 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
( 128 64 8 ) ( 0 64 8 ) ( 0 64 0 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
( 0 64 8 ) ( 0 0 8 ) ( 0 0 0 ) unnamed 0 0 0 0.500000 0.500000 0 0 0
}
}
    
at first I thought the vertices were in (x y z) format, z being depth, but I'm begining to think that the people who made this were weird and used z for height. That's okay, but what's up with values like 8 and 56 and 128?!? I understand that it might have to track the viewpoint, but it still doesn't make any sense. If anyone can help me make heads or tails of this, it would be greatly appreciated. Thanks, -Jesse
You raise the blade, you make the cut, you rearrange me 'till I'm sane, You lock the door and throw away the key, there's someone in my head, but it's not me. -Pink Floyd [Edit: Someone's an idiot and his name is Jesse...] Edited by - webmunkey on November 20, 2001 10:49:01 PM

Share this post


Link to post
Share on other sites
Advertisement
I suggest you look at the quake map specs. You have the complete wrong idea what the .map file is. Those numbers you see ARE NOT the vertices. They are non-colinear points in a clockwise order on some plane. And the intersection of at least 4 planes define a solid region, aka brush. Most of the time you will see a brush made up of six planes like in your example. And the intersection of these six planes make up your cube you made in q3rad. But just read the quake map specs and you will understand the map file.

-SirKnight

Share this post


Link to post
Share on other sites
Okay, this is more a math question than anything else, but anyhow, the 6 strips from the map file above are 3 vertices used to define a plane. Where the planes intersect is the edge of the object. Well, that''s just great... Actually not really because I have completely forgot the plane equation formual and how it is used. If anyone knows the equation that will give plane intersections in 3d space, that would be really good. I''d just trace vectors and then break out the ole trig, but I''m not sure how I can tell the computer to trace a vector in the correct direction so that it will eventually intersect. I think I''m just better off using a formula Any input is appreciated, thanks,
-Jesse

Share this post


Link to post
Share on other sites

  • 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!