[Outdated] Obj file to strategic map converter

Users who are viewing this thread

othr said:
Did anyone consider making a small program that would achieve the opposite?  I know I can get the obj file from Thorgrim's map editor but assigning the materials for a large map is a huge pain :wink:

Second that. I've already got a huge map in Thorgrim's editor.
 
othr said:
Hrm, so I wrote the tool from scratch. Tul's tool triangulation created some weird faces for me and the java version didn't understand some terrain types so here it is.

http://www.mbrepository.com/file.php?id=2220

I figured there were probably textures missing, so we just need a 'ford' texture = 7?  I could update the Java util to do that.  That's funny, so I guess we have 3 of these utilities now!

Updated to 1.1, untested since I don't have M&B installed on this comp, so I included the old 1.0 zip just in case I broke something.  Hopefully that change is correct, if not lemme know.  :lol:
http://www.mbrepository.com/file.php?id=1839
 
othr said:
Did anyone consider making a small program that would achieve the opposite?  I know I can get the obj file from Thorgrim's map editor but assigning the materials for a large map is a huge pain :wink:
I'l love a tool like that..
 
Hi there im currently trying to figure out how to create a map for 1776 American Revolution mod. But this is somewhat a little more complicated then one should think and it seams im completly stuck.

Im using Maya 2011 x64 on a windows 7 x64. Maya has an inbuilt import export Obj feature. So this is the problem when i look at the matrial editor i see no hole material there are lots of others but not that one. Secondly when i try to export the map into a txt with "Obj file to M&B map.txt converter (Java version)" i get first of all a new count on 249 nodes and a second count on 156 which states this "null 0  3  10  251  52" and whole lot of different numbers.
Anybody who has experience with this sort of problem.

Ohh and im using the original map from the java version.
 
Clau24 said:
othr said:
Did anyone consider making a small program that would achieve the opposite?  I know I can get the obj file from Thorgrim's map editor but assigning the materials for a large map is a huge pain :wink:
I'l love a tool like that..
I'd love such a tool, too.

So I made one: http://www.mbrepository.com/file.php?id=2635
 
Effing epic, man, effing epic!
Thank you very much  :smile:

Finally I can use Balancer for my high poly map

Edit: can you also add a proxy UV-map coords in the obj? (X,Y) from vertex coords will do, with some upward scaling to match how terrain textures are displayed ingame
 
GameDrifter said:
Kodran said:
I have only a simple question.

What is the map max size in Warband?
Because in the original Mount & Blade the modders are talking about 100k of triangle limits, but it seems that in warband that limit is expanded.

Pd: forget my english

I spent sometime experimenting with basic flat maps in Wings3D to find out how large and small a map area you can realistically use for your world map. Wings3D can display surface area of a single selected face in a model. The default wings project that comes with this converter seems to generate a huge surface area in that funny looking multicolored sample model of around of 644k. Way more then needed. I Made my first map with a surface area of 129k and even that is to big. You get an odd effect on big maps the camera wont fly out past a certain point it just stops. You can keep Cheating your player icon past the camera limit point.

I kept downsizing my maps surface area's till I finally hit game errors. The default game map seems to have a need of at least 7k surface area to include all current city/towns. However once I hit the errors no matter how big I made the maps again the errors seemed to not go away. I needed to reload the original wings project that came with the converter program before I was able to generate a map that warband liked again. I think the geometry in my sample maps was causing the troubles for the game after I reached the low surface area problem. So after experimenting some more I'd say a good range to craft your maps surface area to would be 25k (for big and safe) to around 15k - 18k (for I can see the edge of the world) I understand all this is also based on the export scale use when making the map.obj file.

If you make a cube and Uniform Scale it to around 8000% you'll get a nice 25.6k surface area per face. Should make for a good starting point to making a map.  :mrgreen:

Hope this info helps...
I only want to note that possible map crashes aren't related directly with the game's limit.
If the game does badaboom is due to the party pathfinder.

When it tries to calculate the route from Point A to B... It needs a minimum topology for the A* algorithm.

That's it. ;P
Jaii der Herr said:
Clau24 said:
othr said:
Did anyone consider making a small program that would achieve the opposite?  I know I can get the obj file from Thorgrim's map editor but assigning the materials for a large map is a huge pain :wink:
I'l love a tool like that..
I'd love such a tool, too.

So I made one: http://www.mbrepository.com/file.php?id=2635
Good job. Really appreciated. Thank you.
 
GetAssista said:
Effing epic, man, effing epic!
Thank you very much  :smile:

Finally I can use Balancer for my high poly map

Edit: can you also add a proxy UV-map coords in the obj? (X,Y) from vertex coords will do, with some upward scaling to match how terrain textures are displayed ingame

I'm sorry, but I have little knowlege to modeling, yet. If you can provide me with the exact formulas and perhaps 2 example files I can add it in.
 
Help! Please, I need some help on Othr's converter:
I got a mesh and I'd like to assign the materials in the 3d editor and not the map editor. For that I need the material names. Othr writes the names are:
#define rt_ocean 0
#define rt_mountain 1
#define rt_steppe 2
#define rt_plain 3
#define rt_snow 4
#define rt_desert 5
#define rt_ford 7
#define rt_river 8
#define rt_mountain_forest 9
#define rt_steppe_forest 10
#define rt_forest 11
#define rt_snow_forest 12
#define rt_desert_forest 13
#define rt_water 15

