PCSX2 HD texture pack group
This group is to collect HD texture packs for the PCSX2 emulator, since there's no centralized location for them right now.
PCSX2 HD texture pack group

PCSX2 HD texture pack group

Texture Nexus V1.0.0 (Release)

  • Thread starter Thread starter TEODOR_MAX
  • Start date Start date
  • Views Views 4,363
  • Replies Replies 16
  • Likes Likes 9

TEODOR_MAX

Well-Known Member
Newcomer
Joined
Sep 16, 2023
Messages
50
Reaction score
110
Trophies
1
XP
480
Country
Iraq
This is my initial release of Texture Nexus app version 1.0.0,

My idea for this app not to release every now and then a tool or utility, but instead, I decided to group them together, some of which you already knew them (Image cleaner and Alpha channel remover), but, you'll find them here updated. Let's get started!

1. Texture Cleaner (Formerly Image cleaner)
TextureCleaner01.png
  • Now you can save directly to the current loaded save file.
  • Added Recent Saves, Rest Settings and Save As to the File menu.
  • Now the colors changed, when the status shows Idle becomes Red, and when Monitoring becomes Green.
  • Now when you load a save file, it shows it's name in Current Save label.
  • Theme Menu Added (Dark mode or System default mode)

2. Alpha Channel Toolkit
Alpha channel 1.png Alpha channel 2.png

  • In Split Alpha tab, you can split the RGBA image into RGB and ALPHA images and save them. This will create subfolders named "RGB" and "ALPHA" in the selected output folder.
    • If you also enable Create Mask, this will create Mask and saves the Mask in subfolder named "MASK" alongside "RGB" and "Alpha" subfolders
  • In Merge Alpha tab, you can merge back the RGB and ALPHA images to RGBA image. if the the RGB image is bigger in size than the Alpha Image in dimensions, here you select the Resampling Method for resizing the Alpha. if RGB and ALPHA images are with same size, than the Resampling Method will not be used and ignored.
