Page 6 of 7 FirstFirst ... 4 5 6 7 LastLast
Results 51 to 60 of 70

Thread: DK2 texture format

  
  1. #51
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: DK2 texture format

    Yep, though I don't know if werkt has already worked on making the code clearer.

  2. #52

    Default Re: DK2 texture format

    Further experimentation reveals that, while DK2 will preferentially load textures from the texture cache, if (and ONLY if) an entry for any of the mipmaps of, say, Bar_Table is not present in the texture cache, it will attempt to load Data\EngineTextures\Bar_Table.png instead. I'm writing a small program to disable texture cache entries that have counterparts on disk; this should make life easier for texture pack creators.

    Edit: I finished the program, and did further testing... unfortunately, this method cannot be used to add higher-resolution textures; attempting to substitute a higher-resolution texture results in a crash.

    DK2Recache.zip

    Feel free to mirror it, bundle it, whatever. You will have to run it once every time you add or remove a "patch" texture. I can also polish and release the program I used to extract the original textures... I'm afraid that without higher-resolution texture support, there's not a real reason to do more than that. There is still a non-zero possibility that one can add higher-resolution textures by editing the texture cache directly.

    P.S. I did try using the undocumented(?) -highrestextures flag, to no avail.
    Last edited by Solra Bizna; October 28th, 2012 at 03:30.

  3. #53
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: DK2 texture format

    I think the code actually checks the texture size, so it needs to be modified as well.

  4. #54

    Default Re: DK2 texture format

    I can say with confidence that you won't be able to just bump up the texture size - there are a number of functions that validate images and provide buffers in the 16-128 texels per dimension range. The mipmap system is actually built around this: the mipmaps are each a power of 2 reduction in texels, with the max of 128 always at MM0, 64 at MM1, 32 at MM2, and 16 at MM3. There are some indications that the mipmap material structure has a 3 bit storage for the mipmaps (up to a max of MM7), so if you just manage to find all of the 0x80 references and patch them, the engine may be able to load 2048 x 2048 8 level mipmapped textures from EngineTextures.dat, though I've not managed to find how the engine handles non-DK2TextureCache mipmaps, i.e. the png load.

  5. #55

    Default Re: DK2 texture format

    Sorry to revive this old thread but I would love to contribute making HD textures for DK2 but I don't know if you have finally successfuly get a way to do this...

  6. #56
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: DK2 texture format

    It's unlikely that this ever happens as it requires a lot of work.
    And even if, you would still have the crappy models that are a lot harder and use vertex animations.

  7. #57
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: DK2 texture format

    Yeah has anyone progressed on this?

  8. #58
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: DK2 texture format

    I looked at the code and cleaned it up a bit but not really much.

  9. #59

    Default Re: DK2 texture format

    Good afternoon. share program to unzip the file with textures.

    I would appreciate.
    Last edited by Oleg Kramarenko; April 22nd, 2014 at 08:08.

  10. #60
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: DK2 texture format

    @Trass3r or anyone, can you share the cleaned up code please? Werkt has shared some code, but requires some hacking of the EXE file that I rather not do. It would really help our project https://github.com/tonihele/OpenDungeonKeeper. The reversal is otherwise progressing quite well, thanks to you guys.

    Also on the side note if you have any information about the other formats. What we still have to figure out are the camera KCS files. We can read them, but we don't exactly understand them. Simple enough to try to get to work when we have proper 3D scenes maybe...

Similar Threads

  1. Best dk2 AI!!!
    By blragh in forum Dungeon Keeper 2
    Replies: 49
    Last Post: November 27th, 2010, 12:26
  2. Dk1 vs dk2
    By dk2player in forum Off Topic
    Replies: 34
    Last Post: October 6th, 2009, 17:43
  3. A complete guide: How to play DK2 multiplayer
    By Ðârk Âñgêl in forum DK2 Multiplayer
    Replies: 0
    Last Post: September 1st, 2009, 15:55

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •