Saints Row 3\4\Remastered mesh import addon for Blender

For characters, this seems to generate topology on import that has exactly the same issues that all OBJ files produced by the old "model viewer" tool did. Their bodies and clothes are almost always a mess of basically random, inconsistently sized overlapping triangles that are pretty much impossible to work on / with. This can't possibly be how the meshes are actually interpreted and rendered by the games.
 
For characters, this seems to generate topology on import that has exactly the same issues that all OBJ files produced by the old "model viewer" tool did. Their bodies and clothes are almost always a mess of basically random, inconsistently sized overlapping triangles that are pretty much impossible to work on / with. This can't possibly be how the meshes are actually interpreted and rendered by the games.
I don't know what you mean specifically, but:
a) The script imports all the higher LODs (lower detail meshes that the game switches to when the characters are far away from the camera), you can just delete them, they're all separate objects.
b) If you mean discontinuities in the meshes themselves, duplicated vertices and such, that's normal too. Modelers use various tools to manipulate how lighting looks on the model, like Edge Split modifier in Blender for example, which, well, splits edges when applied. Edges that make up UV seams get split as well.

Models in various binary formats that games use are rarely as "clean" as the models you'd make in an editor, cause they're not really meant for any further editing, and the data is stored in a way that is best for performance, not preservation of the state that is easier to work on.
 
Hello, I'm new to modding SR4 but I'm trying to edit the Miss Mischief outfit, located in "custmesh_1657710167f.str2_pc", to make a standalone cape without the suit. I wanted to use Blender because your method seems so much better, so I imported the mesh with your addon and deleted the body, leaving only the cape. I exported it as an FBX with the custom properties option checked. However, when I try to use the SDK converter, it gives me an error and doesn't create the output file. Is it because I didn't add materials to the mesh (not sure how) or something else I failed to do?
Thanks for your tool btw, I probably wouldn't attempt modding meshes without it.
 
However, when I try to use the SDK converter, it gives me an error and doesn't create the output file. Is it because I didn't add materials to the mesh (not sure how) or something else I failed to do?
Yeah, you do need to have a material on your mesh.
I attached an archive with a blender file containing a model from the game with a material set up and a modified converter script. Converter is modified to use a texture plugged into Emission input of the Principled BSDF as a pattern map.
Material doesn't look right in blender, but that's fine, it's only meant for exporting purposes. You can just copy it to your mesh, and load the appropriate textures into Image Texture nodes. The one plugged into BaseColor input of Principled BSDF is meant for color\albedo texture, the one plugged into Emission input is for the pattern map, the one plugged into Normal Map node is for normal. If your model does not have a color\albedo texture, as many customization items don't, you can just delete that node.
Note that textures have to be in .tga format.
 

Attachments

  • example.7z
    452.8 KB · Views: 28
Yeah, you do need to have a material on your mesh.
I attached an archive with a blender file containing a model from the game with a material set up and a modified converter script. Converter is modified to use a texture plugged into Emission input of the Principled BSDF as a pattern map.
Material doesn't look right in blender, but that's fine, it's only meant for exporting purposes. You can just copy it to your mesh, and load the appropriate textures into Image Texture nodes. The one plugged into BaseColor input of Principled BSDF is meant for color\albedo texture, the one plugged into Emission input is for the pattern map, the one plugged into Normal Map node is for normal. If your model does not have a color\albedo texture, as many customization items don't, you can just delete that node.
Note that textures have to be in .tga format.
Thanks for the help, I thought I did everything right, but I must have made some mistake. I copied the material (selected all the meshes, pressed ctrl+L and selected "link Material") and it was applied to the cape. Then I selected the shaders tab, deleted the color texture node and replaced the other two with the ones I extracted from the Miss Mischief outfit (after I converted them into .tga).

I used your modified converter, but no matter which option I chose for the shader, it always gives me the same error: "wx.MessageBox( 'Cannot write to the file at this time: ' + sself.cmeshx_files[ self.selected_mesh ], style = wx.OK, caption = 'Volition FBX Converter' ) NameError: global name 'sself' is not defined"

I wonder if the error is related to my python install, or maybe it's because the cape uses two meshes. Well, whatever this "sself" is, I have to define it somehow lol.

Anyway, I don't know if this helps in identifying the problem, but here's a screenshot of the mesh in Blender, after the changes I made, plus my modified mesh:
 

Attachments

  • Cape1.png
    Cape1.png
    5.6 MB · Views: 42
