SR3 Texture Utilities

I've been working on the Saints Row 3 texture files and I've finally thrown together a utility to unpack the texture data files.

I haven't written the program to repackage the textures (there is still one flag I can't decode) however I am working on it.

For those of you that like that sort of thing the program's source is in the source code
folder. For those that don't you can just delete it.

Usage:

To unpack a texture file:

SR3UnpackTextures [optional parameters] <<filename>.cpeg_pc or <filename>.cvbm_pc>

You need to have the corresponding <filename>.gpeg_pc or <filename>.gvbm_pc file in the same directory.

i.e.

SR3UnpackTextures ui_legal_pc.cpeg_pc

Plus the ui_legal_pc.gpeg_pc file has to be in the same directory as the ui_legal_pc.cpeg_pc file.

It will scan the file for any textures and save them under <texture name>.DDS

Sorry if you don't like DDS files but that's the format the game uses and I'm too lazy to convert the file format.

Optional parameters:

-o:<output directory>
Set the directory that the textures are extracted to, instead of the same directory as the peg file.​
-silent
Only output errors.​

To repack the textures:

SR3RepackTextures [optional parameters] <cpeg file name>

The cpeg file name is the file name of where the textures were originally extracted from. It must end with a cpeg_pc or cvbm_pc extension.

The files at the moment must be in the DDS file format. The formats this utility supports are:

DXT1
DXT3
DXT5
R5G6B5
A1R5G5B5
A4R4G4B4
R8G8B8
A8R8G8B8

Optional parameters:

-i:<input directory>
Set the directory that the textures are read from, instead of the same directory as the peg file.​
-o:<output peg file>
Set the name of the peg files that are created. Handy if you don't want to overwrite an existing peg file. The file name must end with cpeg_pc or cvbm_pc.​
-silent
Only output errors.​
Let me know if there are any problems with the utility and I'll do my best to fix them.

The file is attached to this post. Download SR3TextureUtilities6.7z for the latest version.
 

Attachments

  • SR3TextureUtilities6.7z
    82.5 KB · Views: 8,763
OK I've written the repackaging utility. So you can now unpack the game's textures, alter them and repackage them back into the game.

Enjoy.
 

Attachments

  • SR3TextureUtilities2.7z
    11.3 KB · Views: 1,512

[V] IdolNinja

Volition Staff
Awesome!

EDIT:
I just saw the note at the end of the readme. :)
 
Whoops made a mistake with the previous version that meant it couldn't repack uncompressed DDS textures. (Put a = instead of a == in an if statement). This new version fixes it.
 

Attachments

  • SR3TextureUtilities3.7z
    11.4 KB · Views: 1,247
I keep getting this error when trying to unpack a file. "The application has failed to start because its side-by-side configuration is incorrect."
 
Damn Microsoft. I wrote the thing in standard ANSI C++ to try to avoid these problems. Why do they have to make everything so fiddly?

Your standard C++ libraries are out of date so try downloading the Visual C++ Redistributable files from Microsoft.

I wrote it in VS2005 so try these 2 files first:
Microsoft Visual C++ 2005 Redistributable Package (x86)

Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)

If it still doesn't work then try the later files:
Microsoft Visual C++ 2008 Redistributable Package (x86)

Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)

Microsoft Visual C++ 2010 Redistributable Package


If you still have problems then let me know and I'll try to build the file with all the libraries built into it (statically linked). The problem is that it will greatly increase the size of the file.
 

[V] IdolNinja

Volition Staff
The problem is that it will greatly increase the size of the file.

If you have any concerns about filesize, feel free to message either Minimaul or myself. My guess is that it will probably be fine considering we're already hosting a 250Mb download for Wwise.
 
OK 'greatly' was a bit of an exaggeration. :)

I've recompiled with the libraries statically linked. Hopefully this version should work on any computer without problems.

EDIT: Do you still have the same problems with this version?
 

Attachments

  • SR3TextureUtilities4.7z
    43.1 KB · Views: 1,419
Top