SR4 Character Mesh Viewer

can the game be playable with that lmg mesh on the picture?

If you are talking about the gang rifle... that isn't a texture shown in the picture. It is just a different way of rendering the model that makes the surface of the mesh look solid. You could use this tool to help develop a new texture for the model (that is one of my goals for this program).
 
Version 1.6 is now released. The program and the source have been added to the first post.
  • Now loads textures directly from CPEG files.
  • Uses LOD to only draw one model instead of drawing all models contained in the CMESH file.
  • Also took UpgradeCount into consideration when drawing models. Some models (Professor Genki, Shaundi) depend on it.
  • Makes use of a TextureMap table to figure out what texture goes to a particular mesh material. If a model doesn't have an entry in the table it goes back to best guess (with mixed results).
  • Fixed alignment issue that prevented some models from loading (Lin).

I got tired of beating my head against the wall trying to figure out how the model maps textures to materials. So I tried another approach. It is a bit of a hack but it works. I created a table with entries for different models. If the model you are trying to view is in the table then it uses that entry to map the textures (see Kinzie, KinzieStrix, Killbane, Gat, Shaundi, ShaundiSim, Pierce). If the model isn't in the table, then it goes back to the best guess scenario with mixed results (see Professor Genki, Jones, Alienspr, etc...).

Also, with the information from Scanti tools (thank you Scanti) the program now reads the textures directly from the PEG files. So no need to extract them if all you are doing is viewing models.
 
Updated: 2013-10-30 v1.6

This tool is still in early development. As such I am still experimenting with different approaches to find out what works best and some features (such as the GUI) will change often.


Requirements
Usage
Step 1: Unpack characters.vpp_pc.
Your choice of SR3 or SR4. Use the appropriate tool to unpack the VPP_PC file. It will create a directory full of files with STR2_PC as the extension. Characters.vpp_pc can be found in the games cache folder. For SR4 it will be:
\Steam\SteamApps\common\Saints Row IV\packfiles\pc\cache
  • For SR3 use Gibbed.SaintsRow3.UnpackVPP.exe to unpack characters.vpp_pc
  • For SR4 use ThomasJepp.SaintsRow.ExtractPackfileGUI.exe to unpack characters.vpp_pc
Step 2: Unpack character model from STR2_PC file.
Use the appropriate tool (for SR3 or SR4) to unpack the STR2_PC file you want to look at. This will create a directory with various files. Make note of this directory (you will need it in the next step). One of the files in this directory should have an extension of CCMESH_PC (this is the type of file the MV program is looking for).
  • For SR3 use Gibbed.SaintsRow3.UnpackSTR2.exe to unpack any STR2_PC file
  • For SR4 use ThomasJepp.SaintsRow.ExtractPackfileGUI.exe to unpack any STR2_PC file
Step 3: Open CCMESH file with MV.
Start MV. Click the 'Open' button. Navigate to the directory where the CCMESH_PC file is located (the one from step 2).

--- Stop Here if you are just viewing models ---
Step 4: Extract textures for model. (Optional)
By default the program will load textures from the PEG files, but before it looks for a PEG file it will attempt to load loose Bitmaps. Texture modders can take advantage of this to test out their mods before repacking the assets.

Use Scanti's SR3 Texture utilities to unpack the CPEG file associated with the character model you want to view. Unpack them into the same directory as the CCMESH files. Use a drawing program (I used Paint.net) to open the DDS files and save them as Bitmaps.

NOTE: Paint.net wanted to remove the ".tga" from the name when saving as Bitmaps but the texture names in the CCMESH files include it as part of the filename. Make sure the ".tga" is part of the name or the program won't load the texture.

Before:

After:
WARNING:
STR2_PC archives ending with "_high.str2_pc" do not contain CCMESH_PC files.

Exporting

Step 1: Open the model in MeshViewer.
Open a npc character model.
Step 2: Click "File -> Export To -> Wavefront OBJ" from the menu.
Check the status bar at the bottom to see when it is complete and if it completed without errors. The OBJ file is saved to the same folder as the CCMESH file.​

Step 3: Import into Blender.
Please, I am no expert in Blender (I had to watch a tutorial to figure out how to rotate the model) so don't ask me for help in the use of Blender. I am using Blender 2.6, from the main menu you go to "File -> Import -> Wavefront (.obj)" to begin the process.
Release History

