×
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
1 year 4 months ago #1489 by Slippery Jim
Replied by Slippery Jim on topic Research into .MAP format
The python script dumps the 3D and texture information into a .json file that the webgl uses.

You are welcome to the .json files if you wish but they don't have formatting like the .map files. Basically a big numeric text dump.

I can talk to my son and ask him about the Python script and how hard to change the output to something easier to read if you wish.

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

More
1 year 4 months ago #1495 by DarkSynopsis
Replied by DarkSynopsis on topic Research into .MAP format
Possible to dump the basic_map posted in this thread to the json format?

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

More
1 year 4 months ago - 1 year 4 months ago #1505 by Slippery Jim
Replied by Slippery Jim on topic Research into .MAP format
Yup I can get my son to export it

I also spoke to my son tonight about changing the output file. I asked him if he could change the output to something more readable to make it easier to convert to .map format.

He has the last few exams this week for school but as soon as he is free he will look into this.

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

More
1 year 4 months ago - 1 year 4 months ago #1507 by DarkSynopsis
Replied by DarkSynopsis on topic Research into .MAP format
Thanks, gotta start small :) can't dive into MissionA when can't look at an existing .MAP file.

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

More
1 year 4 months ago #1508 by Slippery Jim
Replied by Slippery Jim on topic Research into .MAP format
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
1 year 4 months 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
1 year 4 months ago #1527 by Slippery Jim
Replied by Slippery Jim on topic Research into .MAP format
I revised the original "basic" map to include a light entity.

Included in the following zip is a revised .map file, revised .scn file, and the .json output file after using the exporter.


This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

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

More
1 year 4 months 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.
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.

Time to create page: 0.105 seconds
Powered by Kunena Forum