I just tried blending the results of ESRGAN and SFTGAN processing for sprites (similar to what I did here), here's a very rough test result (zoomed 2x):
Scaling sprites by combining waifu2x and xBRZ output
#61 Posted 27 January 2019 - 03:19 AM
#63 Posted 27 January 2019 - 02:30 PM
there's some strong color fringing around the edges though, particularly on top of octobrain's head
#64 Posted 27 January 2019 - 06:15 PM
Nothing you can't pixel-edit. I suspect you're never going to get away with upscaling sprites without doing that.
#65 Posted 29 January 2019 - 03:19 AM
Phredreeke, on 27 January 2019 - 02:30 PM, said:
there's some strong color fringing around the edges though, particularly on top of octobrain's head
That can be fixed by using different backgrounds, and blending the results as I did with the waifu2x upscale attempt. I just ran a quick test with the green background I used previously.
#66 Posted 29 January 2019 - 08:19 AM
I think he was referring to the harsh red line on the top of the octobrain's head which is not on the background.
#67 Posted 29 January 2019 - 08:32 AM
Actually I think it may be connected to using a green background. On my older Blood upscales I got greenish fringes on fine detail from the pink background
#68 Posted 02 February 2019 - 12:14 AM
MusicallyInspired, on 29 January 2019 - 08:19 AM, said:
I think he was referring to the harsh red line on the top of the octobrain's head which is not on the background.
There was no misunderstanding. The wrong colours arise because of the softening procedure I apply to input images using xBRZ. This results in slight blurring, so the colours at sprite edges are affected depending on the background colour.
So far I figured that the least effort-consuming way to counter this is to process separate sprite sheets with different backgrounds (black, white), then blend them as layers. This is even more appropriate here because the method above blends ESRGAN and SFTGAN results anyway.
#69 Posted 03 February 2019 - 08:13 AM
I did some further tests with ESRGAN and SFTGAN and posted the results in the other thread.
#70 Posted 26 March 2019 - 11:02 AM
Recently I ran a batch of tests with Daggerfall sprites and concluded that my previous method I called xBRZ softening is rather imperfect (as demonstrated here). Some trial and error later I came up with a better approach which also allows to produce somewhat cleaner sprite edges. As a test, I scaled up some of Duke3D babes:
The images are scaled up with ESRGAN using an interpolated model (ESRGAN4x and Manga109Attempt at alpha = 0.2).
Pre-processing steps:
Edge cleanup steps:
This method is not completely perfect but it leaves just a few pixels on the sprite edges that may be cleaned up manually.
- 2x the original size
Spoiler - 4x the original size
Spoiler
The images are scaled up with ESRGAN using an interpolated model (ESRGAN4x and Manga109Attempt at alpha = 0.2).
Pre-processing steps:
- use a dark background for the sprites (but not black), preferably if the colour is not used in the images (I used dark green for this batch)
- open the image in GIMP, apply Enhance -> Antialiase once, export the result
- use the xBRZ Scaler Test tool to scale image up using the xBR scaler (not xBRZ) to 4x the original size
- in GIMP, apply Gaussian blur to the xBR-scaled image at 1.5 pixel radius. This is only done to compensate for the sharpening effect produced by Bicubic downsampling (see below)
- scale the image down to the original dimensions using Bicubic interpolation
Edge cleanup steps:
- make a copy of the image scaled up with ESRGAN, ope it in mtPaint and apply Kuwahara-Nagao blur at 2 pixel radius with preserve details on (1 pixel radius for the image scaled down to 2x the original size)
- load the palette of the original unaltered image and convert to indexed mode with no dithering and colour space set to RGB (in options)
- save the image and open both the upscaled original and the version with KN blur in GIMP. Use GIMP's select by colour tool to select the background colour
- right-click on the selection and increase selection size by 1 pixel
- copy the selected area to the unaltered upscaled image and save it, then open it in mtPaint and convert to the original palette as described above
- you can now open the resulting image in GIMP and again select the background colour, then delete it (you'll need to add alpha channel for transparency though first)
This method is not completely perfect but it leaves just a few pixels on the sprite edges that may be cleaned up manually.