AI Upscaled Textures
-
- Posts: 71
- Joined: Mon Mar 11, 2019 9:13 am
Re: AI Upscaled Textures
I tweaked the script to make a thinner mask. Here's the result for 457
- Attachments
-
- 457-newmask-190325.zip
- (251.74 KiB) Downloaded 118 times
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: AI Upscaled Textures
15 minutes a mob is not THAT bad, but I understand having a tea is a better and more sofisticated option. I remember just from a export from dfimaging to a final xbrz upscale with correct naming my method had like 6 various steps.. it was hell. Pure hell. I also had to rewrite scripts so many god damn times, because these mobs have different number of animation frames because they have different attackc and properties in general...
Just remembering it hurts my head now.
Fingers crossed for u to be able to automate it nicely, sip a tea and watch your HW produce some heat (instead of your head)
If u can endure it one way or another and come up with a complete DF mobs upscale of a quality shown around, neverending hall of modding fame and glory awaits you on the other side
Just remembering it hurts my head now.
Fingers crossed for u to be able to automate it nicely, sip a tea and watch your HW produce some heat (instead of your head)
If u can endure it one way or another and come up with a complete DF mobs upscale of a quality shown around, neverending hall of modding fame and glory awaits you on the other side
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- MrFlibble
- Posts: 411
- Joined: Sat Jan 27, 2018 10:43 am
Re: AI Upscaled Textures
Please note that I apply GIMP antialiase and noise before scaling the image up with xBR.MasonFace wrote: ↑Mon Mar 25, 2019 2:03 pm @MrFlibble:
I gave your new method a try and can confirm that the results were better than the previous xBRZ softening method.
I applied the steps as below with the following caveats for GIMP 2.10:
- Scaled up with xBR to 4x the original size
- Applied gaussian blur with value of 0.50 (1.5 was WAY too strong with this version of GIMP, not sure why)
- Scaled the image down 25% using cubic interpolation (GIMP 2.10 renamed it from "Bicubic" to just "Cubic")
- Applied anti-alias. This didn't appear to do anything, but it may have just been too subtle to notice
- Added HSV noise. This seemed to do the most good. Makes sense considering the images the models were trained on.
Also I'm becoming concerned that the noise is completely random, so you get hit-and-miss results with image details and faces. So I tried to do something more uniform and used the GIMP Apply Canvas feature (default setting, depth of 2) after scaling up with xBR. Here's a small comparison. This time I used a different model, which is an alpha 0.5 interpolation of Random Art JPEG Friendly model (version 1) and Manga 109, which produces somewhat sharper results. (I mentioned this model before in this thread.)
There's also another thing that the way the sprite edges are processed is dependent on the colour of the background. I tried to darken the blue background for the sprites above and here's the result (with GIMP AA):
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
@MrFlibble:
Your latest results look very promising, btw!
@Phredreeke:
I've got my composition script batched now, so I should be able to process all of the MOBs very quickly once I get the improved masks. If you want to just let it run overnight, I can certainly wait.
Noted. Thank you.Please note that I apply GIMP antialiase and noise before scaling the image up with xBR.
Don't quote me on this, but I think the HSV Noise Filter in GIMP 2.10 has a check box to enable/disable the random seed. I'd have to take a look when I get home after work to know for sure. Alternatively, could you generate a noise pattern on an empty image and superimpose it over every image?Also I'm becoming concerned that the noise is completely random, so you get hit-and-miss results with image details and faces.
Your latest results look very promising, btw!
@Phredreeke:
Would you mind re-processing the first batch of sprite outlines with your tweaked script? The ones I currently have are good, but your improved ones are phenomenal. The bear outline looks darn near perfect now.I tweaked the script to make a thinner mask.
I've got my composition script batched now, so I should be able to process all of the MOBs very quickly once I get the improved masks. If you want to just let it run overnight, I can certainly wait.
- MrFlibble
- Posts: 411
- Joined: Sat Jan 27, 2018 10:43 am
Re: AI Upscaled Textures
I'm using v2.8.20 so I wouldn't knowMasonFace wrote: ↑Tue Mar 26, 2019 2:12 pm Don't quote me on this, but I think the HSV Noise Filter in GIMP 2.10 has a check box to enable/disable the random seed. I'd have to take a look when I get home after work to know for sure. Alternatively, could you generate a noise pattern on an empty image and superimpose it over every image?
Out of curiosity I processed this frame using my method and noticed that the blue background from the Bethesda preview sprite set results in residual pixels even if Kuwahara-Nagao blur applied:
So I decided to use a completely different background colour I picked from the default set in KolourPaint:
This resulted in cleaner but jaggier edges (Random Art/Manga interpolation):
UPD: I did another test with yet another colour:
However this time I also applied Kuwahara-Nagao blur at 2 pixel radius instead of 1 (still with protect details on) to create the mask. I also copied the mask background over the original image (processed with ESRGAN/Manga 0.2 interpolation) with one pixel thick outline from the Kuwahara-Nagao version:
-
- Posts: 71
- Joined: Mon Mar 11, 2019 9:13 am
Re: AI Upscaled Textures
Here are the masks for 256-380, I'll process more later http://s000.tinyupload.com/index.php?fi ... 9899564501
- MrFlibble
- Posts: 411
- Joined: Sat Jan 27, 2018 10:43 am
Re: AI Upscaled Textures
Upscaled a sample of actor sprites against the blue background similar to the addendum of the previous post:
I'm now inclined to think that adding noise does not really improve the results, so I skipped this step.
Additionally I tried making the contrasts in the processed sprites less sharp while preserving detail by scaling the image up to 4x size with Sinc and then back down with Bicubic before applying GIMP antialiase. It seems to produce better results overall but worse on sprite egdes. So I scaled the image up with Sinc and then back to original size with Bicubic but then copied the background with one pixel thick sprite edges from the original unaltered image (thus removing the effect from edges only) and then applied antialiase as usual (comparison).
Spoiler!
Additionally I tried making the contrasts in the processed sprites less sharp while preserving detail by scaling the image up to 4x size with Sinc and then back down with Bicubic before applying GIMP antialiase. It seems to produce better results overall but worse on sprite egdes. So I scaled the image up with Sinc and then back to original size with Bicubic but then copied the background with one pixel thick sprite edges from the original unaltered image (thus removing the effect from edges only) and then applied antialiase as usual (comparison).
- MrFlibble
- Posts: 411
- Joined: Sat Jan 27, 2018 10:43 am
Re: AI Upscaled Textures
I processed a few more of the small NPC flats, surprisingly these produce somewhat better results regarding their faces:
This was done with the scaling up with Sinc and back down with Bicubic before applying antialias as described above.
I also gave a go at some medium flats for a test (same procedure as above):
It's all pretty good save for the faces. The girl probably came out best out of the three, the innkeep got the typical unibrow but the guy on the left has got a cartoonish face altogether (kinda reminds me of Adventures of Tintin ).
This was done with the scaling up with Sinc and back down with Bicubic before applying antialias as described above.
I also gave a go at some medium flats for a test (same procedure as above):
It's all pretty good save for the faces. The girl probably came out best out of the three, the innkeep got the typical unibrow but the guy on the left has got a cartoonish face altogether (kinda reminds me of Adventures of Tintin ).
-
- Posts: 71
- Joined: Mon Mar 11, 2019 9:13 am
- MrFlibble
- Posts: 411
- Joined: Sat Jan 27, 2018 10:43 am
Re: AI Upscaled Textures
After further testing I realised that using xBRZ, after all, produced better results at sprite edges:
(compare with the same group in the above post)
Additionally the resulting upscales are for some reason a bit sharper if xBRZ is used instead of xBR.
(compare with the same group in the above post)
Additionally the resulting upscales are for some reason a bit sharper if xBRZ is used instead of xBR.