I don't get it. So if I want to assign the ocean material I name the material "#define rt_ocean 0"? Or just "#rt_ocean 0"? Or "rt_ocean"?

If anyone knows anything about this naming, please help! :eek:
 
bratfisch said:
Help! Please, I need some help on Othr's converter:
I don't get it. So if I want to assign the ocean material I name the material "#define rt_ocean 0"? Or just "#rt_ocean 0"? Or "rt_ocean"?

If anyone knows anything about this naming, please help! :eek:

That's part of his code.
You have to simply use the
Code:
rt_water
and so in your map model, and later the converter will turn back that materials in the numbers detected by the game. Easy.  :smile:
 
Swyter said:
bratfisch said:
Help! Please, I need some help on Othr's converter:
I don't get it. So if I want to assign the ocean material I name the material "#define rt_ocean 0"? Or just "#rt_ocean 0"? Or "rt_ocean"?

If anyone knows anything about this naming, please help! :eek:

That's part of his code.
You have to simply use the
Code:
rt_water
and so in your map model, and later the converter will turn back that materials in the numbers detected by the game. Easy.  :smile:
You are right, everything is easy when you know how to do it. :grin: But I got zero knowledge of coding, module system whatsoever. So your explanaition is very much appreciated, thank you for your help! :smile:
 
Jaii der Herr said:
Clau24 said:
othr said:
Did anyone consider making a small program that would achieve the opposite?  I know I can get the obj file from Thorgrim's map editor but assigning the materials for a large map is a huge pain :wink:
I'l love a tool like that..
I'd love such a tool, too.

So I made one: http://www.mbrepository.com/file.php?id=2635
Thanks a bunch! You should make a thread for this. Thanks again.
 
Hey guys, awesome tools, but I can't get it to work  :???:

I have a basic map in maya2011(x64), and if I export it as obj all 3 tools will make -a- map.txt file, but all 3 crash my game. Tul's gives me an error: Can't position main party on map (I guess because he does some weird stuff with his axes?) and Bloodpass and Othr's simply give a: "Warband has stopped working" error. I can get the examples to work, just not my own :razz:

Here's my obj file, http://www.mediafire.com/?gnidibb9c40pzfr, if someone else can get this to work and tell me what I'm doing wrong I'd be really grateful. At the moment everything simply has rt_plain assigned as material. Its probabbly something stupid/simple, as I have no modelling experience

Thanks in advance  :wink:
 
Hakello said:
Thanks in advance  :wink:

First of all the map is huge (over 20k of faces). Also, the X Y coordinate space needs to be inverted. And, lastly, the triangulation is uncompensated, and pretty bad for party positioning, movement and AI in general. As the games uses the topology as measure.

Import it to OpenBRF and take a look for yourself.
You can compare it with any of the other maps and get the idea.

:smile:
 
Got it to work by simply looking at the XYZ axes of the example and adjusting mine to match >.> god I feel stupid right now xD

So how do you go about compensating triangulation lol? (I did a quick google search but I don't think I found what you meant)
Cheers!
 
This is a template for blender users to easily make a campaign map for either Warband or Mount and Blade.

Just unzip the folder, tweak map.blend as you like and export as an obj (wavefront) file - use blender default settings.  Change terrain types by clicking "Assign" in the materials box.

Then click on "tul_obj2map.exe" and a "map.txt" will appear. You can use Thorgim's or Bloodpass's editor for more tweaks and to put parties where you like.

Here it is:

http://www.mbrepository.com/file.php?id=3317

  Special thanks to Tul for this powerful tool, which takes map making from a several day project to a matter of a few minutes.
 
I've got this working for 3ds max 2010, but the OBJ needs to be exported so small because for whatever reason the converter multiplies all the coords by 1000 or so. Could we have a version where we can set the scale manually? It's a problem because the tiny numbers I'm having to use for the obj don't have enough floating point to keep detailed areas accurately structured.
 
On a related note, I started trying to put together an export script for 3dsmax. This would eventually mean no convoluted conversion process - just a direct export from max, hopefully with 1:1 unit scale (which could also mean I can do some kind of simple party placement in max as well)

The problem I seem to have is the triangle list at the bottom. Could anyone tell me how they should be arranged? My vertices seem to be loading fine.
 
Never mind. Got it sorted out. And wrote down my notes here on the wiki, for anyone else using 3ds max.

http://mbmodwiki.ollclan.eu/Mapping_in_3dsmax
 
Posting here seems like a bit of a lost cause, but right now I'm at the end of my rope. Yesterday I combed through the forums for map editors, eventually assembling a set of tools from this thread that worked, and got a very simple map in game just as proof of concept. It worked. Now I fire up Wings3D today and make some changes, and try to get it into the game, and it crashes the game and thorgrim's editor. I've tried everything I can think of, including going back to my earlier model that worked yesterday and trying that, and I just can't make it accept it.

I'd link the obj I'm trying to use, but I just registered to to post this, so I can't. If you think you can help, PM me I guess? I don't know quite how to get around that problem either.
 
Back
Top Bottom