OpenKH / OpenKh

Kingdom Hearts libraries, tools, game engine and documentation
https://openkh.dev
Apache License 2.0
291 stars 83 forks source link

[FEATURE] - Add "Export .FBX" To KH2MapStudio #925

Open Shinobz opened 11 months ago

Shinobz commented 11 months ago

Can we please get a feature in the KH2MapStudio to allow us to "Export .MAP as .FBX"?

Currently, we have ways to Import/Gen custom maps from Blender's/Maya's .FBX format, which is awesome! However, if you want to actually modify an existing map from KH2 like I'm trying to do, then there is currently only 1 way to do this that I'm aware of and it has been incredibly difficult:

The current method to Export a .MAP file into a mesh importable to Blender is to use ExPack (MapViewer), which is an older separate tool outside of OpenKH. It has an Export function in it's MapViewer, but the problem is that there is only 1 export option, which is a Blender Python script, and actually getting it into Blender is the hard part...

Back when ExPack was designed, they were on Blender Version 2.4.8a, which was running Python 2.5.4... Nowadays, Blender 3.6 (current) uses Python 3.12 (current), and Python 2 scripts won't run in Python 3. Most Python 2 scripts can be converted to Python 3 scripts using the "2to3" Python script; HOWEVER since these Python 2 scripts are specifically for Blender, they're entirely based around manipulating Blender 2.4.8a's modules, which no longer exist because Blender's API and modules have completely transformed to new names and functions with updates over the last 15 years... So after conversion to Python 3, the result is a working script which calls all the wrong modules as if it were speaking to Blender 2.4.8a -_-

I've downloaded Blender 2.4.8a and it is an entirely ancient and different UI to learn, and even the scripting window looks and works differently. My searches for any sort of tutorial for Importing Python scripts in that version has been fruitless, as I can only find tutorials of people running Blender 2.5 or higher, all of which have Python 3 compatibility... So I'm going to be attempting to figure all that out so I can get this script turned into a .FBX file in Blender 2.4.8a, then open and modify it in modern Blender/Maya, then export as .FBX and use MapGen.

But I can only imagine what the next person is going to go thru when they arrive at this same problem and realize one step at a time how ridiculous the process is.

I see drastic modifications have been made to the KH2MapStudio to turn it into a tool for animations/bones/etc., and I can only help but wonder if it's possible to add a feature to the KH2MapStudio which will allow an "Export as .FBX" function. Then again, I wonder why it was ever decided in the first place that the ExPack MapViewer's Export function should only come as a Python script and not an actual .FBX/.OBJ/mesh file.

This change would make KH2 Map Modding so much easier and more available, especially for newbies and folks that don't know anything about Python or the Olden Blender.

Thank you for your time! :)

dreamsyntax commented 10 months ago

If this proposal is pursued, consider glTF instead

Shinobz commented 2 weeks ago

Reading back over this nearly a year later, please excuse my general lack of knowledge and overcomplication of KH2 map extraction... This was written when I had like 2 months of modding experience lol... I nowadays use either Noesis or Map2MDLX for map extractions and it is nowhere near as difficult as what I listed above lol.

With that being said, I still would like to see this feature added to the KH2MapStudio itself if possible... We currently can export collisions, camera collisions, and light collisions... But not the actual map mesh :')

I really feel this change would make MapStudio the best possible all-in-one stop for extracting maps! 🙏