Last resort logo

SWAT 3 - LAST RESORT GAME MODIFICATION


Spam Prevention - PLEASE READ !! (23 Apr 2021)

Due to a problem with spammers the rules for posting in the forums have changed for new users.

Newly registered users won't have their posts published until a moderator approves them.

Research into .MAP format

More
4 years 5 days ago #1508 by Slippery Jim
Well technically you can. Any map that you make in Worldcraft when it compiles to a .SCN will also generate a .MAP file with it.

However I understand what you mean. Easier to start off with a basic map and then experiment the whole way with the same file. Makes reverse engineering easier.

Please Log in or Create an account to join the conversation.

More
4 years 2 days ago #1526 by NoisyBoy
Replied by NoisyBoy on topic Research into .MAP format
Looking at the Basic map, .Map file, it seems like valve has us covered on how it works, Valves Map Format I am pretty sure is the same formatting for swat as the formatting on that article.

Looking at the Basic map, .Json file that I was able to figure out a way to format so mildly more readable. We are given a lot of possibly unneeded data to convert it in a .Map file. The basic map file holds the entities, the textures, the plane(3 vertices that form a quad), and texture information such as the offset, the rotation and the scale. The basic json file holds textures, uvs, cell information, faces, vertices, entites.

So it could be possible to convert the json file to a map might be able to get away with just using the texture, vertices and the uvs from the json file but I don't know how to translate the uv's into offset and scale and if I can easily convert the vertices to planes with 3 coordinates.

Please Log in or Create an account to join the conversation.

More
4 years 2 days ago #1527 by Slippery Jim
1

Please Log in or Create an account to join the conversation.

More
4 years 1 day ago #1528 by NoisyBoy
Replied by NoisyBoy on topic Research into .MAP format
AlienAbducter's exporter has a comment about the faces if that helps.
Code:
a face is a collection of 3 vertices with the following structure: [ vertexIdx1, vertexIdx2, vertexIdx3, #indexes of vertices uvIdx1, uvIdx2, uvIdx3, #uv indexes lmapUvMult_w, lmapUvMult_h, lmapUvMult_x0, lmapUvMult_y0, #multipliers to get uv2 indexes from uv1 materialIdx #index into unique materials array cellIdx #index of cell this surface belongs to vertex1RGBA, vertex2RGBA, vertex3RGBA #optional ]

Please Log in or Create an account to join the conversation.

More
4 years 1 day ago - 4 years 1 day ago #1529 by Copy-Cat
Replied by Copy-Cat on topic Research into .MAP format
Just want to throw this out here. There is an objtomap converter that I was using a couple of years ago that got me close to what I needed to recreate the maps in WC, but worldcraft lacked the functionality of a true 3d modeling program such as Maya.

I began using maya and the objtomap converter to import my recreated maps into WC.

With this said, is it possible to take this converter for the geometry only and rework it to work. I am not concerned with the entities since we can export them to map for map straight from the scn.

Is this right along the lines of what you guys are trying to do? or did I fail..

"Select all.... Copy....Submit"

Please Log in or Create an account to join the conversation.

More
4 years 1 day ago - 4 years 1 day ago #1531 by DarkSynopsis
That JSON file lays it all out pretty nice, I think another base_map with 2 brushes could be handy to see how the JSON outputs multiple brushes while keeping the data being worked with to a minimum.

Taking a quick looking at anything tied to textures I wouldn't even know where to start, though I'd say worry about that once geometry is working.

Entities don't seem to change too much between the .map and .json so they seem easy enough to convert.

Please Log in or Create an account to join the conversation.

Moderators: DarkSynopsis
Time to create page: 0.208 seconds
Powered by Kunena Forum