AI Upscaled Textures

Show off your mod creations or just a work in progress.
Post Reply
BadLuckBurt
Posts: 433
Joined: Sun Nov 05, 2017 8:30 pm

Re: AI Upscaled Textures

Post by BadLuckBurt » Thu Mar 05, 2020 6:21 pm

King of Worms wrote:
Thu Mar 05, 2020 6:16 pm
Found the way to add magenta to backgrounds automatically, processing, than will do the AI upscale and send a results
Yeah, the reason I suggested magenta is because that's hardly ever used in graphics. A lot of old games actually used that for transparency. I'll await the fresh batch and test them, if they turn out right I'll post the batch file code here and explain how to use it. It's not complicated and the file path just uses the folder the batch file is placed in. As long as that folder contains a folder named 'transparent' you're good to go from there.

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI Upscaled Textures

Post by King of Worms » Thu Mar 05, 2020 6:34 pm

Great idea, Ive decided to run this whole process on all the exported images, which is over 12k files. Just adding the magenta is very slow, than the AI pass, I will also do a color denoising pass on that to get rid of some AI artefacts... so I think tomorrow I send a test batch, if my GFX card does not melt in the meantime. Thanks a lot :)

BadLuckBurt
Posts: 433
Joined: Sun Nov 05, 2017 8:30 pm

Re: AI Upscaled Textures

Post by BadLuckBurt » Thu Mar 05, 2020 6:42 pm

King of Worms wrote:
Thu Mar 05, 2020 6:34 pm
Great idea, Ive decided to run this whole process on all the exported images, which is over 12k files. Just adding the magenta is very slow, than the AI pass, I will also do a color denoising pass on that to get rid of some AI artefacts... so I think tomorrow I send a test batch, if my GFX card does not melt in the meantime. Thanks a lot :)
Cool, good to hear this is working out :) and the ImageMagick stuff will work too so there's light at the end of the tunnel :idea: :lol:

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI Upscaled Textures

Post by King of Worms » Thu Mar 05, 2020 8:39 pm

Man... :D

I have no idea why, but the magenta effed it in a strange way when a chain mail is being rendered?
Solid parts look good I guess.

Here is one armor part in all material variations. It has some parts solid and some chain parts as well, so we can see what happens when u remove that magenta maybe. But its strange :X
ESRgan.rar
(654.46 KiB) Downloaded 2 times
Some chain parts look like this
250_16-0_Ebony.png
250_16-0_Ebony.png (69.36 KiB) Viewed 92 times
Other look more solid
251_7-0_Dwarven.png
251_7-0_Dwarven.png (85.39 KiB) Viewed 92 times
No idea what happened there, the AI went batsh1t crazy :D
But MAYBE it will be good, u never know. Try removing the magenta, what happens pls

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI Upscaled Textures

Post by King of Worms » Thu Mar 05, 2020 8:48 pm

These parts are basically the same, but the AI did em in different way... thats just a AI joke I guess? :D
245_6-0.png
245_6-0.png (67.26 KiB) Viewed 89 times
246_6-0.png
246_6-0.png (69.94 KiB) Viewed 89 times

BadLuckBurt
Posts: 433
Joined: Sun Nov 05, 2017 8:30 pm

Re: AI Upscaled Textures

Post by BadLuckBurt » Thu Mar 05, 2020 8:57 pm

I know nothing of the AI upscaling or how it works but can't it just leave the magenta alone and work on the other colors? I don't understand why it thinks it has to darken it that much in certain areas. I have to increase the threshold beyond 50% and then this happens:
Spoiler!
Image

Image

Image

Image

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI Upscaled Textures

Post by King of Worms » Thu Mar 05, 2020 8:59 pm

Hmm... it works on a whole image, u cant do anything about that. I compared the same parts with magenta backgrounds to the same upscales I did with just alpha (which changes to black during the process) and the outlines of the magenta ones are all soft and non-defined.

It basically just destroyed it all :)

So now I can experiment with other colors maybe. Thats hellish

EDIT: tryed a blue shade I saw used some posts back and got same results :X

User avatar
King of Worms
Posts: 3055
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI Upscaled Textures

Post by King of Worms » Thu Mar 05, 2020 9:11 pm

Yea... so we are basically screwed. Any idea MasonFace?

BadLuckBurt
Posts: 433
Joined: Sun Nov 05, 2017 8:30 pm

Re: AI Upscaled Textures

Post by BadLuckBurt » Thu Mar 05, 2020 9:23 pm

You guys can probably judge this better than me but perhaps this is an option:

https://github.com/Krischan74/RTCWHQ

I found that link in this discussion: https://github.com/xinntao/ESRGAN/issue ... -489283540

User avatar
MasonFace
Posts: 417
Joined: Tue Nov 27, 2018 7:28 pm
Location: Tennessee, USA
Contact:

Re: AI Upscaled Textures

Post by MasonFace » Thu Mar 05, 2020 9:32 pm

I've been looking through past comments on this thread, around page 25 or so, about what we did to get the transparency back.

We tried a lot of different approaches, but for the MOBs, the only thing we ended up being able to do was to upscale the sprites with a dark background which did not contaminate the details with a radical bright color, and then Phredreeke upscaled all the outlines separately as simple black/white masking layers. The last step was to add this black/white masking image as the alpha channel of the upscaled sprite. I did this with an automated Gimp script. It was slow, but it did the job without any labor. I no longer have this script, but I could possibly rewrite it.

The problem is that I haven't seen Phredreeke around in a while and I never was able to reproduce his method of upscaling the masking layer.

_______________________________

My suggestion to try in the meantime is to upscale the vanilla image with a dark grey background. It should be mild enough not to contaminate the image, but distinct enough around most borders to be able to remove it afterwords.

If there is too much noise or the grey background gets feathered or otherwise muddled into various shades around the subject, then you might try a noise reduction filter, or reduce the color depth by posterizing so that the shades of grey converge and can be selected with a low threshold. I'm throwing around a lot of GIMP terminology here; hopefully Imagemagick can do something similar.

I don't think it will work, but it's worth a shot.


Update: Whoah, I haven't seen that upscaler before! I may have to give that a shot!

Post Reply