Last edited:
I used your modified converter, but no matter which option I chose for the shader, it always gives me the same error: "wx.MessageBox( 'Cannot write to the file at this time: ' + sself.cmeshx_files[ self.selected_mesh ], style = wx.OK, caption = 'Volition FBX Converter' ) NameError: global name 'sself' is not defined"
This particular error is a result of a typo in the converter's code.
But the reason you're getting the exception thrown at all is probably that the name of your mesh confuses the converter. It reads like a path to file, and converter uses the name in the output path, and i guess it ends up trying to write to non-existing location. Change the name of the mesh to something with no slashes in it.

Also, i believe that converter does expect single mesh, single material input, so you should probably join the meshes.
 
This particular error is a result of a typo in the converter's code.
But the reason you're getting the exception thrown at all is probably that the name of your mesh confuses the converter. It reads like a path to file, and converter uses the name in the output path, and i guess it ends up trying to write to non-existing location. Change the name of the mesh to something with no slashes in it.

Also, i believe that converter does expect single mesh, single material input, so you should probably join the meshes.
Yup, you're right. I changed the names, merged the meshes into one and it worked. But, even though it converts the files and even re-packages them back to the ".str2_pc" format, they don't seem to work in-game when I place them in the Saints Row 4 directory. Probably because the converter gives an error saying it failed to crunch the files:
ERROR: Crunch failed.
texture_crunch_wd.exe
Failed to crunch file: logs\texture_crunch_wd_pc_cf_suit_shb_dp.rule
Failed to crunch file: logs\texture_crunch_wd_pc_cf_suit_shb_n.rule
converter\peg_assemble_wd.exe
Failed to crunch file: logs\peg_assemble_wd_pc_Capemesh.rule

I also checked the converted mesh in Blender and it's pretty strange. Not only is it flat on the floor, but also there are now four identical meshes all in the same place.
Anyway, I don't mean to trouble you with this attempt at a mod too much, it's not a big deal if it doesn't work and I appreciate all the help you gave. This converter tool is pretty sensitive though lol
 
ERROR: Crunch failed.
texture_crunch_wd.exe
Failed to crunch file: logs\texture_crunch_wd_pc_cf_suit_shb_dp.rule
Failed to crunch file: logs\texture_crunch_wd_pc_cf_suit_shb_n.rule
converter\peg_assemble_wd.exe
Failed to crunch file: logs\peg_assemble_wd_pc_Capemesh.rule
Well, it seems like something's wrong with textures. Do you have them in the same folder as the .fbx file? Cause i don't think that fbx files store paths to textures, only their names.
I also checked the converted mesh in Blender and it's pretty strange. Not only is it flat on the floor, but also there are now four identical meshes all in the same place.
That's fine. They're probably not identical, other 3 must be LODs. And as far as them laying on the floor, that's just the Blender thing, most other 3D programs consider Y to be the up\down dimension.
This converter tool is pretty sensitive though lol
It is, it is.
 
Well, it seems like something's wrong with textures. Do you have them in the same folder as the .fbx file? Cause i don't think that fbx files store paths to textures, only their names.

That's fine. They're probably not identical, other 3 must be LODs. And as far as them laying on the floor, that's just the Blender thing, most other 3D programs consider Y to be the up\down dimension.

It is, it is.
Putting the textures in the same folder fixed it, thanks! As far as I can tell, the converter no longer gives me any errors when it comes to the mesh. However, when updating the "dlc1_customize_item.asm_pc" file, it says it's unable to find both the "gpeg_pc" and the "cpeg_pc" files, even though they're there in the folder. Maybe I picked the wrong "asm_pc" file for the outfit, or something. But this time the files did produce results in-game. If I place only the custmesh, the Miss Mischief outfit becomes invisible and the character appears in underwear. But if I also place the "asm_pc" file in the game's directory, the game crashes as soon as I select the outfit in the menus.

I'll keep trying though, maybe I'll figure out what I did wrong (I'm guessing it's the "asm_pc" file I chose). But I've been re-reading the tutorial about adding items with physics into the game (found here: https://www.saintsrowmods.com/forum/threads/customization-items-with-physics.17290/ ) and I'm not sure if what I'm trying is even possible. I mean, the author of the tutorial goes through so many steps like rigging and skinning the bones, they even edit the "rig_pc" file, I wonder if maybe that's required here as well, because it seems strange that my modified custmesh would turn the outfit completely invisible in-game, even without the "asm_pc" file.
 
Back
Top