Jump to content

Recommended Posts

  • Engineers
Posted
11 hours ago, MK_OKINO said:

Thank you, is it possible to return the file to its original state after modifying the texture?

mummggtool can do the trick of insert and extract

image.png.4f2f60cc971f540c34d7b4acfbda22f9.png

 

  • Engineers
Posted

However, the tool opens your file as well (its your file in my image), can be cock combat, the file is raw. so you will be able to open in this tool.

 

  • 5 months later...
Posted (edited)
On 8/28/2024 at 12:13 AM, Rabatini said:

mummggtool can do the trick of insert and extract

image.png.4f2f60cc971f540c34d7b4acfbda22f9.png

 

How do I do that? (insert)

Edited by imranUSK
  • 1 month later...
  • Members
Posted
On 2/19/2025 at 5:02 PM, imranUSK said:

any help ?

 

imagen.thumb.png.cd7820e817cf991e2fb61e185cce3a6f.png

 

 

 

in fact you can extract and import from this same program, you only have to provide the graphic offset, and the palette, maybe if you give me some time I can make you an extractor or a reimporter

 

On 2/19/2025 at 5:02 PM, imranUSK said:

any help ?

 

imagen.thumb.png.514b83788caa9f8b233d833ad8f59255.png

 

 

after importing the texture, you have to save the file and you're done

  • Like 1
  • Members
Posted
On 2/19/2025 at 5:02 PM, imranUSK said:

any help ?

 

  

I'll explain quickly before you make a tool for this, but this format is similar to the textures of dragon ball budokai tenkaichi 3(ps2) first you must go to the first QRS

of the file(to get the graphic offset)

00 00 00 00 00 00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 00 00 00 00 00

and get graphic offset, in the first image I mark where to start, after writing down the value(in decimal) although I don't know if it is necessarily to put it in hex or dec in the program it doesn't matter, I use it in dec, you go to the second 00 00 00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 to obtain its palette, and you position yourself as I mark it, easy right? now with what i explained you can import and extract textures! good luck in your projects!

 

imagen.thumb.png.af57ccd07bba0e5e2baec63c6f56e781.png

 

imagen.thumb.png.5af79491fe2cca323b649a3945a29347.png

imagen.thumb.png.1e78d34d56cc774b04b77b4ec03c76c7.png

 

 

 

  • 6 months later...
Posted (edited)

Hello, first time posting in this forum!

I have been editing textures for MK Deception for quite some time now. I've been using this tool called SSFExplorer: 

https://ermaccer.github.io/posts/ssfexplorer/

It can extract and export texture which is how MK_OKINO must've gotten those raw texture data. When the textures are exported with SSFExplorer it is an indexed image (max. 256 colors) and a separate grayscale texture that represents the alpha channel.

 

Anyways, I understand how to swizzle textures/palettes that I have created from GIMP when exported as an indexed BMP with a program that I assume some in this forum are aware of called Ezswizzle. However I've only been able to swizzle without the alpha.

https://ps2linux.no-ip.info/playstation2-linux.com/projects/ezswizzle.html

 

Now my question is, how can I swizzle Alpha? How can add an alpha channel to an indexed (8bpp/8 bit) bmp image? There seems to be conflicting information that BMP can/can't support alpha, moreso that it can't. Whenever I try to export an indexed BMP with alpha in GIMP it will be ignored, as it seems to be a limitation of the BMP image format. However when I view the bmp image in a hex editor it seems to contain information of the alpha channel that comes from palette offsets (0x42A0) of the raw data. Then, when I use that exact bmp image and swizzle it with Ezswizzle it can swizzle the alpha.

I have the first color index highlighted for demonstration.

BMP (exported from SSFExplorer) in hex editor. BTW the palette when view in a hex editor is inverted so it's BGR, but doesn't affect the palette!

BMPinhexeditor.png.18478cdf4bfdf24d06aee2c595b1f8d9.png

 

Raw Data extracted from SSFExplorer in hex editor:

rawdatainhexeditor.png.c37fa6d32e87839133374d7e6064f4ae.png

 

BMP (exported from SSFExplorer) after being swizzled: (Palette is also inverted just like the BMP)

afterswizzledinhexeditor.png.fe678b765034d069aa6c68bd8bdf9b07.png

 

The same BMP image being exported with GIMP: (All Alpha is 00 as result of not being able to export with an alpha channel, header is slightly different if that plays a factor)

gimpexportedbmpinhexeditor.png.22c196c38465ace9a8c60828c22944e2.png

 

The Exported GIMP BMP after being swizzled: (Again, all Alphas are 00)

gimpexportedafterswizzled.png.3ac8bff727e49c6e8b5aed7d616bf866.png

 

I want to know if there's a way to properly insert alpha channel information into a bmp, and how? Is there any tools that is capable of doing that? I want to efficiently add alphas to textures instead of painstakingly hex editing each color indexed of many, many textures. I hope I have explained myself well. This seems more like an image format question than a graphics file format question but is still relevant to the discussion.

 

Here's a zip file with the textures and raw files so you can export them and see for yourself. Thank you in advance!

 

MKD Textures.zip

Edited by MegaMike321
Read the forums rules after posting and removed the texture from the zip. I Apologies!
  • Moderators
Posted
On 10/28/2025 at 8:28 PM, MegaMike321 said:

I want to know if there's a way to properly insert alpha channel information into a bmp, and how?

I'm not sure what you're trying to do and why, but I just want to let you know that you can easily decode those textures with ImageHeat https://github.com/bartlomiejduda/ImageHeat
if you know proper image and palette offsets
I tried that for NINJA_003 file from rain.sec sample and offsets are 592 for image data and 66256 for palette data. The result is the same as "arm.bmp" file extracted by SSFExplorer.

