Qhimm.com Forums

Final Fantasy 7 => FF7 Tools => Topic started by: Aali on 2010-10-25 06:13:07

Title: [FF7] World Map to .Obj Converter and back! (Download Missing)
Post by: Aali on 2010-10-25 06:13:07
This is a little something I have been working on these last few days, basically it reads the entire worldmap and spits out an obj file which can then be opened in, for example, blender. From there it can be exported into obj again which can be fed into another tool which in turn generates a new set of .map and .bot files. It's pretty rough at the moment and engine limitations put some harsh restraints on what you can actually do so don't get your hopes up just yet.
What you can do for sure is adjust UV maps, which could some day lead to a much improved WMRP :)

I wanted to make some cool "proof of concept" screenshots but since I am completely and utterly unable to do anything productive in blender I opted for destructive instead. Bye bye Corel bridge!

(http://backup.ninjaloot.se/share/wm_blender.png)

What now?!  ???
(http://backup.ninjaloot.se/share/outoforder.png)

Expect a release as soon as I get the time to polish the edges and make it a bit more user friendly.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aeris on 2010-10-25 07:24:31
wow, nice work yet  again Aali! i can't wait to see what all we can do with this... and i can imagine the evil in some hardcore mods lol.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Mako on 2010-10-25 07:28:52
Aali you are god arn't you? Don't lie to me you are, I was just asking Halkun about this 3 weeks ago. You have continually proved to be the most valuable asset to FF7 PC ever!. Props and congratulations!. I am shaking with excitement!
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-10-25 08:54:18
Wow great job cant wait to be able to do some work and see what i can whip up with that thing. Cant wait for the release.
Title: Re: World Map to .Obj Converter (and back!)
Post by: obesebear on 2010-10-25 14:19:07
What can't you do?  Seriously
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-25 14:54:25
I've also taken the time to add the relevant information about the worldmap format to the wiki (http://wiki.qhimm.com/FF7/WorldMap_Module), just in case anyone else is interested in the details.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Timber on 2010-10-25 15:14:46
Wow awesome work! So this will the the underwater / snow maps too?
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-25 15:26:09
Not at the moment. Its not particularly difficult to implement but I didn't think anyone cared about those anyway :P
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-10-25 17:54:51
So will this let you fix the towns and better the textures or just the world map?
Title: Re: World Map to .Obj Converter (and back!)
Post by: BlitzNCS on 2010-10-25 18:10:10
Wow, you complete legend, Aali! Thank you very much!
Title: Re: World Map to .Obj Converter (and back!)
Post by: pyrozen on 2010-10-25 19:18:15
So will this let you fix the towns and better the textures or just the world map?
most of the towns are built from worldmap geometry, so in theory we can finally redo the towns properly.

Thank you Aali! I just wish i had more time to play with this new tool, too damned busy ATM.

lee
Title: Re: World Map to .Obj Converter (and back!)
Post by: ZL325 on 2010-10-25 21:13:03
Aali are you a PROGRAMMING GURU?

Nice work, if only you could maybe spare a few minutes of your time as to teach me the wonders of your programming skills and how you go about doing the programming? :)
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-10-26 04:18:21
I was going through some old thread and found this and thought it was kinda funny

I don't think anyone will make an overworld editor, and if they do I don't see anyone taking the time to model all of that...  But if they do that would be INSANE! 

Anyways, I keep my original preference of Gaia, but Lifestream seems like a good one too.

Also I was just wondering if you where gonna name your new tool after Gaia?
Title: Re: World Map to .Obj Converter (and back!)
Post by: pyrozen on 2010-10-27 02:36:31
how does your new tool pull the texture data? Does it require the LGPs unpacked(i assume it does to render in blender), or are they extracted when you export the .map data? Just curious, i could polish off the "old" WRMP very quickly if i could create textures and instantly see the changes on the world map, instead of endless cycles of loading FF7, quit, make a small tweak, reload FF7, repeat 10x times and one texture is finished.

Just wondering, i cant wait to get my hands on this one ;)

Lee
Title: Re: World Map to .Obj Converter (and back!)
Post by: sl1982 on 2010-10-27 02:50:11
From what i understand is this map can be re uv'd in blender to get rid of the horrendous tiling issues. Correct me if i am wrong aali.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-27 03:32:18
You supply the textures yourself. The tool makes no attempt to extract them from FF7. I didn't bother with that because the textures aren't strictly necessary, everything still works if you dont have them, they will just not show up in blender.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-10-28 01:24:57
sweet any idea when a release will be?
Title: Re: World Map to .Obj Converter (and back!)
Post by: Tenko Kuugen on 2010-10-28 02:18:45
The first step for a custom worldmap.
Someone open an Aali fanclub. I want to fill an application.
Title: Re: World Map to .Obj Converter (and back!)
Post by: pyrozen on 2010-10-28 03:29:57
im more looking towards larger UV maps that span continents, that way textures can seamlessly blend across all terrain types, and new imperfections can be added and such. But i need to try the tool itself out first :)

