Thanks for still looking into this matefatduck wrote:Since I do not like this game/model. It is hard for me to look deep into it.
need help with DK2 models
Re: need help with DK2 models
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
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
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
Yes i know, seems the only way to find out a compression algorithm is disassemble dkii.exe and trace it
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
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).
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
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
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.
But IIRC it didn't break. Maybe they pass the compressed texture to the graphics pipeline.
Re: need help with DK2 models
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?
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
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.
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
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
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
