Important information: this site is currently scheduled to go offline indefinitely by end of the year.

ccs file format... part 3

Post questions about game models here, or help out others!
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Forte wrote: Also, most of the bugs are fixed and the program will now extract every non-character/avatar/etc obj and every texture(although separately for now). (there was a problem with trailing zeros if the vertex count * 6 is not a multiple of 4, which messed up about everything)

'Fraid not. The textures DO seem to all dump properly. But some of the models are still not working.

For instance Sophora's weapon, W2DSWA3L will not produce an OBJ, however the texture does dump.

W2DGN00 's model is only the blade, previously it was only the gun, texture is ok.
W2DGN01 's model won't dump, texture is OK.

Also some models still have weird UV's, W22SW08 is one of them.

I'm beginning to think weapons aren't in any way uniform...
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Ok, I doubt it'll help much, but I have Endrance's model...

I extracted it from the Crystal.CCS... however that only gives me his geometry with no rigging... but I suppose it could be used to compare relative values...


I'm gonna look through the thread and try to understand the vertex format... it would be so much easier if it were in a document...


Also, the CCS format that .hack//Link uses is identical to the .tmp format of extracted CCS folders...

The extractor will work on static models just as it does for static GU models... however the extractor will not even touch IMOQ series files...

Hackstract will not work on Link's files as they are raw tmp files (despite being named .CCS).

That's all the progress I have for now... If I could see the source for Forte's extractor I might be able to attempt writing a converter for any information I find but as it stands I have no idea how to read a file byte by byte...

In any case I'm going to try completely relearning everything from scratch...

EDIT: Assuming GU uses single weighted vertexes (verts only weighted to one bone at a time)
The indices you think you have could be some format of this data...

The number of bones, the bones' IDs, the start of the vertexes offset, the number of vertexes per the bone with the name [ID].


So it would be:

#of bones
Starting offset of verts
Bone #1 (this would be defined with a name like nut00 or spine01 or something elsewhere)
# verts from the starting offset that are attached to bone #1
Bone #2
# verts from the starting offset that are attached to bone #2
etc.
Then the offset of the Verts starts here.

That's one possibility...


Wait wait... The bone weightings are separated into individual mdl chunks... characters' heads are separate from their torsos etc...

Anyway I'm looking for clues as to how the headers are read...
raz
ultra-n00b
Posts: 9
Joined: Wed Mar 31, 2010 1:29 pm
Has thanked: 3 times
Been thanked: 1 time

Re: ccs file format... part 3

Post by raz »

Anyone still have the ccs.pdf that Forte posted up some time ago? I can't no longer find it on the link he/she posted.

Also Forte, thanks for the ccs2obj, it works like a charm! :D
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

The contents of this post was deleted because of possible forum rules violation.
raz
ultra-n00b
Posts: 9
Joined: Wed Mar 31, 2010 1:29 pm
Has thanked: 3 times
Been thanked: 1 time

Re: ccs file format... part 3

Post by raz »

Hey Satoh!

Thanks once again! and no worries at least it's a starting point for me to learn. (trying to figure out on the image portion first) :)
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

in layman's terms, the texture portion is this, the CLUT(Color Look-Up Table, IE Palette).

The CLUT has a 28 byte header, starting with 0x00 04 CC CC every time. Some info in the header is known, but irrelevant for what I'm gonna tell you.

The color table is easy to spot usually, it most of the time starts with 3 random bytes followed by 0x80, that is the Red Green and Blue levels and the alpha (0x80 = 128, which is treated fully solid.) Most colors will end in 0x80...

the 16 color palettes will be 64 bytes long (not including the header), if there are more 4 byte values ending in 0x80 after that, it'll be a 256 color palette, and will be 1024 bytes + the header.

This is the at a glance version of the CLUT identification technique I use.

the image format itself I don't know right off, but generally they are recognizable by strings of single byte values that are the same or similar... and generally a lot of them in patches... (This is the data relating to colors on the palette. Each byte is one pixel in the image the values of the bytes refer to the number of the color in the CLUT... 01 would be the first color, 02 the second, etc etc... 00 is usually the control color which has the transparency if the image needs one.)

Hope that helps.
raz
ultra-n00b
Posts: 9
Joined: Wed Mar 31, 2010 1:29 pm
Has thanked: 3 times
Been thanked: 1 time

Re: ccs file format... part 3

Post by raz »

Yup it does, Thanks!

I noticed that Forte tool does not extract all the models in link tmp file, after some digging I noticed that it fails on the first model on xr2pai1.tmp @ 000031DBh which is a model/mesh chunk (assuming from the CCCC0800).

Perhaps link does not store some model/mesh the same way as other hack games? :ninja:

If you are interested, below is the link to the xr2pai1.tmp file
http://www.sendspace.com/file/zbe0i9
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Forte's converter does not support character models yet. XD

EDIT: fixed typo...

EDIT2: and sorry, Yes. The models in Link seem to be in the same format as GU's models.
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Code: Select all

Deleted, wrong, check newer posts...
If anyone has anything to add, I'm all for it...
Last edited by Satoh on Mon Apr 05, 2010 9:19 pm, edited 1 time in total.
raz
ultra-n00b
Posts: 9
Joined: Wed Mar 31, 2010 1:29 pm
Has thanked: 3 times
Been thanked: 1 time

Re: ccs file format... part 3

Post by raz »

Might not be related but I recently re-download Forte CCS2OBJ and there's a new ignore MDL option. 8D
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Does anyone have all of the backlogged files? Some of the versions could rip certain models that don't rip properly anymore.