2013-10-30 1.6
  • Now loads textures directly from CPEG files.
  • Uses LOD to only draw one model instead of drawing all models contained in the CMESH file.
  • Also took UpgradeCount into consideration when drawing models. Some models (Professor Genki, Shaundi) depend on it.
  • Makes use of a TextureMap table to figure out what texture goes to a particular mesh material. If a model doesn't have an entry in the table it goes back to best guess (with mixed results).
  • Fixed alignment issue that prevented some models from loading (Lin).

2013-10-15 1.5
  • Changed back to the OpenGLControl to support displaying textures
  • GUI now uses Docking Panels for various controls.
  • Docking Panel state is persisted between sessions.
  • Property panel is for display only. Changing values does not update model.
  • Head mesh is now pulled in with the Body mesh (or vice versa).
  • Some textures are loaded with the model (this needs more work).

2013-09-26 1.4
  • Changed the GUI (totally ripped off the SharpGL scene sample). Switched the main display from an OpenGL control to a SceneView.
  • Solved the issue with Wavefront OBJ files. No longer need to split.
  • Solved the issue with left-to-right mirroring of the models.
  • Increased model compatibility. More models will now display in the viewer but still a few more format variations out there that need to be added.
2013-09-16 1.3
  • Added ability to export models to Wavefront Obj format (which is easy to import to Blender)
  • Improved compatibility with various models (thanks to a tip from Minimaul)
2013-09-13 1.2
  • Improved exception handling.
  • Increased understanding of CCMESH format. (Big thanks to Sir Kane on this one, his 3ds Importer data structures had a lot of good information).
  • Added a status bar to the bottom to display error messages.
  • Added a "Point", "Wire", and "Solid" button to change how the model is rendered.
2013-09-07 1.1 Source only since I haven't added enough to it yet. Includes:
  • Fixed issue where position offsets were kept when switching models.
  • Changed the method used to translate the model around the screen.
  • Added a button to center the model in the view.
  • A few new comments on the format of the CCMesh file
2013-09-07 1.0 Initial Release
its sounds like you hear my pray hee hee i was waiting for a model viewer like those in Counter Strike 1.6 where you can test your new skins and see how it looks like, it would be awesome to do some hacks with this like put Gat head on a murderbot or put a alien body to the Main Character...
 
its sounds like you hear my pray hee hee i was waiting for a model viewer like those in Counter Strike 1.6 where you can test your new skins and see how it looks like, it would be awesome to do some hacks with this like put Gat head on a murderbot or put a alien body to the Main Character...
I dont think what your asking is possible yet :p, you would view your own 'skins' that would be your defuse, spec, and normal maps in a 3D program not this

Also you would not be able to do them kinds of mods to Player Character sorry to tell you, as the character info is stored in your save

Extra Note for Missing Link: Will this ever be updated for use with static mesh's, I know its called Character Mesh Viewer but I tend to use it to work on Weapon Mesh's as most of them use Cmesh aswell for animation purposes but the ones that use static mesh atm ther is no way to view these :(
 
I dont think what your asking is possible yet :p, you would view your own 'skins' that would be your defuse, spec, and normal maps in a 3D program not this

Also you would not be able to do them kinds of mods to Player Character sorry to tell you, as the character info is stored in your save

Extra Note for Missing Link: Will this ever be updated for use with static mesh's, I know its called Character Mesh Viewer but I tend to use it to work on Weapon Mesh's as most of them use Cmesh aswell for animation purposes but the ones that use static mesh atm ther is no way to view these :(
i know that about the caracter but a guy can dream right? lol thumbz upz
 
i know that about the caracter but a guy can dream right? lol thumbz upz
Yes, its good to have crazy ideas, coz if you just have boaring ideas all the time then you will be limiting your self :p

Any way this Thread is getting bit off topic now so this will be my last reply for now untill I get info from Missing Link about what I asked a few posts ago :)
 
Will this ever be updated for use with static mesh's, I know its called Character Mesh Viewer but I tend to use it to work on Weapon Mesh's as most of them use Cmesh aswell for animation purposes but the ones that use static mesh atm ther is no way to view these :(

You're right, currently it only opens CMESH files. Eventually I would like to support SMESH and LMESH (that last one is used for buildings). I'm looking into it in my spare time but no promises about when you might see it.
 
You're right, currently it only opens CMESH files. Eventually I would like to support SMESH and LMESH (that last one is used for buildings). I'm looking into it in my spare time but no promises about when you might see it.
Ill try and keep and eye on this thread for when its done :), just glad to know that them formats will hopefully be added in time
 
Back
Top