Killer Instinct .kimesh / .kihkx

Post questions about game models here, or help out others!
Post Reply
User avatar
TFA
beginner
Posts: 25
Joined: Sat Feb 27, 2016 12:41 am
Has thanked: 6 times
Been thanked: 1 time

Killer Instinct .kimesh / .kihkx

Post by TFA » Tue Apr 12, 2016 5:22 pm

I'm not extracting for people anymore.

So, chrrox from the Game Archives forum was able to make a pretty awesome unpacker script for the latest Killer Instinct. However, as one might expect, all of the file formats are proprietary. Here's what I've been able to gather so far:
  • Almost all files seem to be prefixed with .ki besides the .xml files, which are standardized.
  • File endings are mostly self explanatory, with the exception of files with the extension ".48" and ".51"
  • In the characters/charactername/ folder, there are textures, materials, meshes, and all relevant data.
  • ".kimat" contain the shader parameters, while ".kitex" contains some form of texture.
  • As I understand, .kitex aren't simply renamed .dds files, as I noticed an internal path while briefly scrolling through with a hex file. However, due to the file sizes, I'm assuming they have a standard DXT compression scheme. I'm still very amateur, so I may be wrong about both of those.
  • Interestingly, some textures are suffixed as _fresnel or _fresnel_variation_2. Might these be cubemaps?
  • ".kimesh" presumably contain the mesh data, and I'm assuming that ".kihkx" is some form of Havok skeleton file. It may also contain animations.
Sample data (meshes+textures) here: https://r.kyaa.sg/clnjfl.zip

Fully tested working characters:
Aganos
Fullgore
Gauze

List of currently known broken meshes:

aria_acc00_area_c (No UVs)
aria_acc01_area_a (Broken UVs)
aria_acc01_area_b (Broken UVs on one submesh)
aria_acc01_area_c (Broken UVs on one submesh)
aria_acc02_area_a (Broken UVs on one submesh)
aria_acc02_area_b (Broken UVs on one submesh)
aria_acc03_area_a (Broken UVs on one submesh)
aria_acc03_area_b (Broken UVs )
aria_acc03_area_c (Broken UVs )
aria_acc03_area_c (Broken UVs )
cinder_acc00_area_a (Broken UVs on one submesh)
cinder_acc00_area_c (Broken UVs on one submesh)
cinder_acc01_area_a (Broken UVs on one submesh)
cinder_acc01_area_c (Broken UVs on one submesh)
cinder_acc02_area_a (Broken UVs on one submesh)
cinder_acc02_area_c (Broken UVs on one submesh)
cinder_acc03_area_a (Broken UVs on one submesh)
cinder_acc03_area_c (Broken UVs on one submesh)
Last edited by TFA on Sun May 08, 2016 5:05 pm, edited 6 times in total.

User avatar
TaylorMouse
ultra-veteran
ultra-veteran
Posts: 335
Joined: Mon Sep 26, 2011 12:51 pm
Has thanked: 11 times
Been thanked: 81 times

Re: Killer Instinct .kimesh / .kihkx

Post by TaylorMouse » Tue Apr 12, 2016 8:50 pm

So what is in the zip file? -> ok it is black orchid :)

Did you check if the texture has an atlas header?

T.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: Killer Instinct .kimesh / .kihkx

Post by shakotay2 » Tue Apr 12, 2016 9:59 pm

Point cloud of kimesh is promising:
orchid_kimesh.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

SergeantJoe
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 30, 2013 5:39 am
Has thanked: 56 times
Been thanked: 20 times

Re: Killer Instinct .kimesh / .kihkx

Post by SergeantJoe » Wed Apr 13, 2016 1:58 am

You're in luck, kihkx is 100% normal HKX file.

However, AssetCC gives us this:

Code: Select all

Binary Packfile has the wrong endiannes or pointer size. Predicates won't be read.
This is probably because this game uses some crazy version called hk_2014.2.5-r1, while the only 2014 tools available are hk_2014.1.0-r1.

I can probably mess around with it some more but I'm still busy trying to fix 2011 files from SD.