lee
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-28 04:14:52
Be aware that texture coordinates are stored in one byte though. If you slap a 4096x4096 texture on there you will only be able to adjust it in steps of 16 pixels. Blender doesn't know about this of course, so it will just look crappy ingame. Anyway I dont think this will be useful for any major modifications, its better suited to fixing annoying corner cases.

The only thing holding back a release right now is that I dont know what to do with normals. Blender doesn't load normals, it likes to compute its own. This looks terrible when imported into FF7, the lighting is way too sensitive and some things that really shouldn't be affected by it are. But since world map lighting is broken in the PC version anyway I dont know if its really worth fixing or if I should just set all normals to point straight up, effectively disabling lighting.
Title: Re: World Map to .Obj Converter (and back!)
Post by: BlitzNCS on 2010-10-28 18:34:02
Will this tool be able to create new walkmeshes and gateway flags (for like new areas etc)? Would be cool to really test the world map to it's limits.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-28 20:32:55
The worldmap is its own walkmesh and yes, that information can be modified with this tool. Everything else is stored in other files and probably operates on a combination of attributes from the map such as location (Midgar Area, Junon Area etc) and walkability, atleast thats how random battles work.
Title: Re: World Map to .Obj Converter (and back!)
Post by: pyrozen on 2010-10-29 02:47:55
so entirely new land masses could be crafted in the massive ocean i assume?
This probably is not covered, but what about assigning enemies to a particular area?

lee
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-10-29 02:55:42
New areas can be created, you can have up to 128 unique locations (in practice that might require some modding of the .exe though). Random encounters are defined in enc_w which is in the LGP. The format is quite simple, I plan to write a wiki page on it when I get the time to work out all the little details. Basically its just a table of N possible encounters per walkmap type per location.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Tenko Kuugen on 2010-10-29 06:05:57
128 unique locations? are there even half that many in the current game? ( assuming you mean location as in area ( like midgar area ) and not locations as in towns/dungeons/etc )
That makes room for some awesome stuff to be done.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-10-31 09:47:22
Just checking up and seeing what the progress is? Any clue how much more to complete before a release
Title: Re: World Map to .Obj Converter (and back!)
Post by: Cyberman on 2010-11-01 01:13:41
Just checking up and seeing what the progress is? Any clue how much more to complete before a release
All things considered why are you so bent on the progress?
The last post from the author was well within the week. I suggest you exercise some patience (any will do). Aali has been VERY faithful to post progress on ANY of his projects when he had any. If he had any it is very likely he would have posted something to let people know.

He even took the time to place the information in the wiki, if you want something to read or modify the world map just read the wiki and DIY then?

Cyb
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-11-01 01:36:59
I still haven't had any great ideas on how to handle normals so I pretty much haven't worked on it at all.
Dont worry though, if I dont come up with anything soon I will just release a version that doesn't save normals. The difference is barely noticeable anyway.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Costa07 on 2010-11-01 08:53:58
Sweet. Sorry if sounded rushed just had too much time on my hands this week, didn't have too work too many hours this week which is rare. So didn't know what to do with my time besides browse qhimm.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-11-18 10:50:22
http://backup.ninjaloot.se/share/map2obj.zip (http://backup.ninjaloot.se/share/map2obj.zip)

Since I've had absolutely no time to work on this lately I haven't made any progress with the normals so as promised I am releasing a version that otherwise works fine but will set all normals to point straight up. Not really noticeable in game but if you do use this version make sure to keep a copy of the obj file so you can re-export it whenever I find a solution to this problem.

The programs are both command line tools and they both take a single parameter.
For map2obj it is the map file from which it will produce a wm.obj and wm.mtl in the current directory. To make textures work properly you will have to extract them yourselves, wm.mtl writes the names as .jpg but if your modelling tool supports png it should still work if you just rename the .png files.
For obj2map it is the obj file which will be converted into a set of WM0.MAP and WM0.BOT files, the mtl file is not used and textures do not need to actually exist for this to work.

Only WM0 is supported at the moment but it should be fairly easy to add support for underwater and snowfield in a later version.

Be careful with what kind of changes you make to the .obj file, the original coordinate system must be kept intact and objects must cover their respective square area. Also old(er) versions of blender may not be able to import/export the .obj file at all without mangling it too much.
Title: Re: World Map to .Obj Converter (and back!)
Post by: ff7rules on 2010-12-17 19:24:36
Can confirm this works! Even on the PSX version I used my files form that and it works. Awesome work Aali!!
Title: Re: World Map to .Obj Converter (and back!)
Post by: Lord_james on 2010-12-17 21:03:34
In the future, HQ world map. Sound nice. Good job.
Title: Re: World Map to .Obj Converter (and back!)
Post by: Aali on 2010-12-17 21:10:10
Actually these tools will probably not be used to create a HQ world map. The format is just too limited. Its more likely that a HQ world map will be done as an overlay inserted by some other means while the original map acts as walkmesh.
Title: Re: World Map to .Obj Converter (and back!)
Post by: kaspar01 on 2012-10-21 10:53:34
Does it work whith ff8 files too?Or similar tool exist for ff8?
Title: Re: World Map to .Obj Converter (and back!)
Post by: kini on 2012-10-24 21:12:50
I'd love to be able to port the world map to am arena in UT99. that would be my dream mod