Page 1 of 1
.map documentation ?
Posted: Thu Sep 09, 2004 9:39 pm
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

Posted: Thu Sep 09, 2004 10:46 pm
by lizardkid
jsut imagine trying to code that!
check a .map file, make one brush how you want it and copy the coords.

Posted: Fri Sep 10, 2004 6:30 pm
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 ?
BUMP
Posted: Mon Sep 13, 2004 9:02 am
by M&M
so i guess that means no one has an idea

Re: .map documentation ?
Posted: Mon Sep 13, 2004 9:58 am
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

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.

Posted: Tue Sep 14, 2004 10:17 pm
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

Posted: Wed Sep 15, 2004 2:32 am
by lizardkid
Ark is gonna kill you for only giving him that. wait until the god jv or someone comes on.
Posted: Wed Sep 15, 2004 5:59 pm
by M&M
apparently ark already had that already and says it didnt help much. helped but only a little.
Posted: Wed Sep 15, 2004 7:48 pm
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.