[RELEASE] Duke Nukem 3D Upscale Pack
#31 Posted 28 February 2019 - 01:26 PM
So how automatic is the upscaling process? Would it be feasible to do not only the sprites, but textures as well, ie all the art in the game?
#32 Posted 28 February 2019 - 01:43 PM
#33 Posted 28 February 2019 - 03:11 PM
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
There's actually an additional couple of steps I've used to add the small detail like bloodspatter, but it's rather complicated, but the above gives a fairly understandable picture of the process. For textures step 1 would be omitted, but in step 2 instead the edges would be slightly extended (either by mirroring or wrapping/tiling) to give context to both the antialiasing preprocess but most importantly ESRGAN.
Yes, it can be done to textures, I've got a folder of textures I've done as a proof of concept, HOWEVER, unlike the sprites a lot of them are going to need manual work (see the attached picture for a worst case example)
#34 Posted 28 February 2019 - 05:23 PM
#36 Posted 28 February 2019 - 07:13 PM
MusicallyInspired, on 28 February 2019 - 05:52 PM, said:
It had better not, or that would be a deal breaker. Imagine doing hand edits on thousands of images to make them tile properly, and then having to do that all over again every time the upscaling method is improved.
#37 Posted 28 February 2019 - 07:23 PM
This post has been edited by Mark: 28 February 2019 - 07:27 PM
#38 Posted 28 February 2019 - 11:27 PM
#39 Posted 01 March 2019 - 07:13 AM
#40 Posted 01 March 2019 - 07:45 AM
#41 Posted 01 March 2019 - 12:04 PM
Phredreeke, on 01 March 2019 - 07:45 AM, said:
#42 Posted 02 March 2019 - 01:15 AM
Lunick, on 25 February 2019 - 02:05 AM, said:
I just realised a thing (Phredreeke had kindly allowed me to check out the pack before the public release), the larger sprites kind of beg to have more animation frames too (like Smooth Doom or whatever that project is called). E.g. take a look at the Enforcer firing at 0:25, it feels sorta jerky. But that would require quite some work yet.
Basically ESRGAN did some very good job on scaling the sprites up, and Phredreeke refined the method to get proper sprite masks almost to perfection. However some manual touch-up could still be used on some frames, there's some colour bleeding out into wrong areas, e.g. the Trooper's eyes have some pixels off in certain frames:
Also some detail on he sprites gets blurry at some angles. For example, the claws/spikes on the Octabrain are sort of not pronounced enough in certain frames.
Pretty sure that an artist of Cage's calibre could fix that in no time (provided there was time and willingness to spend effort on this).
Phredreeke, on 28 February 2019 - 03:11 PM, said:
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
If you could share the exact scripts that you use that would be of great help to other gaming communities like Daggerfall Unity who are also doing sprite upscales with ESRGAN.
#43 Posted 05 March 2019 - 04:31 AM
However, I still got issues with tiles with text on it such as this and the order sign above.
If anyone wish to take on the role of "fixing" such problem tiles please either DM me or reply in this thread. (this also applies to Blood as well as potentially other Build games once we got an adequate source port)
#44 Posted 06 March 2019 - 06:46 AM
If yes, have you considered cropping the outline of each sprite by one pixel and pasting this over the anti-aliased version to keep the edges anti-aliased while everything else remains sharp? Perhaps that would save you the need to sharpen the image in post-processing, which is a step I'd personally like to avoid as it might result in colour distortion (like what we observed on the border areas between colour-swappable blue and skin colour on the Trooper and dancers).
#45 Posted 06 March 2019 - 07:39 AM
The neural network upscalers are trained on images downscaled with bicubic filters. This is not representative of the graphics being upscaled. I am not able myself to train a model based on pixel graphics, so instead I alter the source image to look like what the neural network would expect had it been downsampled from a larger resolution original.
IMO the artifacts of the sharpening filter outweighs the artifacts from not preprocessing.
#46 Posted 21 March 2019 - 04:20 PM
Phredreeke, on 05 March 2019 - 04:31 AM, said:
This pack fills an ugly little gap in the HRP: decorative wall-aligned textures which show up as models and usually need to be notmd'd via maphacks. Now we have something better than the original ART that used to show up instead. Quite an improvement for just a few extra MB.
Therefore I'd like to ask you to process the Duke ART (1405ff) for this purpose, too.
#47 Posted 22 March 2019 - 12:11 PM
I'm a bit confused over what you're asking for. You want upscales for the sprites that the HRP replaces with models?
#48 Posted 22 March 2019 - 01:11 PM
Phredreeke, on 22 March 2019 - 12:11 PM, said:
Yes, because of this:
Phredreeke, on 22 March 2019 - 12:11 PM, said:
15 years of HRP, 4 years since v5.4, and no new release on schedule - we're not exactly in a hurry here.
#49 Posted 22 March 2019 - 01:34 PM
This post has been edited by Mark: 22 March 2019 - 01:40 PM
#51 Posted 22 March 2019 - 02:21 PM
At one point I had a setup with Blender and an MD3 importer that actually supported animations and UVs, and I used it to render the HRP's images of all the pickups for use in EDuke32's HUD. You could do that for these cases too.
#52 Posted 22 March 2019 - 02:32 PM
#53 Posted 22 March 2019 - 03:07 PM
Hendricks266, on 22 March 2019 - 02:21 PM, said:
#54 Posted 22 March 2019 - 03:10 PM
I know how frustrating it is not to get a new HRP for so long, but you shouldn't mix styles for the sake of filling gaps. We ran out of people who want to provide custom made content, but you can't just run stuff through filters now, even if manual adjustments are added. It's different approaches that don't fit together. HRP entries need to be done from scratch.
This post has been edited by NightFright: 22 March 2019 - 03:27 PM
#57 Posted 22 March 2019 - 04:01 PM
#58 Posted 22 March 2019 - 05:36 PM
Phredreeke, on 22 March 2019 - 04:01 PM, said:
NightFright, on 22 March 2019 - 03:10 PM, said: