P4GModelConverter failing to load animations from .smd?
Posted: Tue Mar 02, 2021 11:55 pm
Like the title says, I'm trying to use the P4GModelConverter to combine a slightly edited model with that model's animations, back into 1 GMO for use in P4G PC.
I'm fairly certain that it's my fault though, there must to be some issue with my current process that's getting me stuck here.
Also, I understand there's actually been a fair bit of P4 and P3 model editing but there seem to be very few guides (many seem to have been lost in multiple forum closures over the years) and the ones that remain seem outdated and not compatible with many of the new tools people have come up with. I'd like to write a little tutorial/guide here for exporting editing, and repacking these P4G models (since I haven't been able to find one), but I've found myself stuck at the last step of re-importing the edited .smd models back into .gmo through the P4GModelConverter...
It's actually a fairly simple process, so I'm hoping if I list it here, someone with more knowledge can point out why this hasn't been working, and then maybe I can rework/finish this guide and post in the 'Guides' section of the forum...
===========================================================================================
Extracting models, editing them in blender, then importing them back into the model files
----------------------------------------------------------------------------------
1.EXPORT THE MODEL FILE:
-Go to the directory of model\pack and copy the file you want to edit into a new folder.
-For the example in this guide it will be Yukiko's Battle Gekko costume, it's "bc004_c4.pac"
-drag the .pac into Amicitia
-Click on the + squares in the left directory unil you see "MODEL_DATA" show up.
-Right click it and Export MODEL_DATA, but make sure to name it a name you'll recognize, and also add on the extension: .gmo
-drag the new .gmo into Noesis
-In the top right click File>export -change the "Main output type:" to .smd
(I've tried several different file types and honestly this seems like the only one that's been working so far...)
-Click Export.
>This will result in 1 .smd that has the model(out.smd), and 1 .smd that has the animations (out_mainsequence.smd) as well as some pngs that are the exported textures for the model.
2.IMPORTING AND EDITING THE MODEL IN BLENDER:
-Download and open blender vers. 2.80 or later.
-Download the Source Tools. (http://steamreview.org/BlenderSourceTools/)
-Don’t unzip.
Installing the 'Source tools' addon in Blender (necessary to import .smd):
Select Edit > Preferences
Move to the Add-ons tab
Click Install... at the top-right of the window
Find the downloaded zip file and select it (Double click)
'Blender Source Tools' should be the only add-on shown if installed correctly. Check the box to the left and wait a moment for activation to complete.
-Time to bring in the model.
-File>import>.smd
-Choose the model .smd
-make sure the options on the bottom left have the "Up Axis" set as Y
-Make sure "Import Animations" is checked
-now import the animations .smd -follow the same instructions as above.
-Edit the model
***NOTE: I'm not sure exactly how much you can edit without risking causing issues. For this example, I want to get rid of the glasses on Yukiko's battle model (mostly just as a test, in the future I'd like to experiment a bit with removing hats, and maybe swapping hair models. For now though I'm just trying to make sure I can get these edited models back into the game before I start putting a lot of effort into serious model editing).
So, rather than deleting them, I'm just going to shrink them a bit and then move them back so they disappear inside the head. So, they won't show on the model, but will still be there, so there's no missing object or unassigned texture issues)
-Okay, so now the change is done. Time to export!
-Exporting a .smd is a bit different than the usual blender export. You'll need to do it from the bottom right panel, specifically the "Scene" Tab (the tab has an icon of a cone and sphere).
-you'll have to choose an export folder.
-set the export format as SMD
-Target up Axis: Y
Under Source Engine Exportable, make sure both files are checked.
-now scroll back up and click "export" and both the model .smd and animations .smd will be exported to the folder (animations will be in a new folder called 'anims' by default.)
-You can check how the model is looking by draging the model.smd into Noesis, then, see how the animations are fitting by dragging the animations.smd over to Noesis as well, and by choosing "no" when it asks if you want to open as a new model.
-The animations are fitting perfectly in the example, and the glasses have been successfully removed. (If you aren't seeing textures on the model, make sure to have the .pngs exported from noesis present in the same folder that the .smd's are.
Okay, time to try to put the edited model and animations back into a .gmo!!!
3.CONVERTING THE EDITED MODEL AND ANIMATIONS BACK INTO 1 .GMO File
-Open P4GModelConverter
-In the first column, make sure "Convert to FBX w/ Noesis" is checked.
-also make sure "-fbxoldexport (animation)" is checked
-also make sure "-fbxascii (mds output)" is checked
-also make sure "Convert to FBX to GMO" is checked
-drag the new model.smd into the first square, which will generate an .fbx, a .gmo and an .mds
NOW, if you want to , you can then drag the new .mds file onto the middle square, and then drag the newer _p4g.mds file onto the last box on the right. (Check the "Preview New GMO w/ Noesis" box for it to preview the new .gmo model.
BUT you will notice that it is only a stationary model, the animations are not part of it.
-We need to find some way to add the animations onto it, like the original .gmo
*****************Okay, so here's where I'm kinda stuck...********************
4. GETTING WRECKED
-check the middle column box "load animations"
-in the far right corner click "import"
X -change the file type to .smd and select your animations.smd (Actually no, doesn't work, it crashes...
X-So let's try turning our animations smd into an mds and importing it that way... -Nope, it DOES load an animation, but it only labels that as 1 Noesis Frame -which is not the 20 or so animations that used to be there... (if you try to apply the model.smd to this single animation, it will end up making a gmo with animations, BUT the animations are playing at like 3x speed, and rather than seperate animations in a row, it seems like they've all been combined together in a wierd hyper mess...)
X-Okay turning the animations smd into .fbx and then importing the animations through that... -NOPE crashes...
-So, it doesn't seem like it's possible for P4GModelConverter to load animations from the .smd file that has all the animations.
Normally I'd think that the animations .smd was corrupted or something, but Noesis has no problem loading the same animation file and displaying them on the model .smd perfectly... :(
*****As part of one last ditch effort, I tried to load the animations from the Original gmo model's .mds file -and they do load!
(First close and reopen the P4GModelConverter, to get rid of the failed animations)
-so click and drag the ORIGINAL .gmo -and drag it into the first box -it will generate a .mds file.
-Now make sure the middle column's "Load Animations" box is checked, and click "import" in the bottom right corner.
-Choose the ORIGINAL gmo's .mds you just created.
-You will now see the right column fill up with numbered motions. These are the animations we've been trying to assign to the model. (If you click on the "Animation Preset" drop down, and choose which kind of model it is -in this example it's a P4G Party Member- it will kindly label all the animations as which is which. Nice!)
-So now we have the animations preloaded, all we need to do is drag our previous model.smd turned into .mds turned into _p4g.mds onto the last square (with Preview checked)
-Aaaaand -nothing happens -it still appears as a static model.
-But! If you then click on "Update MDS Animations" then, if you drag the newly created _p4g.gmo back onto noesis, it does have the animations!
But the model is now kinda janked. Part of her hair and part of her skirt are pulled straight up. (I wonder if this is due to them being sort of 'gravity simulated bones? like, both the hair and skirt have specific kinds of bones made to bounce around with physics, right? and all the other bones are fine. Hmmmmm)
So I can't seem to combine both the edited model and the animations back into 1 .gmo right now...
---
Well. There, we go. Tried my best, but it seems like some issue is causing me to trip up right at the finish line. T_T
Am I exporting them wrong from blender? Why doesn't the P4GCOnverter accept .smd animations when it accepts .smd models?? Why is it that when I try to load the original animations from the starting .gmo onto the slightly edited model it jacks up the rigging of the skirt and hair??
I've seen people with altered P4G models, heck, I've seen people rigging those models to other model's skeletons or swapping animations, so I KNOW this is possible, but I'm not sure what I'm doing wrong.
Hopefully someone is willing to advise me as to the issue, because I really would like to fix and finish this guide and get it posted to the forum...
I'm fairly certain that it's my fault though, there must to be some issue with my current process that's getting me stuck here.
Also, I understand there's actually been a fair bit of P4 and P3 model editing but there seem to be very few guides (many seem to have been lost in multiple forum closures over the years) and the ones that remain seem outdated and not compatible with many of the new tools people have come up with. I'd like to write a little tutorial/guide here for exporting editing, and repacking these P4G models (since I haven't been able to find one), but I've found myself stuck at the last step of re-importing the edited .smd models back into .gmo through the P4GModelConverter...
It's actually a fairly simple process, so I'm hoping if I list it here, someone with more knowledge can point out why this hasn't been working, and then maybe I can rework/finish this guide and post in the 'Guides' section of the forum...
===========================================================================================
Extracting models, editing them in blender, then importing them back into the model files
----------------------------------------------------------------------------------
1.EXPORT THE MODEL FILE:
-Go to the directory of model\pack and copy the file you want to edit into a new folder.
-For the example in this guide it will be Yukiko's Battle Gekko costume, it's "bc004_c4.pac"
-drag the .pac into Amicitia
-Click on the + squares in the left directory unil you see "MODEL_DATA" show up.
-Right click it and Export MODEL_DATA, but make sure to name it a name you'll recognize, and also add on the extension: .gmo
-drag the new .gmo into Noesis
-In the top right click File>export -change the "Main output type:" to .smd
(I've tried several different file types and honestly this seems like the only one that's been working so far...)
-Click Export.
>This will result in 1 .smd that has the model(out.smd), and 1 .smd that has the animations (out_mainsequence.smd) as well as some pngs that are the exported textures for the model.
2.IMPORTING AND EDITING THE MODEL IN BLENDER:
-Download and open blender vers. 2.80 or later.
-Download the Source Tools. (http://steamreview.org/BlenderSourceTools/)
-Don’t unzip.
Installing the 'Source tools' addon in Blender (necessary to import .smd):
Select Edit > Preferences
Move to the Add-ons tab
Click Install... at the top-right of the window
Find the downloaded zip file and select it (Double click)
'Blender Source Tools' should be the only add-on shown if installed correctly. Check the box to the left and wait a moment for activation to complete.
-Time to bring in the model.
-File>import>.smd
-Choose the model .smd
-make sure the options on the bottom left have the "Up Axis" set as Y
-Make sure "Import Animations" is checked
-now import the animations .smd -follow the same instructions as above.
-Edit the model
***NOTE: I'm not sure exactly how much you can edit without risking causing issues. For this example, I want to get rid of the glasses on Yukiko's battle model (mostly just as a test, in the future I'd like to experiment a bit with removing hats, and maybe swapping hair models. For now though I'm just trying to make sure I can get these edited models back into the game before I start putting a lot of effort into serious model editing).
So, rather than deleting them, I'm just going to shrink them a bit and then move them back so they disappear inside the head. So, they won't show on the model, but will still be there, so there's no missing object or unassigned texture issues)
-Okay, so now the change is done. Time to export!
-Exporting a .smd is a bit different than the usual blender export. You'll need to do it from the bottom right panel, specifically the "Scene" Tab (the tab has an icon of a cone and sphere).
-you'll have to choose an export folder.
-set the export format as SMD
-Target up Axis: Y
Under Source Engine Exportable, make sure both files are checked.
-now scroll back up and click "export" and both the model .smd and animations .smd will be exported to the folder (animations will be in a new folder called 'anims' by default.)
-You can check how the model is looking by draging the model.smd into Noesis, then, see how the animations are fitting by dragging the animations.smd over to Noesis as well, and by choosing "no" when it asks if you want to open as a new model.
-The animations are fitting perfectly in the example, and the glasses have been successfully removed. (If you aren't seeing textures on the model, make sure to have the .pngs exported from noesis present in the same folder that the .smd's are.
Okay, time to try to put the edited model and animations back into a .gmo!!!
3.CONVERTING THE EDITED MODEL AND ANIMATIONS BACK INTO 1 .GMO File
-Open P4GModelConverter
-In the first column, make sure "Convert to FBX w/ Noesis" is checked.
-also make sure "-fbxoldexport (animation)" is checked
-also make sure "-fbxascii (mds output)" is checked
-also make sure "Convert to FBX to GMO" is checked
-drag the new model.smd into the first square, which will generate an .fbx, a .gmo and an .mds
NOW, if you want to , you can then drag the new .mds file onto the middle square, and then drag the newer _p4g.mds file onto the last box on the right. (Check the "Preview New GMO w/ Noesis" box for it to preview the new .gmo model.
BUT you will notice that it is only a stationary model, the animations are not part of it.
-We need to find some way to add the animations onto it, like the original .gmo
*****************Okay, so here's where I'm kinda stuck...********************
4. GETTING WRECKED
-check the middle column box "load animations"
-in the far right corner click "import"
X -change the file type to .smd and select your animations.smd (Actually no, doesn't work, it crashes...
X-So let's try turning our animations smd into an mds and importing it that way... -Nope, it DOES load an animation, but it only labels that as 1 Noesis Frame -which is not the 20 or so animations that used to be there... (if you try to apply the model.smd to this single animation, it will end up making a gmo with animations, BUT the animations are playing at like 3x speed, and rather than seperate animations in a row, it seems like they've all been combined together in a wierd hyper mess...)
X-Okay turning the animations smd into .fbx and then importing the animations through that... -NOPE crashes...
-So, it doesn't seem like it's possible for P4GModelConverter to load animations from the .smd file that has all the animations.
Normally I'd think that the animations .smd was corrupted or something, but Noesis has no problem loading the same animation file and displaying them on the model .smd perfectly... :(
*****As part of one last ditch effort, I tried to load the animations from the Original gmo model's .mds file -and they do load!
(First close and reopen the P4GModelConverter, to get rid of the failed animations)
-so click and drag the ORIGINAL .gmo -and drag it into the first box -it will generate a .mds file.
-Now make sure the middle column's "Load Animations" box is checked, and click "import" in the bottom right corner.
-Choose the ORIGINAL gmo's .mds you just created.
-You will now see the right column fill up with numbered motions. These are the animations we've been trying to assign to the model. (If you click on the "Animation Preset" drop down, and choose which kind of model it is -in this example it's a P4G Party Member- it will kindly label all the animations as which is which. Nice!)
-So now we have the animations preloaded, all we need to do is drag our previous model.smd turned into .mds turned into _p4g.mds onto the last square (with Preview checked)
-Aaaaand -nothing happens -it still appears as a static model.
-But! If you then click on "Update MDS Animations" then, if you drag the newly created _p4g.gmo back onto noesis, it does have the animations!
But the model is now kinda janked. Part of her hair and part of her skirt are pulled straight up. (I wonder if this is due to them being sort of 'gravity simulated bones? like, both the hair and skirt have specific kinds of bones made to bounce around with physics, right? and all the other bones are fine. Hmmmmm)
So I can't seem to combine both the edited model and the animations back into 1 .gmo right now...
---
Well. There, we go. Tried my best, but it seems like some issue is causing me to trip up right at the finish line. T_T
Am I exporting them wrong from blender? Why doesn't the P4GCOnverter accept .smd animations when it accepts .smd models?? Why is it that when I try to load the original animations from the starting .gmo onto the slightly edited model it jacks up the rigging of the skirt and hair??
I've seen people with altered P4G models, heck, I've seen people rigging those models to other model's skeletons or swapping animations, so I KNOW this is possible, but I'm not sure what I'm doing wrong.
Hopefully someone is willing to advise me as to the issue, because I really would like to fix and finish this guide and get it posted to the forum...