eArmada8 / gust_stuff

Tool for modding G1M files from Atelier games.
GNU General Public License v3.0
23 stars 1 forks source link

Marvel Ultimate Alliance 3 VB/IB files. #4

Closed Charsles closed 4 days ago

Charsles commented 1 week ago

hey there, i'm me again... i don't know if the problem is with your exporter or the 3dmigoto blender plugin but the MUA3 models don't get the bones/vertex renamed when i import to blender. i tried the method of changing the BLENDINDICES in the fmt file to UNKNOWN but now it doesn't load any vertex/bone names. also, when i export the files, i don't even get the vgmap file too

this is how it looks after changing the fmt file options imagem_2024-09-17_110053510

and this is how it normally looks, wich is totally messed up and i don't know what to do anymore since i can't mod the game like this.

image image image image

it's almost like the meshes are telling theirself that they have separated bones for each one of them and all of them starts with 0. like i said, i don't know if the problem is with the G1M unpacker or the Blender plugin but would you mind helping me fix this plz? i'm having a really hard time trying to understand. i even tried to use the "g1m_to_basic_gltf" script but when the process ends and i try to open the model on blender, i get this: image

i will be leaving the G1M and the VB/IB files if you want to check them out https://www.mediafire.com/file/rrgc27100lv0fgj/0005_WIDOW_mdl.rar/file

eArmada8 commented 1 week ago

The G1M format does not have any bone names in it. Gust (Atelier/BR) games specifically store them in a file called Oid, but other game studios that I've come across do not give us bone names at all. Regardless, they are not inside the G1M file - inside the file the bones are indexed (essentially you can think of indexed as numbered).

For example, this is the contents of pc00a_model.elixir.gz, as reported by Gust Tools:

{
    "json_version": 0x1,
    "name": "pc00a_model.elixir.gz",
    "compressed": true,
    "flags": 0xa,
    "files": [
        "PC00A_MODEL.g1m",
        "PC00A_MODEL_default.g1m",
        "PC00A_MODELOid.bin",
        "PC00A_MODEL.swg"
    ]
}

The first file is the model alone, the second file has the skeleton, the third is a list of bone names, and the fourth is some sort of physics data. So if you want to have bone names, you will have to find the Oid file.

For reference, ProjectG1M states that there are two types of Oid, and I believe my script can successfully decode them both. I did not find any information on alternate ways to store bone names at THRG.

Charsles commented 1 week ago

i don't think we have this type of file on MUA3 models. i've exported a lot of models before and none of them gave me this file. maybe could it be one of those .bin? every model has and i noticed that the Oid in the file above is in .bin format too, maybe if i rename the file could work? what do i do after i rename them? just export the model as usual and load on blender? or do i need to export this Oid file?

imagem_2024-09-17_125840529

eArmada8 commented 1 week ago

Open any files you think might be an oid file in a hex editor, it will be very obvious. This is what PC00A_MODELOid.bin looks like:

HeaderCharaOidObjectID:PC00A_MODEL10,root
1,SK_Skeleton   2,SK_Hips3,SK_Spine014,SK_Spine02 5,SK_Neck   6,SK_Head7,SK_L_UpLeg8,SK_R_UpLeg
9,SK_L_Leg10,SK_R_Leg11,SK_L_Foot12,SK_R_Foot13,SK_L_Toes14,SK_R_Toes15,SK_L_Shoulder16,SK_R_Shoulder17,SK_L_Arm18,SK_R_Arm19,SK_L_ForeArm20,SK_R_ForeArm21,SK_L_Hand22,SK_R_Hand23,SK_L_Weapon24,SK_R_Weapon50,
eArmada8 commented 1 week ago

Also, the gltf script does not support extended bonemaps, and I have no plan to add support since no atelier games use them. Please use Project G1M to get a gltf file. EDIT: Actually it seems my script already supports extended bonemaps. This seems to be the same problem as DOA models, probably too many values in normal. I'll update this if I figure it out.

EDIT: The G1M file you shared is actually missing the entire skeleton - there are no bones in the model, period. There must be another G1M file that has the actual skeleton. (For reference, in the example model I described above, the model meshes are in PC00A_MODEL_default.g1m, and the skeleton is in PC00A_MODEL.g1m.

Charsles commented 1 week ago

oh yeah, i totally forgot to send the skeleton so you could check it out, sorry about that! here all of the model folder 0004.g1m is the skeleton 0005.g1m is the base model 0006 until 0009 is the other models.

can you try to load the model on blender?

https://www.mediafire.com/file/0blb8bt62l050lg/0005_WIDOW_mdl.rar/file

eArmada8 commented 1 week ago

Ok, I fixed a few bugs, I think things are working moreso as intended now. Try v1.3.11. Note that without the Oid file, you will still have generic bone names, but at least now they are consistent across the bone palettes. I fixed a few small issues with the glTF exporter as well.

Charsles commented 1 week ago

i will be closing this issue since it's not actually an issue, it's the game that don't has this file but thanks for the attention and for updating the tool once again!

Charsles commented 4 days ago

hey there @eArmada8, this is not an issue but a invitation. do you have discord? if so, would you mind helping us from the MUA3 community to create a script? we are using yours as base. you don't need to do the work, only to explain things for us, guiding us. pleeease.

here is the link https://discord.gg/QjCWPSHx