Editing some other files with hex editor

Hi,

I tried learning how some files works in Saint Row 3.
I just started on dildobat.rig_pc with an hex editor.
The .rig_pc are used for skeleton.
I edited the position of a bone and that's works.
2011-12-13_00002.jpg
I have to figure out how the others files works .gcmesh_pc ...

Moderator Note:
The info from this thread is being collated by scanti in the Guides and Tutorials forum, and this thread is now locked:
http://www.saintsrowmods.com/forum/index.php?threads/decoding-the-saints-row-3-mesh-format.1020/
 
Now i know where is located the XYZ bones position on the rig_pc.
I want to update the customize_item.asm_pc for testing on player bones items but the Gibbed.SaintsRow3.UpdateASM crash: :(
ccmesh_pc
Error: unsupported primitive type 9 ('Pcust mesh')

Please Gibs update your tool i want to try more stuff inside the customize_item.vpp_pc archives
 
I uploaded the edited dildo_bat. I can't update the customize_item.asm_pc file.
 

Attachments

  • items_preload_containers.asm_pc
    16 KB · Views: 801
  • dildo_bat.str2_pc
    17.7 KB · Views: 886
I working to isolate the vertex data from the others data inside shaundi.gcmesh_pc file. :)
shaundivertex.jpg
I'm not a programmer i just try to learn how some files works with an hex editor.
 
Again the Gibbed.SaintsRow3.UpdateASM tool can't update the character_containers.asm_pc and customize_item.asm_pc.
I can't try ingame my modding stuff inside the characters.vpp_pc and customize_item.vpp_pc archives :(
I can just edit the preload_items...
 
You were able to make a file that MilkShape could open, edit, and save?!
That's *incredible*!

What plug-in does it use, and what extension would the 3d files be?
Also, what's the minimum version of MilkShape required to handle those plug-ins?

Everyone thought 3D model editing would never be possible for this game. Wow.
 
I've done some work decoding the mesh format. I started on the ccmesh_pc format, but then realized most of the important info is in the gcmesh_pc file. But then realized that reading in the gcmesh format would be a lot easier with the info from the ccmesh. So I'm going to continue working on that. I've also learned that the ccmesh and the csmesh files are basically the same thing, except a ccmesh has a rig and the csmesh does not.

I'm pretty sure they are using 8 byte pointers. So there appears to be junk sitting around in some places:

Of the ccmesh format heres where I got:
It starts off with a basic header:
unsigned int unknown (always 0x00043854)
unsigned int data_size
unsigned int unknown (always 0)
unsigned int file_count
* unknown (appears to be 2 pointers)

After that is a list of files of size data_size + 1

Then there is the mesh_info_header:
unsigned int unknown (always 0x424bdood)
unsigned int unknown (always 0x0000002a)
short points_of_interest_count
short bones_in_rig_count
short something_count
short something_count
short something_count
short something_count
int unknown
* unknown
* unknown
vector bounding_sphere_center
float bounding_sphere_radius
short thing1_count
short thing2_count
int unknown (might be junk)
* unknown (6 pointers in a row?)
int something_count
int unknown
* unknown (2 more pointers ?)
uint texture_name_data_size

texture_name block (alignment to 16 bytes):
byte unknown
texture_names

points_of_interest block (alignment to 16 bytes, points_of_interest_count)
char name[64]
int unknown
vector position
quaternion orientation

thing1 block (alignment to 16 bytes, thing1_count)
int unknown
int unknown
vector position
float value

thing2 block (alignment to 16 bytes, thing2_count)
int unknown
int unknown
vector normal
vector position
float value1
float value2

array of ints (alignment to 16 bytes, num_bones_in_rig)
appear to be just counting up starting from 0 to num_bones_in_rig - 1

another_header block - I think this is the important block describing the gcmesh file
int unknown (always 0x00000009)
int crc (same value that appears at the beginning and end of the gpu file)
int unknown
int size_of_gcmesh_pc
int flags (1 if it's an csmesh, 3 if it's a ccmesh)
int unknown[7]
int indices_count
int unknown[3]
byte index_stride
byte unknown
short unknown
int unknown
int bones_in_rig_count
int unknown[7]
vector scale(just a guess, it always appears to be 1, 1, 1)
int unknown[3]
int vertex_count
byte vertex_stride
 
Ok thanks for your research Loatheb. I'm not a programmer i just use a tool that's convert the data to float inside a txt file. I don't have build any plugin.
I save the .txt (before to save it i remove some stuff) to .obj and i can load the vertex with Milkshape 3d. The data between each vertex position is not the same for each .gcmesh files.
Now i search how the face are saved inside the .gcmesh_pc.
bruteminigunvertex.jpg
 
Back
Top