AI Upscaled Textures
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: AI Upscaled Textures
HI Mason, Im here to bother you again
Can you please try to upscale these files? The stone borders will be easy, Im not sure about the arrows tho.
Maybe try one and if it doesnt work, I will have to recreate them in some other way...
Thank you! (yea, its just 6KB )
Can you please try to upscale these files? The stone borders will be easy, Im not sure about the arrows tho.
Maybe try one and if it doesnt work, I will have to recreate them in some other way...
Thank you! (yea, its just 6KB )
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
Phredreeke declined to share the scripts but kindly agreed to process the Daggerfall sprites using his method. I've been sending the results via PM to MasonFace but I think they could be useful to other folks here:
https://mega.nz/#!YmZy2AwS!7YG_poZMeDaA ... nhgUUJXhis
https://mega.nz/#!BrAREaLA!mplOHEB0a-5_ ... 1i4Od68OMY
http://s000.tinyupload.com/index.php?fi ... 6189185165
Please note that this is far from being complete. The sprites are scaled with an ESRGAN interpolated model (default * Manga109) with anti-aliasing pre-processing developed by Phredreeke to improve the results.
As for the possibility of models becoming useless, that's not true, if only because the sprites have a limited set of animation frames. In fact, scaling the sprites up makes the low number of animation frames very obvious.
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
Below are the upscaled UI elements. As expected, the arrows didn't turn out great. Should be easy enough for someone to do manually.Can you please try to upscale these files? The stone borders will be easy, Im not sure about the arrows tho.
https://drive.google.com/open?id=1Yk96Z ... yLnYyj6mwr
P.S., it would be easier for me if you could send all the remaining UI elements that you need upscaled in one go. It's easier to do it all in one batch rather than many small batches.
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
I've been comparing the results between his method and my own and they both seem to have their own unique strengths and weaknesses. I'll compare the results on a particularly difficult sprite frame (484_21-3).
I'll start with Phredreeke's:
His method doesn't seem to contour the outer edge of the subject as tightly as it should which leaves a pronounced black border around the subject. This wouldn't look bad if the border was a consistent thickness, but it varies along the edges.
If I grow his mask by 1 pixel and effectively undercut it, the black outline disappears, but some edges get misshaped and some thin bodies get detached (see top of the bow).
My method:
On the other hand, one of my methods trims the outline more aggressively, but in some cases it cuts portions out of the sprite body as well. This method also detached the top of the bow slightly.
I have another method that just selects the outer edge so that it doesn't trim inside the body, but it also misses all the "island" selections such as the area between the bow and the body, and between the subject's feet. On this sprite, it also misses the entire right hand side where the subject's elbow touches the right edge of the frame and its foot touches the bottom of the frame, effectively blocking the fuzzy selection from continuing to wrap around the subject's outer edge. This post isn't letting me attach the picture for some reason...
In all of the methods shown, you can see where the masks removed the small area between the satchel and the MOB's hip and of course the arrow is disjointed. I think these types of errors will have to be corrected by hand no matter what, so some other small post processing touch ups may not be a complete deal breaker.
Anyhow, none of these methods is proving to work perfectly in every situation which is making batching quite difficult. In this case, "Phredreeke's method undercut by 1 pixel" looks like it would be the easiest to clean up in post, but that may or may not be the case in every instance. I'll have to do more testing.
Last edited by MasonFace on Mon Mar 11, 2019 12:01 am, edited 1 time in total.
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
I've refined my method a little more and I'm now getting results similar to Phredreeke's; it's a little better in a few places, but has a few more jagged edges in other places and a little bit of black outline in some areas. Still not ideal...
Last edited by MasonFace on Mon Mar 11, 2019 1:48 pm, edited 1 time in total.
-
- Posts: 71
- Joined: Mon Mar 11, 2019 9:13 am
Re: AI Upscaled Textures
Hi, I assume your interest is in the masks and not the pre-processed sprites?
I did tweak the mask script a bit and this is the result, while the outline is still there it is hopefully a bit more even now.
A general word of advice is to expand the canvas prior to creating the mask, otherwise you risking part of the image "sticking" to the side of the frame.
I also feel that I should clarify that the masks themselves have not been created through any sort of neural network process.
I did tweak the mask script a bit and this is the result, while the outline is still there it is hopefully a bit more even now.
A general word of advice is to expand the canvas prior to creating the mask, otherwise you risking part of the image "sticking" to the side of the frame.
I also feel that I should clarify that the masks themselves have not been created through any sort of neural network process.
-
- Posts: 61
- Joined: Mon Aug 21, 2017 6:37 am
- Location: Australia
Re: AI Upscaled Textures
I have made a HD mouse pointer, i dont know the name to replace the original though.
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
Mr. Phredreeke himself! I want to thank you personally for your help up to this point. Your masking technique may prove be the best hope of getting this project moving towards completion. To answer your question, yes, I'm only having issues with obtaining a high resolution masking layer to restore the alpha channel after the upscale. Your latest result looks quite good! I'd prefer no visible outline, but as long as it is consistent as what's shown, I'm quite happy with it.Hi, I assume your interest is in the masks and not the pre-processed sprites?
Yeah, I've learned that the hard way, lol. I probably should have expanded the canvas prior to upscaling, too. If you look on the previous page, you'll see that the top of the giant's head flattened after upscaling.A general word of advice is to expand the canvas prior to creating the mask, otherwise you risking part of the image "sticking" to the side of the frame.
Yeah, I've been trying to understand how you went about it, but from your description of the process, I can't really infer much from how you upscaled the masking layer.I also feel that I should clarify that the masks themselves have not been created through any sort of neural network process.
Did you anti-alias the masking layer also? If so, how did you get sharp edges? Did you just increase the contrast?It's fairly automated, I put together a folder with images to be upscaled, this is then run through a number of scripts
1. creates a mask from the image in question
2. antialias the edges of the image, this is then fed to ESRGAN
3. the result of ESRGAN is run through a second script that sharpens, downscales and applies respective game's palette
4. finally, the mask from step 1 is applied to the downscaled image
- MasonFace
- Posts: 543
- Joined: Tue Nov 27, 2018 7:28 pm
- Location: Tennessee, USA
- Contact:
Re: AI Upscaled Textures
Your new cursor looks great! But this thread is about using artificial intelligence to upscale the original graphics.Th3AustralianGam3r wrote: ↑Mon Mar 11, 2019 10:33 am I have made a HD mouse pointer, i dont know the name to replace the original though.
Mouse Pointer Low Res.png
Mouse Pointer.png
As far as where to put the new image file, I'm not sure but I'd suggest taking a look at this thread: viewtopic.php?f=27&t=1650&p=19654&hilit=cursor#p19654
Also, download Daggerfall Imaging 2 and see if you can find the original cursor (check maybe the IMG archive?). https://www.dfworkshop.net/downloads/da ... l-imaging/
Once you have the record name, then rename your image to match, then you may be able to drop it in your streaming assets folder (you will need a subfolder in there for the correct archive, "IMG" for example). I've only really dealt with textures, so I'm not nearly as familiar with injecting new UI assts.
Good luck!
-
- Posts: 71
- Joined: Mon Mar 11, 2019 9:13 am
Re: AI Upscaled Textures
I antialias the image, followed by upscaling to create the mask, at the end I apply a threshold effect of 127 to make the mask binary
BTW, could someone put together an archive with all the images that need masks in the same folder? Currently I have them in subfolders, so I can't just create a single batch to run through them all.
BTW, could someone put together an archive with all the images that need masks in the same folder? Currently I have them in subfolders, so I can't just create a single batch to run through them all.