Page 1 of 1

Voyage Century online

Posted: Tue Feb 07, 2012 7:06 am
by finale00
The contents of this post was deleted because of possible forum rules violation.

Re: Voyage Century online

Posted: Tue Feb 07, 2012 7:35 am
by finale00
All strings are null-terminated. I call it "string" type in the format.

EDIT: Found the number of faces per face group. It's stored with the material info. Or whatever the struct it. I guess you can call it "face group info". Just store it somewhere and then retrieve it when you're ready to parse the index buffers.

EDIT2: there goes another struct. Looks like there are matrices in unkStruct2.

EDIT3: vertices appear to be 36 bytes long. Or at least, one type anyways. And it's taking shape. Some of the faces are wrong though. I've added the script to my dropbox.

Image

Code: Select all


struct unkStruct1 {
   dword number
   52 bytes
}

struct unkStruct2 {
   108 bytes
}

struct materialInfo {
   dword[3]
   float[4]
   dword 
   dword numFaces
   dword[5]
   float[11]
   dword
}

struct Vertex {
   float[3] vx, vy, vz
   float[3] nx, ny, nz
   byte[4] ?
   float[2] tu, tv
}

##File Start##
   
char[4] idstring "50.1"
dword meshType (0, 2)
dword 
dword numStrings
dword count1
dword numMat
dword 
dword
dword count2
dword numFaceGroups
dword total indices
dword
float[3]

string[numStrings] bunch of strings related to material and textures..
dword[numStrings] ??
dword[count1] ??
numMat unkStruct1
count2 unkStruct2
numFaceGroups material_info

numFaceGroups {
   word[numIdx*2] indices **
}

dword vertType #0 == vertSize 36 bytes, 1 == 44 bytes
dword sectionSize #numVerts = sectionSize / vertSize
numVerts Vertex

#more

Re: Voyage Century online

Posted: Tue Feb 07, 2012 8:32 am
by CriticalError
nice work finale, I added to my queue list, I have to much clients you posted for test so well, I think can test it soon as posible, thanks for support again.

Re: Voyage Century online

Posted: Tue Feb 07, 2012 8:40 am
by finale00
Found the vertType.

It is the integer right before the sectionSize for the vert section.

type 0 == 36 bytes, type 1 == 44 bytes.
Might be more. All weapons are loaded now though I am still running into the same problem with the faces (some are wrong)

No textures atm cause I don't know how the materials work.

Image

EDIT: vertType 4 has 44 bytes as well, but the vertex struct is different.

Code: Select all

float[3] vx, vy, vz
float ?
dword ?
float[3] nx, ny, nz
byte[4] ?
float[2] tu, tv
EDIT: vertType 5 has 52 bytes.

Code: Select all

float[3] vx, vy, vz
float ?
dword ?
float[3] nx, ny, nz
byte[4] ?
float[2]
float[2]
And right after finding that, it looks like some faces are unwinded in a different order.
I don't know where the flag is but it's probably stored with the face info.