[Outdated] Obj file to strategic map converter

Users who are viewing this thread

Tul

Knight
Thorgrim's map editor is extremely buggy, even exporting colour map doesn't work for me making using this tool as a main map editor impossible. So that's why I decided to make this very simply converter. It is a totally different way of creating strategy map for M&B. Personally I found it more effective and powerful then using Thorgrim's map editor but it's also more complicated and require vast knowledge of 3d modelling. It allow us to model a map in any 3d modelling program or sculptor, cover it with materials and then to export it into M&B. Thorgrim's editor also can import an obj file but it doesn't import materials so it's not very useful.
I made this converter for myself but maybe some other guys will find it useful (probably not) so here we go.

I tested it only with Wings 3d. Here is a correct workflow:
-a bottom side of the model must have a 'hole' material,
-cover a model with materials provided in 'map.obj' (only their names are important),
-export a map as 'map.obj'. The model must be quadriangulated (not triangulated but it can be triangulated). Converter will triangulate it for you. I made this because triangulation in Wings is around 2000 times slower then mine :smile: With huge models like a map it can be really annoying. I don't have to remind that modelling with quads is much more effective then with triangles.
-put the file and converter in the same folder, run converter,
-put the output 'map.txt' file in your module folder,
-the program require .NET Framework 2.0

The package includes a sample.

Download link:
http://www.mbrepository.com/file.php?id=1793

This tool works with Warband.

The package includes a referential Wings file and obj file. They are fit to warband so there shouldn't be any positioning problems in warband.

For Wings 3d users: remember to import and export the file with swapped x and y axes.  Scale factor should be set to 1.0.

Below are the names that materials must have:
ocean
mountain
steppe
plain
snow
desert
desert_forest
river
steppe_mountain
steppe_forest
forest
snow_forest
deep_ocean

2009.02.15
I uploaded a new version which fixes one bug. I also checked the compatibility with 3dsMax 9 and it works if you export the file with normal vectors. You can also use Zbrush but in this case you have to convert file in 3dsmax or wings first.

2009.02.16
Another version which fixes another bug. Now program is checking if the model is quadriangulated.

2010.04.15
Added one new material for better Warband compatibility.
 
Interesing. I'll definitely have a look at it when I have time.
But I'm a 3dsmax user. Any chance to have the materials in an other format? Or if it's only the naming which is important, I guess you could just write it down here..
May I annoy you via PM if I have more specific questions?
 
I updated first post, you will find answer on your first question there.
Yes, you can annoy me via PM if you have more specific questions :smile: It's not easy to annoy me.
 
wow! youve made making maps so much easier. i salute you sir!

jus one tiny problem, when i try to load it i get an error msg saying: unable to position party at (17, 52.5)

is that because the map i made has water in the middle? or is it something else?
 
Awesome-saucem. Gonna try it out with Blender.

Question:
"a bottom side of the model must have a 'hole' material"
What do you mean by that?

edit: also, is it possible to make a map.txt -> obj converter?
 
He means the underside of the map must use that transparent material.  It shows up in wings as a slightly see-through blue colour.  But yea just click on any face or faces right click and choose materials.  Pick material "hole".  Great idea Tul.  This opens up a lot more options when mapmaking.
 
Berserker Pride said:
He means the underside of the map must use that transparent material.  It shows up in wings as a slightly see-through blue colour.  But yea just click on any face or faces right click and choose materials.  Pick material "hole".  Great idea Tul.  This opens up a lot more options when mapmaking.

Hmm, I use Blender. I understand about naming the materials for everything else so does that mean that the underside of my mesh mush use a material called hole? Also, since the map is basically a sheet of mesh with all the normals pointing up there wouldn't be any underside to give a material in the first place would there?
 
also, is it possible to make a map.txt -> obj converter?
Thorgrim's Map Editor will do it for you.

About the 'hole' material:
Wings 3d doesn't support open structures so if you load a model which is not solid then Wings will fill the hole with 'hole' material. When you export model from Wings then all the faces with 'hole' are ignored. It means that there shouldn't be any underside faces in obj file you export, just delete them. As I know M&B will crash if you give him a closed geometry as a map.

jus one tiny problem, when i try to load it i get an error msg saying: unable to position party at (17, 52.5)
Water, rock or beyond the border of map. Position all the parties in Thorgrim's Map Editor and start a new game.

There are some slight differences between obj file produced by different applications and I didn't tested this converter with Blender so give me a sign if it works or not.
 
Thanks, I think I understand it now. In Blender I can ignore the hole material. I never noticed the map editor having the obj exporter, I gave up on it 'cos sculpting the map using it was damn tedious :razz:

edit: Ah, damn. The mapeditor's exporter don't export materials along with it :\ what a bummer.
 
Awesome stuff, but, I tried to put your example into my Test mod and look at it with Map editor, but all I saw was blank, gray space?
 
cdvader said:
Awesome stuff, but, I tried to put your example into my Test mod and look at it with Map editor, but all I saw was blank, gray space?
Could you write step by step what you did?
 
Um. I downloaded your map conventer, unzipped it, then I did nothing expect click on the "obj to MB map converter.exe", copied the Map.txt to my mod's folder and when I went to look at it with Map Editor, it was all blank, gray space?

cdvader
 
Well, my Map Editor is not working right now from unknown reasons but I have a nice flat terrain in-game after doing what you did. Try it in-game.
 
*bump* I need this tool!

Please, can someone hand an alternate download source? The original file was deleted from sendspace. :cry: I'd be very grateful.
 
I re-uploaded the file. The new link is in the first post. I'd be grateful if someone put this on MB repository.
 
Tul said:
I re-uploaded the file. The new link is in the first post. I'd be grateful if someone put this on MB repository.
Thanks very much for uploading it again! I desperately tried to get my maps ingame using Thorgrim's editor, to no avail. Now I want to try your tool - and hope I get it to work. Thanks for sharing! :grin:

P.S. Indeed, would be good to have the tool (including a readme or the forum post) on the M&B Repository.
 
Back
Top Bottom