.map documentation ?

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

.map documentation ?

Post by M&M »

what are the forumlas to convert the 3 X Y Z coordinates in the .map file into 2 triangles with 6 vertices like what other modelling programs do in thier files. and how do you convert the texture offsets/coords into UV coordinates ?

if any1 knows where to find such info or any documentation about the .map file format please help :wink:
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

jsut imagine trying to code that! :o

check a .map file, make one brush how you want it and copy the coords. :wink:
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

this is for the exporter ark is making lizard :?

we want to turn the .map file into something that can be accepted into a modelling program like 3dsmax.
there is a process for this but its too long and takes too much time and wastes alot of brushes and sometimes textures. so we are trying to get a straight through exporter .

any1 have any ideas ?
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

BUMP

Post by M&M »

so i guess that means no one has an idea :?
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Re: .map documentation ?

Post by Bjarne BZR »

M&M wrote:what are the forumlas to convert the 3 X Y Z coordinates in the .map file into 2 triangles with 6 vertices like what other modelling programs do in thier files. and how do you convert the texture offsets/coords into UV coordinates ?

if any1 knows where to find such info or any documentation about the .map file format please help :wink:
Try sprogs tecnical: http://www.planetquake.com/spog/stuff/technical.html
It does not give a formula, but it explains how it works. Next step is to get a book on 3D graphics programming. :)
Admin .MAP Forums
Image
Head above heels.
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

hmm,ok thanks ill check that.
however that doesnt explain much about .map .

this info is for a programmer in our team to help make an exporter from .map format to something a modelling program can see.
i guess he will have to do with this then :?
thanks anyways :wink:
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

Ark is gonna kill you for only giving him that. wait until the god jv or someone comes on.
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

apparently ark already had that already and says it didnt help much. helped but only a little.
Image
Angex
Major
Posts: 293
Joined: Mon Dec 30, 2002 1:23 pm
Contact:

Post by Angex »

Code: Select all

// brush 0
{
( -64 192 -64 ) ( -128 192 -64 ) ( -128 128 -64 ) central_europe/normndybrik1sml 0 0 0.00 1 1 0 65536 0 

( -128 128 0 ) ( -128 192 0 ) ( -64 192 0 ) barracks/tentallies 0 0 0.00 1 1 8192 134217728 0 

( -128 128 -56 ) ( -64 128 -56 ) ( -64 128 -64 ) barracks/mag1 0 0 0.00 1 1 8192 512 0 

( -64 128 -56 ) ( -64 192 -56 ) ( -64 192 -64 ) central_europe/altarend 0 0 0.00 1 1 0 65536 0 

( -64 192 -56 ) ( -128 192 -56 ) ( -128 192 -64 ) central_europe/brik_normandy1lt 0 0 0.00 1 1 0 65536 0 

( -128 192 -56 ) ( -128 128 -56 ) ( -128 128 -64 ) central_europe/railroadbrdr_rail1_rb2c 0 0 0.00 1 1 0 131072 0 
}
}
Well to me it looks like the vertices are stored in a triangle strip for each face of the brush, hence the six entries for a single brush. Following this is the texture name.

Then as far as I can tell it doesn't store the texture's UV coordinates. Instead it has the offset (horizontal then vertical), rotation and the scale (horizontal then vertical) parameters, meaning radiant must calculate them on the fly.

I couldn't work out what the last three paramters are used for, and also you'll need to take care when parsing because radiant appends surface parameters to the end of each face's entry if you check them in the surface editor (Although for MoH:AA it is more common to use a shader).

It's also worth noting that radiant appends the most recent information to the *.map file meaning it is un-sorted (i.e a random mixture of brushes and entities).

As for formulas to convert it to a format that another editor could read... Well it all depends on the format and the new scale. Try looking on http://www.gamedev.net, in the articles section there are some general tutorials for this type of thing.
Post Reply