Why are .map files jerks?

Started by
2 comments, last by webmunkey 22 years, 5 months ago
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
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
Oh crap, I had no idea, but that would explain it. Okay, thanks Now I feel like an idiot...
Here is a link to a site I found about .map files (in case anyone is interested)http://www.claudec.com/claudecs_college/q3a_ldhb/q3aldh_theeditor.htm
-Jesse

Edited by - webmunkey on November 20, 2001 12:13:49 AM
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

This topic is closed to new replies.

Advertisement