OpenKeeper
OpenKeeper copied to clipboard
Figure out the material flags
Figure out the material flags. KMF material has some interesting information about the material applying, however we don't understand it. Might not be an easy task.
/edit by ufdada: See Material.java
| Value | Description/Guess |
|---|---|
| UNKNOWN2(0x0002) | Some sort of shininess |
| UNKNOWN4(0x0008) | |
| UNKNOWN5(0x0010) | |
| UNKNOWN6(0x0020) | |
| UNKNOWN7(0x0040) | |
| UNKNOWN8(0x0080) | Some sort of glow |
| UNKNOWN9(0x0100) | Environment mapped, invisible guys have this |
How about this: modify original kmf's, try out different bit combinations and run dk2 to see what the difference.
That is probably doable. But would require repacking the WAD archive. I'm not sure if we are able to pull that off. Especially if the archive is compressed.
I've found interesting note here : http://keeper.lubiki.pl/html/dk2_tools_extrct.php (DK2 Official WAD Tool): "... It is possible to have DK2 load the files individually rather than from the WAD files by using the command line switches '-enablefilepatching' and '-enableartpatching'." Although I have not tested this feature.
Then it would be doable. We don't have the specific byte locations in the code, but it should be easy enough to follow the structure to find the material flags. And we do have the possible values already, although marked as unknown.
No need to repackage the WAD files. If the game folder contains the unpacked files, the game takes them
As @belgianguy made the list of flags, we can (for some) quite easily compare what the flags do to the material. We just need some shader knowledge, I'll doubt the JMEs Lightning material can replicate the effects :) We can try and/or modernize effects also.
Main menu light beams is a good playground for example.
Maybe somebody could try the DirectX PIX tool to see if we can find out anything?
https://www.youtube.com/watch?v=dNwAq_2rvJ0 https://www.youtube.com/watch?v=-3PISvNTeB0
PIX seems to be too new, perhaps we'll have more luck with: http://graphics.stanford.edu/~mdfisher/D3D9Interceptor.html https://github.com/apitrace/apitrace
I'm on Linux, sadly, so I'm unable to.