luxox18
mega-veteran
mega-veteran
Posts: 176
Joined: Fri Jul 29, 2011 9:18 pm
Has thanked: 54 times
Been thanked: 42 times

Re: Killer Instinct .kimesh / .kihkx

Post by luxox18 » Wed Apr 13, 2016 5:44 am

Here is the first sub-mesh (if it helps to understand the format)
You do not have the required permissions to view the files attached to this post.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: Killer Instinct .kimesh / .kihkx

Post by shakotay2 » Wed Apr 13, 2016 4:42 pm

luxox18 wrote:(if it helps to understand the format)
thx - the problem is to find the start of the next submesh.
If you set the face indices count to 2001 you'll see what I mean.
(1848 seems to be the correct value for the first submesh , without misfitting faces)

Dunno if there's a problem with hex2obj, I calculated the next addresses (just leaving the FI count as it was) and it works (one face missing, so 1854 is correct here):
orchid_2nd3rdSM.jpg
edit: did the same for the 3rd SM but it's a tedious task.
(There are magic tables with 1842 and 1860, which are -6 and +6 off, so I'm a little bit confused.)
That would mean the FI's startaddress of the 2nd SM to be 0x5028 with a count of 1860.
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
TFA
beginner
Posts: 25
Joined: Sat Feb 27, 2016 12:41 am
Has thanked: 6 times
Been thanked: 1 time

Re: Killer Instinct .kimesh / .kihkx

Post by TFA » Wed Apr 13, 2016 8:34 pm

I'd like to dive into this and start participating too. I've got Hex Workshop and some motivation, so where should I start?

Szkaradek123
mega-veteran
mega-veteran
Posts: 293
Joined: Wed May 05, 2010 8:21 pm
Location: Poland Głogów
Has thanked: 21 times
Been thanked: 619 times

Re: Killer Instinct .kimesh / .kihkx

Post by Szkaradek123 » Thu Apr 14, 2016 4:15 pm

Hi

About orchid.kimesh

Code: Select all

offset 0	(1, 21, 3280, 6, 16, 204, 18, 48, 0, 1248, 0, 1504, 0, 3136, 0)


-- infolist of streams

offset 60	(0, 12048, 0, 16, 22, 185, 0, 0, 528, 0, 0, 0, 225780, 838452, 112890, 46810, 0, 0, 0, 0)
offset 140	(12048, 1496, 0, 16, 4, 19, 0, 0, 1056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
offset 220	(13544, 225780, 35, 16, 1, 0, 0, 0, 1152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - offset+3280+12,size for indice stream
offset 300	(239324, 468100, 40, 128, 1, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - offset+3280+12,size for vertice stream
offset 380	(707424, 370352, 40, 128, 1, 0, 0, 0, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - offset+3280+12,size for skinweighting stream
offset 460	(1077776, 2112, 128, 16, 1, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

-- infolist of meshes

offset 4804	(270816218, 270816218, 0, 0, 1776, 0 - indice ID start from indicestream, 614, 450 - vertex count, 2, 0, 1842 - indice count, 614, 0, 0, 0, 0, 0, 0, 0, 0)
offset 5236	(270816218, 270816218, 0, 0, 1776, 1842, 620, 362, 2, 0, 1860, 620, 0, 0, 0, 0, 0, 0, 0, 0)
offset 5668	(270816218, 270816218, 0, 0, 1776, 3702, 3590, 2316, 2, 0, 10770, 3590, 0, 0, 0, 0, 0, 0, 0, 0)
offset 6100	(270816218, 270816218, 0, 0, 1776, 14472, 7533, 5318, 2, 0, 22599, 7533, 0, 0, 0, 0, 0, 0, 0, 0)
offset 6532	(270816218, 270816218, 0, 0, 1776, 37071, 12, 12, 2, 0, 36, 12, 0, 0, 0, 0, 0, 0, 0, 0)
offset 6964	(270816218, 270816218, 0, 0, 1776, 37107, 13681, 8086, 2, 0, 41043, 13681, 0, 0, 0, 0, 0, 0, 0, 0)
offset 7396	(270816218, 270816218, 0, 0, 1776, 109278, 592, 380, 2, 0, 1776, 592, 0, 0, 0, 0, 0, 0, 0, 0)
offset 7828	(270816218, 270816218, 0, 0, 1584, 78150, 612, 326, 2, 0, 1836, 612, 0, 0, 0, 0, 0, 0, 0, 0)
offset 8260	(270816218, 270816218, 0, 0, 1776, 79986, 5247, 3270, 2, 0, 15741, 5247, 0, 0, 0, 0, 0, 0, 0, 0)
offset 8692	(270816218, 270816218, 0, 0, 1552, 111054, 612, 326, 2, 0, 1836, 612, 0, 0, 0, 0, 0, 0, 0, 0)
offset 9124	(270816218, 270816218, 0, 0, 1776, 95727, 4517, 2559, 2, 0, 13551, 4517, 0, 0, 0, 0, 0, 0, 0, 0)

-- infolist of vertice streams 

offset 14452	(20-stride, 0-first vertex offset in vertex stream, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14532	(20, 9000, 0, 0, 0, 0, 0, 0, 0, 0, 16, 7200, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14612	(20, 16240, 0, 0, 0, 0, 0, 0, 0, 0, 16, 12992, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14692	(20, 62560, 0, 0, 0, 0, 0, 0, 0, 0, 16, 50048, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14772	(20, 168920, 0, 0, 0, 0, 0, 0, 0, 0, 16, 135136, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14852	(20, 169160, 0, 0, 0, 0, 0, 0, 0, 0, 16, 135328, 0, 0, 0, 0, 0, 0, 0, 0)
offset 14932	(20, 453980, 0, 0, 0, 0, 0, 0, 0, 0, 12, 363184, 0, 0, 0, 0, 0, 0, 0, 0)
offset 15012	(20, 330880, 0, 0, 0, 0, 0, 0, 0, 0, 8, 264704, 0, 0, 0, 0, 0, 0, 0, 0)
offset 15092	(20, 337400, 0, 0, 0, 0, 0, 0, 0, 0, 16, 269920, 0, 0, 0, 0, 0, 0, 0, 0)
offset 15172	(20, 461580, 0, 0, 0, 0, 0, 0, 0, 0, 8, 367744, 0, 0, 0, 0, 0, 0, 0, 0)
offset 15252	(20, 402800, 0, 0, 0, 0, 0, 0, 0, 0, 16, 322240, 0, 0, 0, 0, 0, 0, 0, 0)

offset 15332	(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

-- used images and mesh names

offset 15404	characters/orchid/orchid
offset 15429	characters/orchid/blank_orchid_metal
offset 15466	characters/orchid/blank_orchid_skin
offset 15502	characters/orchid/blank_orchid_cloth
offset 15539	characters/orchid/blank_orchid_fullbright
offset 15581	characters/orchid/blank_orchid_eyelashes
offset 15622	characters/orchid/blank_orchid_eye
offset 15657	characters/orchid/retro/orchid_eye_ao_cover
offset 15701	characters/orchid/blank_orchid_face
offset 15737	orchid_mesh_dogtag
offset 15756	__CombinedMesh__
offset 15773	__CombinedMesh__

-- materials ???

offset 15792	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15824	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15856	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15888	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15920	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15952	(0, 0, 8, 0, 0, 0, 0, 0)
offset 15984	(0, 0, 8, 0, 0, 0, 0, 0)
offset 16016	(0, 0, 7, 0, 0, 0, 0, 0)
offset 16048	(0, 0, 8, 0, 0, 0, 0, 0)
offset 16080	(0, 0, 7, 0, 0, 0, 0, 0)
offset 16112	(0, 0, 8, 0, 0, 0, 0, 0)

offset 16144	(0,)

-- which ID image use material ????

offset 16148	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16212	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16276	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16340	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16404	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16468	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16532	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 18, 5, 11, 6, 17)
offset 16596	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 18, 5, 17)
offset 16652	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
offset 16716	(0, 0, 2, 6, 7, 11, 1, 11, 0, 1, 4, 18, 5, 17)
offset 16772	(0, 0, 2, 6, 7, 11, 8, 11, 0, 1, 4, 5, 5, 11, 6, 17)
You do not have the required permissions to view the files attached to this post.

User avatar
TFA
beginner
Posts: 25
Joined: Sat Feb 27, 2016 12:41 am
Has thanked: 6 times
Been thanked: 1 time

Re: Killer Instinct .kimesh / .kihkx

Post by TFA » Thu Apr 14, 2016 4:50 pm

Huge thanks to everyone for their work so far. I figure a couple more meshes might be useful for identifying a standard, so I've taken the liberty of uploading one from each game season: https://r.kyaa.sg/wqjscv.zip

User avatar
zaramot
double-veteran
double-veteran
Posts: 767
Joined: Wed Jan 05, 2011 12:41 pm
Has thanked: 39 times
Been thanked: 818 times

Re: Killer Instinct .kimesh / .kihkx

Post by zaramot » Fri Apr 15, 2016 3:04 pm

Hey Szkaradek123! :) I see you made great progress with Killer Instinct, are you going to finish it? I'm thinking to pick this game and try to solve model - import part, though if you're working on it I will pass over, you will do this better than me :)
Making model-import scripts, PM

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: Killer Instinct .kimesh / .kihkx

Post by shakotay2 » Sat Apr 16, 2016 8:17 am

zaramot wrote:Hey Szkaradek123! :) [...] you will do this better than me :)
better than everyone, I guess... :D
shakotay2 wrote:Dunno if there's a problem with hex2obj
nope, it's just relative face indices, so you can't "merge" two adjacent submeshes with hex2obj

But I'm still having a problem with SM7 (..SM10):
orchid_submeshes.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
zaramot
double-veteran
double-veteran
Posts: 767
Joined: Wed Jan 05, 2011 12:41 pm
Has thanked: 39 times
Been thanked: 818 times

Re: Killer Instinct .kimesh / .kihkx

Post by zaramot » Sat Apr 16, 2016 11:24 am

Cool, you're missing one array of values for correct vertex-stream offsets. Okay guys, I'm going to finish this one, so please if someone working on it or maybe in a "finish" state for import script/plugin. Write few words here, just don't want to waste some time, if anyone already doing this :) I don't mind if anyone pick this up, I might switch to DOOM or any other game xD

Image

File Aria.kimesh

Image
Making model-import scripts, PM

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: Killer Instinct .kimesh / .kihkx

Post by shakotay2 » Sat Apr 16, 2016 6:05 pm

zaramot wrote:Cool, you're missing one array of values for correct vertex-stream offsets.
yep - I was in the hope to solve it without that vertex info list but for some unknown reason those nasty developer guys mixed the (address) order like this: 0,1,2,3,4,5, 9,6,7,10,8 so I've surrendered the idea of making a tutorial for it because my C code is very ugly now. :cry:
orchid_SM8.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
zaramot
double-veteran
double-veteran
Posts: 767
Joined: Wed Jan 05, 2011 12:41 pm
Has thanked: 39 times
Been thanked: 818 times

Re: Killer Instinct .kimesh / .kihkx

Post by zaramot » Sat Apr 16, 2016 10:43 pm

Yeah, what a nasty developers :( Though, I've met even more crazy things in 3d formats unfortunately, why they not making things easy xD? We just want models! :) BTW, I want to ask topic creator for more .kimesh samples, all .kimeshes he provided importing fine with my correct "alpha" script, but I want to try more.

judge.kimesh

Image
Making model-import scripts, PM

User avatar
TFA
beginner
Posts: 25
Joined: Sat Feb 27, 2016 12:41 am
Has thanked: 6 times
Been thanked: 1 time

Re: Killer Instinct .kimesh / .kihkx

Post by TFA » Sun Apr 17, 2016 1:12 am

I took the liberty of uploading every character-related .kimesh from the game: http://www.filedropper.com/meshpak
If that's too large, I can upload just the character models. The archive I uploaded includes cosmetics and other bits and bobs.

Post Reply