Page 1 of 2

Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Dec 17, 2011 12:00 pm
by demolos
Hello!
Somebody can try to read this .gcmesh_pc files?
I only found the xyz vertex...
Image
Image

I made a topic here with some research on the files formats:
https://www.saintsrowmods.com/forum/ind ... ditor.255/

Some samples files:
http://www.sendspace.com/file/mnuwbg
Thanks :)

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Dec 17, 2011 2:17 pm
by mariokart64n
had a quick look at it, the GC file holds the faces, and the vertices, but theres some odd data in there that doesn't line up... so there may be additional data aswell

the CC file is the control file, but I haven't figured out how to parse the damn thing. the face section needs to be seperated, theres LODs and elements combined in the same buffer.

I wrote up a quick import script for 3dsmax to have a look at the faces, so I could break down the proper face counts

here's a progress update;

Image

Code: Select all

clearlistener()

mscale=39.3700787

fsource = GetOpenFileName \
caption:"Saints Row Turd Importer" \
types: "SRIII CC File (*.ccmesh_pc)|*.ccmesh_pc|"
if (fsource!=undefined) AND ((doesFileExist fsource)==true) then(
fpath=getFilenamePath fsource
fname=getFilenameFile fsource
fsize=getFileSize fsource
fsize=          getFileSize fsource
gsource=(fpath+fname+".gcmesh_pc")
if (gsource!=undefined) AND ((doesFileExist gsource)==true) then(
f = fopen fsource "rb"
s = fopen gsource "rb"
gsize=getFileSize gsource
count3=0
count4=0
check=true
while check==true do(
if (ftell f)!=fsize AND check==true then(
if (readbyte f #unsigned)==16 do (
if (ftell f+4)<=fsize AND check==true then(
if (readlong f #unsigned)==0 do (
if (ftell f+4)<=fsize AND check==true then(
if (readlong f #unsigned)==33554432 do (
if (ftell f+71)<=fsize AND check==true then(
check=false
fseek f 63 #seek_cur
count3=readlong f #unsigned
count4=readlong f #unsigned
)else(check=false))
)else(check=false))
)else(check=false))
)else(check=false))

vertArray=#()
uvwArray=#()
normArray=#()
faceArray=#()
count5=(gsize-(count3*32+4))/2
	
StartDirection = -1
f1 = readshort s #unsigned + 1
f2 = readshort s #unsigned + 1
if f1>=count3 do f1=1
if f2>=count3 do f2=1
FaceDirection = StartDirection
IndexCounter = 2
Do (
f3 = readshort s #unsigned

IndexCounter += 1
if f3>=count3 then (
f1 = readshort s #unsigned + 1
f2 = readshort s #unsigned + 1
if f1>=count3 do f1=1
if f2>=count3 do f2=1
FaceDirection = StartDirection
IndexCounter += 2
) else (
f3 += 1
FaceDirection = -FaceDirection
if (f1!=f2)AND(f2!=f3)AND(f3!=f1) then (
if FaceDirection > 0 then append faceArray [f1,f2,f3]
else append faceArray [f1,f3,f2]
)
f1 = f2
f2 = f3
)
)
while IndexCounter !=count5
	
fseek s (gsize-(count3*32+4)) #seek_set

for i = 1 to count3 do(
p1=readfloat s*mscale
p2=readfloat s*mscale
p3=readfloat s*mscale
p4=readfloat s
p5=readfloat s
p6=readfloat s
p7=readfloat s
p8=readfloat s
append vertArray[p1,-p3,p2]
append uvwArray[0,0,0]
append normArray[0,0,0]
)

msh = mesh vertices:vertArray faces:faceArray
msh.numTVerts = vertArray.count
buildTVFaces msh
msh.displayByLayer = false
msh.backfacecull = on

for j = 1 to vertArray.count do setTVert msh j uvwArray[j]
for j = 1 to vertArray.count do setNormal msh j normArray[j]
for j = 1 to faceArray.count do setTVFace msh j faceArray[j]

convertTo msh PolyMeshObject

fclose f
fclose s
)else(messagebox "ERROR!!\nFile Pair Wasn't Found")
)else(Print "Aborted.")

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Dec 17, 2011 4:02 pm
by demolos
Nice :)

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Fri Dec 23, 2011 12:59 pm
by EternaL
Also animations seem very well made.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Fri Jan 13, 2012 4:45 pm
by junk angel
out of curiosity, in what of the packfiles are the cc and gcmeshes? I've only found cpegs and gpegs for now.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jan 14, 2012 12:07 pm
by EternaL
Gibbed tool (unpack VPP) on characters.vpp_pc
Gibbed tool (unpack STR2) on "char".str2_pc

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jan 21, 2012 9:56 am
by junk angel
Hmm that's odd. That precisely doesn't give me the meshes.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Mon Jan 23, 2012 7:15 pm
by EternaL
Strange....

An example:

Dragging brianne.str2_pc on gibbed(str2) give me a directory named BRIANNE with 13 files :

1 of those is "brianne.ccmesh_pc"

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Fri Jul 20, 2012 8:58 pm
by junk angel
I know this is a bit of a necro, but have been wondering - any updates on this? Has anyone managed to get the UVW parsing into the script?

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Fri Jul 20, 2012 10:52 pm
by howfie
Yes. I have all character models extracted. The level geom which is in the glmesh files, I have yet to finish. Uvs are all half floats. Models are ps2 quality however.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jul 21, 2012 12:55 am
by rexil
They don't look that low poly.
Image

Relevant info here http://www.saintsrowmods.com/forum/inde ... 255/page-4
and
http://www.saintsrowmods.com/forum/inde ... rmat.1020/

More than a month since the last reply, dunno if they stopped working on it or what.

Maybe it can help you with something. Hope you can finish it SR3 models are pretty nice Imo.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jul 21, 2012 1:48 am
by howfie
Hahaha remember how disappointed with shaundi we were? I finally bought the game and all dlc except the genki cars and there was no hires shaundi to be found. The character models were no problem. Got all 2000 of them or so. But there are 90000+ static models and the control file is more complex for them than they are for the characters and spaceships lol. If anyone wants just a character release...

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jul 21, 2012 11:50 am
by junk angel
Yeah I noticed the vehicles seem to use a lot of vertex colouring. But a character script would be really really nice. Honestly I'd prefer it over a static mesh one :)

So your release would be apreciated.

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jul 21, 2012 7:31 pm
by Maxunit
"If anyone wants just a character release..."

Yep, I would love to have the model files from Shaundi :D I still had no luck in ripping them from SRTT :/

Re: Saint Row The Third 3d models [*.gcmesh_pc]

Posted: Sat Jul 21, 2012 8:50 pm
by howfie
ok i'll release soon. but yeah, in that pic viola doesn't look so bad... but... prepare to be disappointed LOL!

Image