mortal_kombat_1.thumb.PNG.d43e4833852874550f3530b0683f3710.PNG
 

 

And you can do export and import with ReverseBox directly. https://github.com/bartlomiejduda/ReverseBox

 

Here are some examples how to do it on indexed images:
https://github.com/bartlomiejduda/Tools/tree/master/ReverseBox_Demo

Alpha channel is also supported for many formats, so maybe try that first. 🙂 

Posted
On 11/3/2025 at 5:04 PM, ikskoks said:

I'm not sure what you're trying to do and why, but I just want to let you know that you can easily decode those textures with ImageHeat https://github.com/bartlomiejduda/ImageHeat
if you know proper image and palette offsets
I tried that for NINJA_003 file from rain.sec sample and offsets are 592 for image data and 66256 for palette data. The result is the same as "arm.bmp" file extracted by SSFExplorer.

What I'm trying to do is create a new texture and trying to add an alpha channel while hex editing. The Zip File I provided is mostly for demonstration purposes. I'm trying to edit NINJA_FACE_DAMAGE_000, NINJA_FACE_DAMAGE_001, and NINJA_FACE_DAMAGE_002. My biggest problem is that the textures I'm trying to add an alpha channel to is different than it's original textures and is swizzled differently thus the alpha channel will be different. I am aware the image data will always start at 592 (0x250) and palette data differs depending on the size of the texture 64x64 (0x12A0), 128x128 (0x42A0), 256x256 (0x102D0).

Anyways, I was able to use ImageHeat to get an alpha channel from the original textures with PAL8 pixel and RGBA8888 palette and exported it. Also, was able to use the ReverseBox Demo 2 to export and import the original textures just to get familiar with it. 

These are just a few textures that I'm trying to insert into the game and the alpha channels.

 MKD Texture Edit.zip

  • Like 1
  • 1 month later...
Posted

It's been a while and I wanted to give an update on editing textures with the ReverseBox Demo 2 script. It has been exceptionally helpful in editing some textures but for others not so much. 

Firstly, I will explain with a successfully edited texture. The First texture is a texture of Cyrax's Head (Yellow) and then it was edited on GIMP, a simple recolor of a purple head (Cyber-Smoke). 

cyrax_head.png.acb6d49696a3258fafc152874e811145.png

cybersmoke_head.png.1e610c973708ad56552f30d05f87f80c.png

I've used other tools alongside ReverseBox to edit textures.
EzSwizzle
Console Texture Explorer
SSFExplorer

The ReverseBox script was adjusted according to the texture and my given file name.
Texture:
128x128
PAL8
RGBA8888

Here are the steps

1. Open Ezswizzle, Drag and Drop the texture to unswizzle, it will generate a tm2 file.
2. Copy the unswizzled texture data from the tm2 (starts at 0x50, in this case a size of 0x4000) to the bin file.
2. Copy and paste the palette of the texture from the original raw file (in this case, 0x42A0, size of 0x400) and paste it to the pal file.
3. Run the script, it will generate a DDS image of the exact texture with alpha.
4. Using the texture I created earlier I added the same alpha from the original texture to the edited texture and exported it as a DDS.
5. Run the script again to generate another bin and pal file.
6. Copy and paste the new bin and pal to the correct offset in the original raw texture data. 
7. Open the Raw Texture File with ConsoleTextureExplorer and find the exact texture and palette offset (in this case 592 and 17056) and adjust the size and bpp (in this case 128x128 and 8bpp) draw with PS2 with swizzled disabled. If everything was done correctly the texture should look like the newly edited texture. Export the Texture as a bmp and save it.
8. Drag and Drop the new BMP Texture to Ezswizzle to swizzle it.
9. Copy and Paste the new swizzled tm2 to the raw texture data.
10. Double check with ConsoleTextureExplorer or SSFexplorer to make sure that the texture is swizzled properly. 

With this method I have been successful in editing texture efficiently, with an alpha identical to the original texture and different color palette. The texture demonstrated is just a recolor. However, I cannot be able to edit texture if it is slightly or majorly different.

This second texture is Dark Raiden's Arm and it was edited to be like Light Raiden. Arm is more saturated, the cloth is white with a symbol, wristband is slightly bigger and has a symbol.

alt_rd_arm.png.6dbc3c7fcc9da187ad3e81c6ea1df9c4.png

alt_rd_arm_light.png.e57b629340d5c26c50f1e928f561dee9.png

Using the method above I cannot be able to swizzle the texture to look like this. Reversebox will be successful in changing the palette of the texture but with way less color index and looking much worse because of it.  I even tried to decrease the color in the image to 256, but it gives me even less color than before.

alt_rd_arm_indexed.png.e0230251c3fde0f581ba4723098dc56c.png

The Result of the Texture:

More than 256 color down to 193 colors

alt_rd_arm_193.png.12cd70e8712395e3dbc425faf405954b.png

256 Colors down to 165 colors

alt_rd_arm_165.png.350c3b722e1a9eb9dc6e5eff2ec2f002.png

ReverseBox has been invaluable for recoloring texture and has allowed me to edit texures efficiently instead of spending nearly an hour manually hex editing. It has fallen short for a complete overhaul of a texture. Hopefully there is a solution to this issue or someone can shed me some light on other methods.

 

If neccessary, I will provide the reversebox files so anyone can check for themselves to see how the texture is swizzled and to replicate what I produced.

reversebox demo 2.zip

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...