Page 1 of 1

Changchun/W3KSEA KFM files

Posted: Wed Jun 02, 2010 11:28 pm
by Yelü Dashi
I've managed to convert the texture files from this Asian MMO, as explained here but I having problems with model files, the folder contain what I think are compressed KFMs. When opening with Nifskope I get ""failed to load kfm file (33554443)""(asume this is an invalid header due to compression ? ). Here's an example of one KFM file if someone wouldn't mind having a look.

Quite new to this all this, it was first time using a BMS script today to batch convert the textures, and it worked :] So I hope the models can also be accessed :) Any pointers would be most appreciated.

Re: Changchun/W3KSEA KFM files

Posted: Mon Jun 14, 2010 12:07 am
by Yelü Dashi
Anyone willing to help me out in this one ?

Cheers.

Re: Changchun/W3KSEA KFM files

Posted: Mon Jun 14, 2010 1:57 am
by chrrox
its not compressed and its not a nif file they must just use the same extension it looks like a plain model file common in pc mmo's

Re: Changchun/W3KSEA KFM files

Posted: Sun Jul 10, 2011 5:29 pm
by finale00
Started with the easy stuff:

Image Image

I've gotten the items that have bones and items that don't have bones.
The material section confuses me, and the bone section I don't know much about.

Code: Select all

dword magic
dword ???
dword ??? (always E8 03 00 00 so far)
dword numBones
dword unk4 (maybe bones related)
dword numMeshes
dword total verts
dword total faces
float_12 ??? (just skipping it)
char_28 model name (read bytes until null, then skip the leftover bytes)
dword ???
float ???
dword ???
dword ???

numBones bone {
   172 bytes
}

numMesh material {
   44 bytes
   Get name by reading bytes until you get a null byte, then just skip the other bytes to the next section
}

numMesh mesh {
   dword numVerts
   dword numFaces

   numVerts vertex {
      float_3 coords
      float_3 normals?
      float_4 ???
      float_2 uv
      float_6 ???
   }

   numFaces face {
      short_3 face indices
   }
}
dword_2 ???
EDIT: revised. seems to work for all models and it covers the entire file, so now just need to fill in the unknowns.

Note: the materials are stored in the same order that the meshes appear, so mat1 = mesh1, mat2 = mesh2, etc. Just pass the mesh# when assigning material.

Note: Need a better way to deal with names, because right now I'm just skipping important information lol

Some samples attached:

Re: Changchun/W3KSEA KFM files

Posted: Thu Jul 21, 2011 8:09 pm
by Yelü Dashi
Wow - took a while but it's awesome that you've cracked it. What else needs to be sorted ?