Disgustor's Texture Mods!

Discussion in 'Code Vault' started by Disgustor, Aug 4, 2013.

  1. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    idk how do that. can u do it for me ?
    i try ti . but what is riku .mest file number ?
     
  2. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
  3. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    I can't wait to see how the voice modification thing works.
     
  4. Miles Cull a Duty 2 : Electric Boogaloo

    Joined:
    Jul 31, 2011
    Gender:
    Male
    Location:
    Ohio
    258
    Like I said before. You need to find soras shut eye texture.
     
  5. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    Should be with the original textures. Or is it internally within the mdls?
     
  6. Miles Cull a Duty 2 : Electric Boogaloo

    Joined:
    Jul 31, 2011
    Gender:
    Male
    Location:
    Ohio
    258
    It should have been with the textures.
     
  7. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    I just want to fix it because that HD Sora texture looks so good. It almost makes me think Square Enix just retextured the original models with BBSFM/DDD textures :rolleyes:
     
  8. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Took a look at the blinking-funky-pink-mask thing. This is my fault, from what I can tell. :oops:
    My guess is it's using the alpha channel for... something, and a "workaround" in my code is screwing this up. In particular, I do this to the alpha-channel: "Math.min(255,alpha*2)"; which means multiply alpha by 2, and if it's higher then 255 clamp it to 255. This is in the extractor, the packer does the opposite.
    I'll do a few tests to see if this is really what it's hitting, and see if I can get a fix up.

    Edit: I've confirmed this is an issue, even it it's not causing this. An example: The alpha channel from an original mdls has a value of 255, but after reinserting it and extracting again, it has a value of 254. Not much, but this should be lossless conversion...

    Edit 2: Fixed the off-by-1 alpha issue. Also changed the extractor to just copy image data instead of recreate, and the editor to only re-encode if needed. This means it saves indexed images now (same as used by the game), and if the image is already 8-bit indexed it won't re-encode on import.
    Was able to modify the face texture without the blinking glitch, but using the "Sora BBS" texture still glitches. I'll look into it more tomorrow.

    Edit 3: Found the real problem, but no solution yet. It seems the "blink" texture uses the same pallate as the face texture, but is stored somewhere else.... not sure where yet. When we change the image, we scramble the pallate, so the blink image tries to load the new pallate as if it was old, getting the weird colors.
    Here is the face texture replaced with pure black: Untitled.png
    And here is the same texture 3 seconds later: Untitled2.png
    I replaced every extracted texture, and it doesn't change the image.... so I'm off image hunting for a bit now.
     
  9. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    Can u replace sora with riku by a texture mod ?
     
  10. Miles Cull a Duty 2 : Electric Boogaloo

    Joined:
    Jul 31, 2011
    Gender:
    Male
    Location:
    Ohio
    258
    hes not worried about that now.
     
  11. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    Riku's textures on a Sora model would look really odd unless we edit it for clothing for Sora. If you want to play as Riku then wait a bit because we haven't even scratched the surface on model importing/rigging.
     
  12. NarutoSuperKubii Chaser

    Joined:
    Aug 6, 2008
    164
    If you want to replace Sora with Riku then all you have to do is copy and paste his moveset out of the export folder and rename his moveset and model to Sora's moveset and models then drag and drop and replace all its simple

    (Random model I don't know if this is riku or not)
    xa_ex_1580.mdls = xa_ex_0010.mdls
    xa_ex_1580.mset = xa_ex_0010.mset
    and so on
     
  13. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    You could, but it will look ugly as heck. You're better off replacing models, as suggested before.

    ---
    I can't find any blinking texture for the life of me. In fact, since it uses the same palette table, I bet it's done procedurally or something. Same as the expressions in cut-scenes, I can't find any texture to them; not in the model nor animation.

    Now, I was able to make it work, but it's more involved then just dropping the new picture in. I'll type it up once I get everything else packed and uploaded.

    So first the updated tools: v2.0: http://crazycatz00.x10host.com/KH/files/app_ModelTextureEditor.7z.

    Now the modded face texture (Sora non-High Poly) is attached. (BTW, the forum server does re-encode images. So better attach them in a zip to avoid that.)

    And last some instructions:
    The blinking error happens because, I believe, the game makes the texture on-the-fly using the face texture's colors as a base. So when we change the image and re-encode it (like we have been) it causes the colors to change order, and the game is now using old offsets on a new file.

    So to avoid this, these types of textures must be modded specially. You MUST use a program that lets you see the palette directly, such as Photoshop (GIMP might work, but I can't help you there).
    1. Extract the original, working texture. Open it in Photoshop.
    2. Get the new texture, open it in Photoshop.
    3. Check "Image -> Mode" for both pictures:
      • The original texture should say "Indexed Color" and "8 Bits/channel". If not, you may of extracted it wrong.
      • The new texture needs to be changed to "Indexed Color" and "8 Bits/channel" if it isn't already.
        • When you change it, a popup box with options will come up.
        • Colors should be "256", forced should be "None", Transparency should be checked.
        • Change "Palette" to whichever looks closest to the original. You can turn Preview on and off to see the difference.
          I've had the best luck with "Local (Selective)"
        • Change "Dither" to whichever looks best.
          I've had the best luck with "None".
    4. If you know there are colors in the new one that are not in the original texture, add them:
      • Note the new color. Either hex (00FF00) or RBG (0, 255, 0) values will both be fine.
      • Open "Image -> Mode -> Color Table...". This shows you the palette.
      • Find a color you can replace (either not in the new image, or a minor\little-used color)
      • Replace the color in the palette.
      • Note: Do be careful which colors you change. If you change ones used by the procedure, it will affect blinking and other facial expressions. This may or may not be good, depending on what you're doing.
        The only way to tell if it did affect is to try in-game.
    5. Copy the new image over the old image.
    6. If there are colors you didn't add before, they may show up weird now. You can follow the same steps as 4 to add them now.
      Note: It is preferable to add colors on step 4 compared to now, as Photoshop handles it better.
    7. Save the original-now-new image.
    8. When running the editor, if you see "# is in the format *! Converting!" where # is the face image, it wasn't saved as an 8-bit indexed image.
      It will more then likely have problems if you see this message.
     

    Attached Files:

  14. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    Thanks Crazycat. You are the master of reverse engineering this game!
     
  15. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Did Square update any of the textures for the Heartless in 1.5? I'm comparing Darkside's KH1 and BBS:FM textures and it seems to me that Square just reused the KH1 texture for it instead of using the higher res one from BBS. I mean, I prefer the older texture (especially around the face. The BBS one looks like he's made of wood), but I wonder why they didn't update it when it's a huge model and a boss that you fight 3 times.
     
  16. sora6645 Kingdom Keeper

    Joined:
    Feb 17, 2011
    51
    909
    C
    Can u replace model for me ?
     
  17. Jadentheman Hollow Bastion Committee

    Joined:
    Mar 31, 2007
    Location:
    None of your business
    51
    742
    It doesn't matter. We can update it ourselves. Preferably model imports, but I don't mind the texture
     
  18. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Trying to insert the texture you shared resulted in this error for me:
    new error.png
     
  19. crazycatz00 Twilight Town Denizen

    Joined:
    Apr 12, 2013
    40
    236
    Are you using the updated tools?
     
  20. Hidden Smithery King's Apprentice

    Joined:
    Feb 2, 2010
    81
    452
    Carry on. :|

    I would've sworn that I had downloaded the new tools. Sorry to waste your time. I did notice that your new tools saved the model as a ".mdls-NEW" file instead of just ".mdls".