Beetle PSX HW texture replacement testing & feedback

Not sure what you mean by “better mask the upscaled textures”

But what I do is (because I also use waifux2 for some sprites):

If this is my original texture:

1

I first scale it up to this:

2

Then I use IEU to split the RGBAs.

After that I pull all the alphas in a new folder and use the batch mode in my standard imageviewer XnView to fix the alpha channel and correct the outlines as good as I can.
My settings are: White 128, Black 65, Contrast 127

So I come from this:

3

To this:

4

Then I just pull all the alphas back in IEU and merge them with the RGBs

So I end up with this:

5

Which is close to the HD Remaster:

6

The outlines in the HD Remaster are better, but for now I dont know how to make them better automatically. Probably I have to edit the details manually in Gimp.

Because the sprites look a bit pale ingame I also use a sharpen model in RTCWHQ with color adjustments afterwards.

In the end it looks like this way ingame:

Original

Upscale

1 Like

Those results look really good. I might be going about it the wrong way, but I’m stubborn and want to see if I can get my method to work.

The issue I’m working on now is alphas with both white and gray. Trying fix them while retaining the both the white and gray areas (i.e not just fill the entire texture with one or the other). This is an example:

Did you try with grayscale mode?

I didn’t read the whole thread but this should work:

convert input.png -fuzz 4% -transparent black -channel a -blur 0x2 -level 70,90% -channel rgba output.png

c7d60508-7190c14d_rlt - Kopie output
But with a caveat, all blacks below the fuzz threshold will become transparent, you can see it in the eye, there is a tiny hole.

If you upscale alpha separately and copy opacity like in your method, you only miss a step, blurring alpha channel and adjust levels of it.

1 Like

Yes, but there are areas that are gray that should be black. Normally you can just level to a good white/blank contrast, but if you do that in this case it removes the grays that we want to keep.

Blurrying doesn’t work for PSX because the emulator or the PSX in general doesn’t allow semi-transparency. So you will either end up with 100% or 0% opacity. See, thats what your texture looks like ingame:

In the worst case if your alpha channel is too big or the opacity level of your blurry is too low you will end up with black borders.

Thats why I removed blurry in my workaround. In my opinion it makes things even worse.

1 Like

Blurring is not for softening the alpha channel per se, but for making it possible to shrink the border so you don’t have black lines :slight_smile:

EDIT: If you use a smaller level range, e.g: -level 75,80% you get a very sharp border, make it -level 75,75% and you get a pixel-perfect alpha.
output2
EDIT: I forgot to mention that blurring is also for filling small holes in the alpha produced by the process of removing the background; those holes become fully opaque after adjusting levels.

1 Like

For what software is your command?

If I reproduce that in Gimp by using “Select by Color”, treshold 4% I get big black outlines :thinking:

He’s using Imagemagick. It’s a command line based image manipulation tool.

I have created a small scripting package for working with alphas, if you would like to try it?

I have zipped it with Imagemagick and added it to the path of the batch file, so it should “just work.” If not, just download Imagemagick and install it, making sure to add it to path. You can download the scripts with IM here: https://drive.google.com/file/d/1KJoL513gDgfjWADtlhjmIv8ESbNLy6Ow/view?usp=sharing or just the scripts here: https://drive.google.com/file/d/1u3Ecw8uXYxMOy8YXZxZyj4G7FgRfju44/view?usp=sharing

For your image, I chose option 4. To get started with it, just dump your images into the A folder and run the 0.RUNME.bat file.

The image below shows before and after running it.

1 Like

It’s imagemagick, the same thing @Tarrantx was using.
If you’re gonna use gimp, you’re gonna have total control! You can draw clean curves manually to cut the alpha if you want to, but it’s gonna be a loooong trip :stuck_out_tongue: But to answer your question: yes, it’s possible:


Now, I don’t want to derail this too much, but in the specific case of harvest moon, ESRGAN creates something that looks like an outline, it’s everywhere, you don’t want to have outlines in the opaque areas and they missing from the borders, that looks fairly inconsistent, I would leave them or at least tone them down a bit, something like this:

convert clean_alpha.png -background '#555555' -alpha background -channel a -morphology Dilate Plus outlined.png

alpha_clean —> outlined

Yes your package works fine :+1:

tbh I liked your first version better.

With outlines:

Without outlines:

This looks really amazing to me. I think HM benefits a lot from this feature. I’d love to see the whole game with upscaled textures. Too bad that 99% of the textures from this game are just thin stripes

I look forward to any progress on this. Keep it up! :slight_smile:
What do you mean by thin stripes? You mean you can’t upscale the backgrounds because they are split into tiles? I haven’t tried to dump anything yet, so I don’t know anything about the format, please explain.

HM was the first game which I tried to dump textures from. I just ran 10 minutes through the village played with the dog etc.

In this time I dumped 35k textures.

But only 300 of them are usable:

Mainly textures from the milkyman, his dog, some tools and some animations

The rest like the horse, other villagers, animals, ground etc. look like this:

You probably have to stick the right stripes together, upscale them and then split again. But since you dont know which stripes belong together its kind of impossible atm. I hope they will find a solution for that.

And thats also why I dont work on this game atm.

Hoping someone can help me. I am trying to use hd texture pack on manjaro linux but this is what happens:

Same files work great in Windows Retorarch? Any solutions? Thanks!

I’m currently dumping the textures for Legend of Legaia, but I ran into a problem due to inexperience. (this is my first texture pack attempt) The player sprites seem to have 13 different version of varying shades. Not sure how to handle this. I’m experienced with photoshop, but I’m not sure if these are just different color channels or something, or if I did something wrong when I started dumping.

Beetle texture replacement is still WIP .come over on discord ,More experienced folks are over there , including the creator of the core feature

Discord

[image]

Join the libretro Discord Server!

Check out the libretro community on Discord - hang out with 14,162 other members and enjoy free voice and text chat.

1 Like

I am trying to make texture replacements using Beetle PSX HW but most new textures won’t load, is there a size limit on the new texture replacements?

This is the WIP version,

it was a 3840 x 2160 image but I had to reduce it to 2048x 1920 fot it to load, and some textures won’t load even at 512x512 while they will at their native resolutions.

So, I’m in the process of dumping all the textures for Thousand Arms, which from what I can tell is so obscure that not even Sprite resource websites have anything for it.

I’ve been reading earlier posts, but I’m lost on what process is the most straightforward for fixing the opacity issues on the textures.

Here’s some examples, see how they’re a bit translucent. I’m not even looking for the best upscale method, just a way to fix the opacity. Many thanks! 8c1dc1fb-bd96113e

1 Like

Open the image in any image editor that supports layers.

Make a bunch of copies of the layer. (I made ten layer copies.)

Merge all the layers into a single layer.

49a4f5e9007ad1d178424c3952d45ac999ecc377

If you use Photoshop, you can create an action that does all the work.

Then…

Record that action and do not put a save in it. After you have that action saved with no documents open in Photoshop use menu File>Automate>Batch… in the batch dialog point to the action set and action, point source to your folder of images. In destination use the pull-down menu and choose Save and Close .

…to apply the action to a folder containing images. (Courtesy of Google. :grin:)

As always… make a backup of your source files in case something goes wrong.

2 Likes

Wow, fast response, easy to follow and proper citations? You rule, have a fantastic day :slight_smile:

1 Like