2. Bulk Image Renamer
Renamer.png


  • I like to stay organized when editing textures or images in general.
    This will rename you're images in sequence and after editing, you can return them back to their original name (using mapping method).
  • In Prepare Batch tab, select your images and the output folder, this will rename all the images you selected in sequence starting from 00000.png, 00001.png and so on, and the mapping file CSV will be created in the output folder.
  • In Rename Back tab, here you return your edited images to there original name, you need to select the mapping file earlier (don't lose the mapping file backup this file).
  • For example: you have images and one of them is named: 2e650932180daf88-f9b3fb24c1a30806-00002653.png
    When you rename images, this one will be named: 00042.png
    Done your edit and you named it and saved it as: 00042_Brick_HD01.png
    When you rename back with mapping file: the edited 00042_Brick_HD01.png now revert back to => the original 2e650932180daf88-f9b3fb24c1a30806-00002653.png
  • As you have noted, the sequence number is important, also the most important the mapping file and needs to be in your edited image name, to be able to return back to the original.

2. Texture Alpha Scaler
Alpha scaler.png


  • Many of you a familiar with this tool, this one scale the images to maximum alpha value 255 to be fully visible.
  • When you scale the images it saves text file to maintains an index file (__scaled_images__.txt) to track scaled images.
  • when you unscale the images it will revert back the alpha channels to their original value semi-visible or transparent.
  • This one made by PCSX2 development team. Many thanks to the team and for their hard work and for this script, the credit goes to them, however, I only made the GUI version you see here, and made it optionally look in subfolder or not when you scale or unscale the images.
3. Texture Inspector (Formerly Alpha channel Remover)
Inspector.png Inspector_Alpha.png
  • This one if you need visually see and inspect your textures.
  • You can extract from RGBA image the Alpha or RGB or both basically the same as in Alpha channel toolkit, but this one focused on single image.
  • The Alpha slider will show you how the alpha channel effect the the image, if you need the the alpha channel on specific value enable "Used Modified Image for Extraction" and Adjust the alpha slider for your need, by default the alpha extraction based on the original value of the image.
2. Texture Organizer
Organizer.png


  • This one to organize you textures.
  • You have three options to organize (Size, Hash and Visual Similarity).
    • The size (Dimensions) is self explanatory.
    • The Hash, if you know the duplicate hash, you can use it.
    • The visual Similarity, I don't want to get technical, the default threshold is very good, you can adjust it if you need to.

Probably you saw the last tab, Texture Converter, this one is not done yet, and when you download the app you won't see it. I will update it when I can, if I have the will and time.

Remember always backup your files before trying anything

Download: Mediafire
 
Last edited by TEODOR_MAX,
This looks pretty amazing. It combines some functions which I had to use different tools for in the past.

  • When you scale the images it saves text file to maintains an index file (__scaled_images__.txt) to track scaled images.
  • when you unscale the images it will revert back the alpha channels to their original value semi-visible or transparent.

I just tried the alpha scaler. For me this one brings the biggest advantage because with the alpha scaler from pcsx2 I always had to switch PCs since it needed a different python version than ESRGAN lol. Anyway I tested it on some textures and took a look at your index file. I was wondering where the alpha values are stored? The index file only stores the file names but not the alpha values of the textures. So how does the tool know what the original values are?
 
  • Like
Reactions: TEODOR_MAX
This looks pretty amazing. It combines some functions which I had to use different tools for in the past.



I just tried the alpha scaler. For me this one brings the biggest advantage because with the alpha scaler from pcsx2 I always had to switch PCs since it needed a different python version than ESRGAN lol. Anyway I tested it on some textures and took a look at your index file. I was wondering where the alpha values are stored? The index file only stores the file names but not the alpha values of the textures. So how does the tool know what the original values are?
lol yeah I know that feeling using different versions of python.

For your question how does it know the values:

Actually it doesn't know or store the alpha value, when scaling, the script changes each pixel’s alpha value per pixel using the formula: new_alpha = min(old_alpha × 2 − 1, 255), This means if the original alpha (transparency) is low (≤ 128), it will be doubled (with a slight offset), making the image more opaque.

Then, when unscaling, it reverses this operation with: original_alpha ≈ max((scaled_alpha + 1) // 2, 0)
This formula roughly recovers the original value from the scaled one.

This file (__scaled_images__.txt) only used to remember which images were scaled, so that the unscaling command knows which ones to process. It does not store any per-pixel alpha data.
 
I just tested how well your tool finds duplicates by image content and I'm very impressed.

Since you seem to be a person who knows what he is doing I want to make a feature request. Your tool could be the ultimate way to convert texture packs quickly from one region to another.

This is my idea: Two input folders, one for texture dumps of Region A (lets say PAL), one for texture dumps of Region B (lets say NTSC). It scans both folders for the same image content.

It finds a match of two files with same image content but different file names (happens with some games), the match will be indexed.

Now let's say I want to convert a PAL texture pack of this game to NTSC. The tool will scan the texture pack and if it finds the PAL file name in the index it will be able to rename it for NTSC.
Post automatically merged:

lol yeah I know that feeling using different versions of python.

For your question how does it know the values:

Actually it doesn't know or store the alpha value, when scaling, the script changes each pixel’s alpha value per pixel using the formula: new_alpha = min(old_alpha × 2 − 1, 255), This means if the original alpha (transparency) is low (≤ 128), it will be doubled (with a slight offset), making the image more opaque.

Then, when unscaling, it reverses this operation with: original_alpha ≈ max((scaled_alpha + 1) // 2, 0)
This formula roughly recovers the original value from the scaled one.

This file (__scaled_images__.txt) only used to remember which images were scaled, so that the unscaling command knows which ones to process. It does not store any per-pixel alpha data.

Ah, I understand. Hm should work I guess. Atleast as long as the upscale doesn't change the alpha values. Could be a bit risky with texture dumps which have a low alpha value and an upscale model which isn't very accurate with alphas / colors :unsure:
 
Last edited by kupo-on-gbatem,
  • Like
Reactions: TEODOR_MAX
I just tested how well your tool finds duplicates by image content and I'm very impressed.

Since you seem to be a person who knows what he is doing I want to make a feature request. Your tool could be the ultimate way to convert texture packs quickly from one region to another.

This is my idea: Two input folders, one for texture dumps of Region A (lets say PAL), one for texture dumps of Region B (lets say NTSC). It scans both folders for the same image content.

It finds a match of two files with same image content but different file names (happens with some games), the match will be indexed.

Now let's say I want to convert a PAL texture pack of this game to NTSC. The tool will scan the texture pack and if it finds the PAL file name in the index it will be able to rename it for NTSC.
Post automatically merged:



Ah, I understand. Hm should work I guess. Atleast as long as the upscale doesn't change the alpha values. Could be a bit risky with texture dumps which have a low alpha value and an upscale model which isn't very accurate with alphas / colors :unsure:

Thank you!

For the scaler, to put it in simple terms if the image have lets say 128 alpha it doubled x2 two times when scaling:

128 × 2 = 256
256 − 1 = 255 (Full opaque)

When unscaling the reverse happens:
255 / 2 = 127.5
127.5 + 1 = 128 Roughly or (255 + 1) // 2 = 128 (Semi-Transparent)

For your request it's not very easy think to do, but I'll try if something like this able to get it work probably, but I liked the idea.
 
Last edited by TEODOR_MAX,
Nice program! There are just a few small things that, in my opinion, could be improved.

Some parts I really liked, and thanks to what you did, I was also able to fix my problem a little bit.

As for my program/script, I made it just for fun, nothing too serious… I’m not a professional, but I needed it, so I made it and then published it.

By the way, I made both a PS2 and a PSP version!

Anyway, I’ll be honest with you: you did a great job! I would’ve never been able to make something like that. I can only do scripts and similar stuff!:yay:
 
  • Like
Reactions: TEODOR_MAX
I really like the program, and everything works great on other systems. The only issue is the grouping of texture packs using 'Group by Visual Similarity,' which creates too many folders and makes management a bit confusing. It would be helpful to reduce the number of folders or improve the organization system to make it more intuitive. :wacko:
 
For the scaler, to put it in simple terms if the image have lets say 128 alpha it doubled x2 two times when scaling:

128 × 2 = 256
256 − 1 = 255 (Full opaque)

When unscaling the reverse happens:
255 / 2 = 127.5
127.5 + 1 = 128 Roughly or (255 + 1) // 2 = 128 (Semi-Transparent)

I understand the process. This probably works fine for alpha values around 127/128. If their alpha values are doubled, they will be full opague, as you said. So upscaling and editing will likely cause no issues. I'm just a little bit concerned about textures with lower alpha values. Let's say a texture with an alpha value of 70. It won't be full opague after scaling. If the texture with an alpha value of 140 will be upscaled or edited (I for example often blend textures which only works with full opague textures) the alpha values might change and after unscaling be not the same as the source texture anymore.

For your request it's not very easy think to do, but I'll try if something like this able to get it work probably, but I liked the idea.

Oh ok, I thought it might be not a big deal, since your tool already has the most important functions for that like finding textures by similarity and a renamer.

The only issue is the grouping of texture packs using 'Group by Visual Similarity,' which creates too many folders and makes management a bit confusing. It would be helpful to reduce the number of folders or improve the organization system to make it more intuitive

How else do you want to group them, if not with folders?
If you want less folders you will have to decrease the treshold for similarity, but by that you will also have groups with less similar textures. So not sure, if this is desirable.
 
I understand the process. This probably works fine for alpha values around 127/128. If their alpha values are doubled, they will be full opague, as you said. So upscaling and editing will likely cause no issues. I'm just a little bit concerned about textures with lower alpha values. Let's say a texture with an alpha value of 70. It won't be full opague after scaling. If the texture with an alpha value of 140 will be upscaled or edited (I for example often blend textures which only works with full opague textures) the alpha values might change and after unscaling be not the same as the source texture anymore.

It's better in that case to split the RGBA and work with RGB and use the ALPHA or MASK to guide your editing, after that merge back RGB with original ALPHA, that way you'll preserve the original value of the Alpha, also in case you upscale the RGB, you need to upscale the alpha as well.

I really like the program, and everything works great on other systems. The only issue is the grouping of texture packs using 'Group by Visual Similarity,' which creates too many folders and makes management a bit confusing. It would be helpful to reduce the number of folders or improve the organization system to make it more intuitive.

That's intended to be this way, you group similar images in separated folders. The many folders you see, that's a good sign, you grouped many smiler images, you can adjust similarity threshold, when you decrease it, you'll get less folders but with false matches or close matches or increase it, to get more matches and more folders. also it depends on your game or on your set of images.
 
Does this tool work with every game as in other emulators and their roms or only PS2?
 
Does this tool work with every game as in other emulators and their roms or only PS2?
Yes it should work with any kind of images from other emulators, I didn't test myself and developed it to be for PS2, just watch out when using Texture Cleaner and Alpha scaler. backup your dump and test.
 
  • Like
Reactions: Akumu
@TEODOR_MAX
Hello and thanks for this tools :)
And which of these programs is suitable for finding and removing duplicates? A texture cleaner (previously an image cleaner)?
 
  • Like
Reactions: TEODOR_MAX
And which of these programs is suitable for finding and removing duplicates? A texture cleaner (previously an image cleaner)?

If you had hundreds or thousands of duplicates, then yes use Texture Cleaner.
 
  • Like
Reactions: GennadijK
Yes it should work with any kind of images from other emulators, I didn't test myself and developed it to be for PS2, just watch out when using Texture Cleaner and Alpha scaler. backup your dump and test.
Thank you, i will keep this in mind
 
  • Like
Reactions: TEODOR_MAX
So this might be a stupid question, but how do I delete the files after monitoring? :rofl:

I entered the hash, clicked at monitoring, but after scanning the folder nothing happened.
The tool is fast sometimes you don't see them gets deleted. If you don't have a duplicate Hash in your set of textures, then it will not delete anything. Did you you entered a correct Hash? (You need to enter a Hash after or before or between the dashes). Make sure to select the correct folder, sometimes I choose a wrong folder from backup or something else.
 
Last edited by TEODOR_MAX,
The tool is fast sometimes you don't see them gets deleted. If you don't have a duplicate Hash in your set of textures, then it will not delete anything. Did you you entered a correct Hash? (You need to enter a Hash after or before or between the dashes). Make sure to select the correct folder, sometimes I choose a wrong folder from backup or something else.

Ah, I understand. It only works with pcsx2 texture dumps. I tried it with texture dumps from Dolphin which follow a slightly different naming sheme:

tex1_256x256_6f958c9d50fda69f_2a4427e320fc0f94_8.png

Maybe you could expand your tool to other emulators aswell? I think accepting any text strings, not just hashes would be the best, because sometimes you might want delete textures with specific dimensions instead of certain hashes as in this case, where all junk starts with tex1_640x16

Unbenannt.PNG
 

Group statistics

Group owner:
relauby
Members:
3943
Threads:
2624
Messages:
9188

Site & Scene News

Popular threads in this forum