how to generate .MAP file

Started by
3 comments, last by tragic_cub 20 years, 6 months ago
I like level editing in MAX.and I need WorldCraft or Q3Radiant to generate bsp for me.so I want to write a MAX plugin(.MAP exporter) I''v read some tutorials about .MAP format and how to turning a brush into a set of polygons. But I just want to known how to convert a set of polygons to Brush.If you have some ploygons(vertices,texture coordinates),how to convert them to the .MAP format? Ok,I ask a question. Do any of you fellas know how to convert polygons to brushs(.MAP format)? Any algorithm,code? Any tutorials?
Advertisement
I might be wrong but I don''t think that polygons are saved in a .map file, it''s only the planes representing a brush that are stored.

Think it looks like this:
brush
{
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
}

Each set of three planes represents a point, all points in a brush makes a polygon. The point is the intersection point of the planes.

So before you can store the data you have to convert the vertex data into plane data.

/unknown

Yes,polygons are not saved in a .map file.

Let me talk in another way:
I create a box in MAX,and export to HalfLife .smd format
how to convert .smd format to .map format?

box.smd
---------------------------------------------------------
triangles
box.bmp
5 -0.0310 -10.0897 6.6108 -0.8408 -0.0012 -0.5414 0.7792 0.6409
6 -0.0310 -13.1210 7.7669 -0.9022 0.0253 -0.4307 0.8630 0.6994
6 0.2099 -13.1210 7.7669 0.7227 -0.1085 -0.6826 0.8630 0.6994
box.bmp
5 -0.0310 -10.0897 6.6108 -0.8408 -0.0012 -0.5414 0.7792 0.6409
6 0.2099 -13.1210 7.7669 0.7227 -0.1085 -0.6826 0.8630 0.6994
5 0.2099 -10.0897 6.6108 0.6133 0.3244 -0.7202 0.7792 0.6409
box.bmp
6 -0.0310 -13.1210 7.7669 -0.9022 0.0253 -0.4307 0.8630 0.6994
7 -0.0310 -15.3580 7.1585 -0.7446 0.5014 -0.4406 0.9248 0.6686
7 0.2099 -15.3580 7.1585 0.7425 0.3127 -0.5923 0.9248 0.6686
...
...
...
end
---------------------------------------------------------

how to convert .smd format to .map format?
Like this:

brush
{
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
(plane 1)(plane 2)(plane 3) ? ?
}

I''m sorry but I don''t know how the smd format works, do ypu have any help about this. Or maybe it''s this part that''s the problem

if you wish to create a .map plugin for 3DS Max, then i''d suggest checking out gmax''s tempest pack as it includes a maxscript for it.
Isn''t compatible with Max3-6 but still should give you a good indication of what it required.

firstly i''m not sure why you''d want to convert Half-Life uncompressed format into a map format, seems kinda pointless - unless there is another version of SMD i''m unaware of.

that aside though .map format is a pig to work with considering its all relational work.

( 0 0 0 ) ( 0 0 0 ) ( 0 0 0 ) #default 0 0 0 1.00 1.00

each brush looks like that, now each of the bracket information is the actual position of the face,

X ( X Z SCALER ) Y ( X Z SCALER ) Z ( X Z SCALER )

as your brush is a box this determines its size and position, the next thing on the list is your texture (which is refered to either by entity name or by filename). Next come your Rotation floats X Y Z, followed by the U V of the texture.
remember that the position of the box is from the center of the box from the 0,0,0 of the world based on the scaler.

if you want a true explaination of the format, there is one on the hammer site and also the Quake 1/2/3 Tools come with the sourcecode for it, as does GTKRadiant/QeRadiant/Qoole99
hope that all helps

[img]http://members.lycos.co.uk/timesaga/rslogo.gif[/img]

This topic is closed to new replies.

Advertisement