need help with DK2 models

Post questions about game models here, or help out others!
Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Post by Rheini » Mon Jan 14, 2008 11:50 am

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 :)

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: need help with DK2 models

Post by Rheini » Thu Jun 19, 2008 4:09 pm

any updates here?

alariq
ultra-n00b
Posts: 4
Joined: Sat Nov 22, 2008 4:04 pm

Re: need help with DK2 models

Post by alariq » Sat Nov 22, 2008 4:36 pm

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

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: need help with DK2 models

Post by Rheini » Sat Nov 22, 2008 8:13 pm

Unfortunately I can't provide you with texture samples cause they use an unknown compression: viewtopic.php?f=18&t=2580

alariq
ultra-n00b
Posts: 4
Joined: Sat Nov 22, 2008 4:04 pm

Re: need help with DK2 models

Post by alariq » Fri Nov 28, 2008 9:51 am

Yes i know, seems the only way to find out a compression algorithm is disassemble dkii.exe and trace it :oops: any considerations?

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: need help with DK2 models

Post by Rheini » Fri Nov 28, 2008 10:52 am

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).

alariq
ultra-n00b
Posts: 4
Joined: Sat Nov 22, 2008 4:04 pm

Re: need help with DK2 models

Post by alariq » Fri Nov 28, 2008 11:22 am

Can you tell me from what did you started? Some gudelines :) i also want to try, who knows

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: need help with DK2 models

Post by Rheini » Fri Nov 28, 2008 12:08 pm

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.

alariq
ultra-n00b
Posts: 4
Joined: Sat Nov 22, 2008 4:04 pm

Re: need help with DK2 models

Post by alariq » Fri Nov 28, 2008 1:11 pm

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?

Rheini
Moderator
Posts: 653
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 40 times
Contact:

Re: need help with DK2 models

Post by Rheini » Fri Nov 28, 2008 1:19 pm

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.

dedesite
ultra-n00b
Posts: 5
Joined: Fri Apr 16, 2010 11:47 pm

Re: need help with DK2 models

Post by dedesite » Mon Apr 26, 2010 7:02 pm

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

Post Reply