I keep three versions currently, I have one from a few weeks back, one slightly later and one that's the newest... I wish I'd kept them all instead of overwriting them. Then I'd have maximum compatibility...Oh well...
On a side note, OBJ is a REALLY simple format... I could probably write one by hand...

The vertex coords are stored in CCS as 2 byte signed int's correct? that means... everything up to 32767, and down to -32767, right?

I'm considering trying to get geometry from some of these small MDL chunks I'm seeing in 2bcfz0... Oh, by the way, the average character model should have (give or take) 1500 triangles. (I got that my looking at the Endrance statue part of the Crystal.CCS rip... I found something in 2bcfz0 that seemed to be about 1700... I'm not certain if that's a full model or some random data... and I forgot where it was in the file... it may have been the CMP chunk... I should look into the CMP chunks of some weapon models...

Ok, here is what I know so far... (Not including CCS PDF Info)

Code: Select all

2bcfz0's 0x00001CC0 0008CCCC MDL Chunk
[0xNumbers in braces] indicate Hexadecimal offsets, or the values stored at those offsets.
0xNumbers out of braces are actual hexadecimal values

MDL Chunk Definitions:
Assuming this chunk starts at [0x0]

[0x0] 4 bytes, title	CCCC0800 (0x0008CCCC)
[0x4] 4 bytes, #*4 = size of chunk starting from 0x8	(0x39, 57)
[0x8] 4 bytes, # = Chunk ID Number	(0x43, 67)

[0x24] 4(2?) bytes, # = number of vertices	(0x08, 8)
[0x28] 4 bytes, #*4 = size of block starting at [0x4]'s data	(0x90, 144)
[0x2C] start of Vertex pool... Length of vertex pool is [0x24]*6 (=0x30, 48)
[0xEnd of Vertex Pool](0x5C) Start of Connection Pool... Length is the rest of the Chunk


Vertex Pool Block definitions:
Assuming the start of each vertex is [0x0]...

[0x0] 2 bytes, X coord
[0x2] 2 bytes, Z coord
[0x4] 2 bytes, Y coord

(This is correct as this game uses Z-Y transposition coordinate system, common in many PS2 era games)

Connection Pool Block definitions:
Assuming the start of each connection is [0x0]...

[0x0] 2 bytes, index of vertex. Ranges from 0x0 to 0xThe number of vertices-1 (0x0-0x7 in this case)
[0x2] Connection type.


??? Chunk Definitions:
Theory, Bounding box?

[0x0] 4 bytes, title	CCCC2300 (0x0023CCCC)
[0x4] 4 bytes, #*2 = size to end of block from 0xC? 
[0x8] 4 bytes, Chunk ID
[0xC] Start of...? Looks like a Vertex pool... Possibly the Bone Pool...	(ends at 0x38) 
[0xEnd of ??? Pool] Another familiar pool, looks like a Connection Pool...	(ends at end of chunk)

CMP Chunk Definitions:
Theory - CMP is the definition for the Skeleton of the model...
Assuming this chunk starts at [0x0]

[0x0] 4 bytes, Name, CCCC0900	(0x0009CCCC)
[0x4] 4 bytes, #*4 = size of chunk from [0x8]
[0x8] 4 bytes, Chunk-belongs-to ID
[0xC] Start of ??? connection pool
[0xEnd of pool] Start of ??? Vertex? pool...

[s]Ok wait... every model has a CMP... so maybe CMP is the UV data and it just isn't documented...? I'm confused! Forte! Where did you get the UV data!?[/s]
Found it... it's in the MAT... duh...

ok, ANM header is CCCC0A00, and I think that's for effect animation. Weapon models (which seem to contain things for effects) have many of these... CCS.PDF has CCCC0700 as an ANM header, this is likely for skeletal animation...

Chunks labeled with dummy in the name are most likely placeholders so that different animations can be linked to those names...



I should note that I'm not posting this because I'm researching Animations or such, I'm merely noticing things and making sure it's documented somewhere, this just happens to be the best place, as my files could get lost, but the forum will still have the info.
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

Ok, I'm thoroughly stumped, frustrated, and otherwise not happy at all with this CCS format...

I managed to bash my head on the keyboard enough to write a crude file converter only to discover that I know absolutely nothing that I thought I knew...

For instance, I don't have clue #1 how to find the offset that writes out the actual polygons that belong to the vertices...

I had assumed it would be directly after the vertex pool like in static model files, but apparently there is something else going on...

I managed to dump a few of the shadow body parts from the GU and IMOQ character models, but the rest of the models are complete nonsense to me...

Anyone care to post their documentation?
Seraphil
ultra-n00b
Posts: 3
Joined: Thu Apr 01, 2010 7:44 pm

Re: ccs file format... part 3

Post by Seraphil »

Images are available? If yes, could you post them, please?
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: ccs file format... part 3

Post by Satoh »

They're literally just wonky cubes... Not worth looking at...

I you want something to be impressed by, download Forte's CCS2OBJ and use it on any of the non-character models...
raz
ultra-n00b
Posts: 9
Joined: Wed Mar 31, 2010 1:29 pm
Has thanked: 3 times
Been thanked: 1 time

Re: ccs file format... part 3

Post by raz »

Can't the sequential vertices form up a triangle in which 2 triangle form up a polygon?

Actually I am not sure what I am saying here, is there any trailing values right after the vertices data?
the character model do seem to have a different way if storing the 3d model [I am assuming due to other information like animation?] comparing to the normal models.

I am/had been trying to figure out the character model by comparing it with normal model data to see if something strikes out. If something does, then perhaps by skipping that values/bytes we would be able to export out the character model (without the extra animation/bone/linking/etc).

All that I know right now is character model is also broken into parts face/body/weapon instead of a single model file.
Post Reply