Page 2 of 2
Posted: Mon Jan 14, 2008 11:50 am
by Rheini
fatduck wrote:Since I do not like this game/model. It is hard for me to look deep into it.
Thanks for still looking into this mate

Re: need help with DK2 models
Posted: Thu Jun 19, 2008 4:09 pm
by Rheini
any updates here?
Re: need help with DK2 models
Posted: Sat Nov 22, 2008 4:36 pm
by alariq
texture coordinates can be extraced as follows:
x = (UV >>16)/float(1<<16);
y = (0x0000FFFF & UV)/float(1<<16);
X and Y could be swapped, i cannot check what is correct because do not have texture
Re: need help with DK2 models
Posted: Sat Nov 22, 2008 8:13 pm
by Rheini
Unfortunately I can't provide you with texture samples cause they use an unknown compression:
viewtopic.php?f=18&t=2580
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 9:51 am
by alariq
Yes i know, seems the only way to find out a compression algorithm is disassemble dkii.exe and trace it

any considerations?
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 10:52 am
by Rheini
Of course I already tried that, but it's hard to find the algorithm. Haven't had any luck yet.
Maybe I'll give it another try when I have my 2nd monitor (if I ever manage to buy a new one).
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 11:22 am
by alariq
Can you tell me from what did you started? Some gudelines

i also want to try, who knows
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 12:08 pm
by Rheini
Not sure, but since there is no magic ID, I probably set a breakpoint on CreateFile and ReadFile trying to get to the memory address where the texture data resides. Then I set a "breakpoint on access" on the data.
But IIRC it didn't break. Maybe they pass the compressed texture to the graphics pipeline.
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 1:11 pm
by alariq
aha same as i expected but you know if they pass it compressed to grafic pipeline this is even better

this way we can find out texture format,
i'll try to see when i'll have some thime
btw, what debugger did you use?
Re: need help with DK2 models
Posted: Fri Nov 28, 2008 1:19 pm
by Rheini
Good old OllyDbg

And sometimes I use IDA for disassembling, but I'm not very experienced in using this tool. Thus I only use basic functions, mainly the graphical view.
Re: need help with DK2 models
Posted: Mon Apr 26, 2010 7:02 pm
by dedesite
Hi,
I try to load .kmf model into .mesh ogre3d files. I successfully manage to read the vertices and normals seems fine, but I don't know where are the uvs.
Fatduck says it's in Vertex Data struct but I think these structure is for Normals and faces index as Rheini found.
Does someone knows how to read uvs?
Greetings,
Andréas