Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 36

Thread: Reversal of DKII Binary File Formats

  
  1. #21

    Default Re: Reversal of DKII Binary File Formats

    Quote Originally Posted by tonihele View Post
    When you say variant, what is the difference? Or could I just use the TQI format extraction?
    Family/work induced obligatory delay here. There are minor differences in how the composition happens per-8x8 block that I have not properly decomposed - the TQI and compressed extraction routines share similar looking code routes, but are completely different sections of the executables. I will be trying sometime soon to extract each in their own vacuum in deference to the ffmpeg routines to figure out how to properly answer "what's different?"

  2. #22
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    I'll be happiest if you could provide me with a ready code snipplet

  3. #23
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Question Re: Reversal of DKII Binary File Formats

    About them ANIMATIONs in KMF's. My animation models look like car wrecks, not in anyway recognizable. I think it is due to the vertice coordinates. I understood that if I read a data from a certain frame, it should be a complete model pose. In your document you, @werkt described that the coordinates are 10bit fixed point numbers :
    The anim vector structure encodes a fixed-point
    3 dimensional coordinate in 10 bits per dimension. This coordinate vector is
    then scaled via ../../HEAD/scale and added to the ../../HEAD/pos basis to
    transform into world space.
    Bits Meaning
    0:9 Z
    10:19 Y
    20:29 X
    It seems I'm unable to read these correctly. I've tried countless of ways, like reading it as number (0-1023) / 1000 * scale, putting the binary point between the first and second bit etc. Nope. How can I read these, what is the magic? I'm pretty sure it is the coordinates. I attached some data of me trying to parse the imp's pickaxe blade from anim.
    Code:
    3rd geomery (pick axe blade), indices	
    ANIM Imp_Claim(land)start.kmf		MESH: Imp.kmf
    GEOM index: 255				GEOM index: 93
    (0.22934061, 0.309546, -0.083577394)	(-0.22019999, -0.0014, -0.3139)
    GEOM index: 250				GEOM index: 92
    (0.2296967, 0.23725769, -0.0800164)	(-0.21329999, -0.0016, -0.2902)
    GEOM index: 245				GEOM index: 91
    (0.20655021, 0.1653255, 0.08735061)	(-0.113, -0.0013, -0.30539998)
    GEOM index: 260				GEOM index: 94
    (0.2296967, 0.241887, 0.11939961)	(-0.3053, -0.0022, -0.2527)
    GEOM index: 245				GEOM index: 91
    (0.20655021, 0.1653255, 0.08735061)	(-0.113, -0.0013, -0.30539998)
    GEOM index: 250				GEOM index: 92
    (0.2296967, 0.23725769, -0.0800164)	(-0.21329999, -0.0016, -0.2902)
    GEOM index: 255				GEOM index: 93
    (0.22934061, 0.309546, -0.083577394)	(-0.22019999, -0.0014, -0.3139)
    GEOM index: 260				GEOM index: 94
    (0.2296967, 0.241887, 0.11939961)	(-0.3053, -0.0022, -0.2527)

  4. #24

    Default Re: Reversal of DKII Binary File Formats

    The coordinates are signed. Fixed point arithmetic extraction for geom's coords:

    Code:
    x = (((coord >> 20) & 0x3ff) - 0x200) / 511.0f;
    y = (((coord >> 10) & 0x3ff) - 0x200) / 511.0f;
    z = (((coord >>  0) & 0x3ff) - 0x200) / 511.0f;

  5. #25
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Thank you! Now to fix JME's pose animation system.. Phew, JAVA is powerful. But when it comes to multimedia.. MP2 is also "impossible" to play with any library. So much ground work needed to be laid down.

  6. #26
    Moderator MaxHayman's Avatar
    Join Date
    Sep 2009
    Location
    London, England
    Posts
    220
    Gamer IDs

    Gamertag: Max Hayman PSN ID: Ballwinkle XFIRE ID: elmaxaman Steam ID: ballwinkle

    Default Re: Reversal of DKII Binary File Formats

    Oh nice work guys. I wrote a reader for Dk1 files and this format: http://keeperklan.com/threads/3570-T...ap-file-format
    Should add Dk2 support to it when i get time :P

  7. #27
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Nice. If you have any information about the Shots.kwd map file, I would appreciate greatly. Seems werkt has missed this one, or forgot to commit.

  8. #28

    Default Re: Reversal of DKII Binary File Formats

    werkt never misses anything. KWD and the full assets are next on my list for documentation.

    Without any preamble and lots of warnings about my terrible typesetting, here's my latest copy of the guide, including KCS files and Text Assets.

    guide.pdf

    As always, enjoy!

  9. #29
    Demon Spawn
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    188

    Default Re: Reversal of DKII Binary File Formats

    Hi werkt, do you have an IDA database for DK2?
    Or exported changes you could share like
    http://keeper.lubiki.pl/html/dk_keeperfx_devel.php?

  10. #30

    Default Re: Reversal of DKII Binary File Formats

    Quote Originally Posted by Trass3r View Post
    Hi werkt, do you have an IDA database for DK2?
    Or exported changes you could share like
    http://keeper.lubiki.pl/html/dk_keeperfx_devel.php?
    I'd prefer not to share my entire database, secret sauce and all. What are you after in particular?

Similar Threads

  1. Questions about the reversal of stuff
    By DragonsLover in forum KeeperFX
    Replies: 61
    Last Post: April 16th, 2014, 22:32
  2. LOG file improvement
    By jomalin in forum KeeperFX
    Replies: 10
    Last Post: June 15th, 2011, 22:54
  3. Help me by uploading a file
    By f0wh in forum DK2 Troubleshooting
    Replies: 0
    Last Post: January 26th, 2011, 02:10

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
  •