Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Black Moon Extend (??Extend) .PKM / .ATLAS Textures

Featured Replies

  • Author
  • Localization

ArthurLopes, posted Sun Feb 12, 2023 4:17 am (75404)


I've been interested in reversing the sprites and textures for this hack n' slash 2D Chinese mobile game, but I've hit a few roadblocks.

Its files are all laid bare inside typical folders, with a good chunk of the game's assets being in common formats easy to crack open. However, all the files show some kind of swizzling or padding, and I haven't been able to figure out how this works.

The sprites are stored in a set of 4 files: Two PKM files (one for the base image, another for the alpha channel), an ATLAS, and a JSON. This structure belongs to the Spine animation framework and can be easily read with the developer's own viewer tools, but these files can't be read either by their software or Mali's Texture tools.

Even simple PNG files show these artifacts. Here's a comparison between a PNG from the game and one exported with Photoshop.

Image

Here's a comparison between a JSON from this game and a fully working JSON from another game.

Image

I got some of the images to load into Texture Finder, but regardless of the settings, they look all messed up.

Image

I attached some samples to the post, but here's the entire game in case anyone needs more: https://mega.nz/file/cKJhCIRB#5wCMTuYQb ... 0r-qvXR-k8
The game is free despite being locked in China, so I reckon it shouldn't be a problem to share this.

The company who made this game doesn't have anything else on their portfolio and I also have no idea what engine this is running on, but it definitely is not Unity, so I would appreciate it if anyone could give me a hint as to what is going on with these files. :D
  • Author
  • Localization

roocker666, posted Mon Feb 20, 2023 7:46 am (75488)


I opened "rw_duihua_ciyuanlingzhu.pkm" with Texture Finder and exported like that. Then in GIMP2 I edited RGB channels.
Now it looks fine, so use that program to edit RGB channels, go to Menu Colors, Components, Channel Mixer... and edit
like this:

Image

I guess you need to do that with all .pkm files, I think Photosop has channel mixer too but I don't remember..

Good luck!
  • Author
  • Localization

ArthurLopes, posted Sun Feb 26, 2023 2:25 am (75577)


roocker666 wrote:
I opened "rw_duihua_ciyuanlingzhu.pkm" with Texture Finder and exported like that. Then in GIMP2 I edited RGB channels.
Now it looks fine, so use that program to edit RGB channels, go to Menu Colors, Components, Channel Mixer... and edit
like this:

Image

I guess you need to do that with all .pkm files, I think Photosop has channel mixer too but I don't remember..

Good luck!


That's awesome! What settings did you use in Texture Finder?
  • Author
  • Localization

roocker666, posted Mon Feb 27, 2023 11:44 pm (75593)


ArthurLopes wrote:

That's awesome! What settings did you use in Texture Finder?


For that image I used: 16x4=48 16(right panel)

And WIDTH 1024, SHIFT 3(bottom panel)

But not all images are 1024 so you need to check that, maybe some are 512, 256, 128, etc.
  • Author
  • Localization

ArthurLopes, posted Wed Mar 01, 2023 2:26 am (75606)


roocker666 wrote:
ArthurLopes wrote:

That's awesome! What settings did you use in Texture Finder?


For that image I used: 16x4=48 16(right panel)

And WIDTH 1024, SHIFT 3(bottom panel)

But not all images are 1024 so you need to check that, maybe some are 512, 256, 128, etc.


What is actually happening is that the red channel is being copied to the blue channel, so colors aren't accurate. There is also the problem where all the artwork is unusually low resolution despite them being above-average for a mobile game when viewed in-game, but at least its some progress.
  • Author
  • Localization

jugg, posted Sun Mar 05, 2023 9:10 pm (75694)


ArthurLopes wrote:
roocker666 wrote:
ArthurLopes wrote:

That's awesome! What settings did you use in Texture Finder?


For that image I used: 16x4=48 16(right panel)

And WIDTH 1024, SHIFT 3(bottom panel)

But not all images are 1024 so you need to check that, maybe some are 512, 256, 128, etc.


What is actually happening is that the red channel is being copied to the blue channel, so colors aren't accurate. There is also the problem where all the artwork is unusually low resolution despite them being above-average for a mobile game when viewed in-game, but at least its some progress.


This is the PKM file, except that the game encrypts the first 64 bytes
  • Author
  • Localization

ArthurLopes, posted Sun Mar 05, 2023 10:03 pm (75695)


jugg wrote:
ArthurLopes wrote:
roocker666 wrote:

For that image I used: 16x4=48 16(right panel)

And WIDTH 1024, SHIFT 3(bottom panel)

But not all images are 1024 so you need to check that, maybe some are 512, 256, 128, etc.


What is actually happening is that the red channel is being copied to the blue channel, so colors aren't accurate. There is also the problem where all the artwork is unusually low resolution despite them being above-average for a mobile game when viewed in-game, but at least its some progress.


This is the PKM file, except that the game encrypts the first 64 bytes


Thanks a bunch, I replaced the header and that actually worked out. I noticed the bits were scrambled earlier and I did try to replace the header with ones from other files but I messed it up multiple times.
The 64-byte long encryption is not happening just at the beginning of the file as there are a bunch of artifacts throughout the texture.
Image
This also happens in other files like the .JSONs related to these PKM textures as shown in the main post, I just have no idea what is the logic behind this encryption.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.