Duke4.net Forums: [RELEASE] Duke Nukem 3D Upscale Pack - Duke4.net Forums

Jump to content

  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[RELEASE] Duke Nukem 3D Upscale Pack

User is offline   Phredreeke 

#1

Similar to my Blood upscale packs, this pack uses neural network upscaling to upscale the game's original sprites. Unlike the Blood upscales this uses ESRGAN instead of Waifu2X for scaling. I've also prefiltered the sprites using an antialiasing script prior to upscaling. The masks for the sprites use a custom script based on said antialiasing script. The pack includes upscales of the original game's enemies (no strippers I'm afraid!) and the trooper and assault captain have had their armor palettes applied, and works for the Duke it out in DC expansion as well as the original episodes including The Birth. Enjoy!

Posted Image
Posted Image

Current Download Link (1.2): https://www.moddb.co...upscale-pack-12

All Upscale Packs: https://toiletsofbui...om/upscalepacks


Old Download link: https://files.fm/f/x46f58yt
20

User is offline   Danukem 

  • Duke Plus Developer

#2

This is really good, but I have a problem. Even with the extra palettes you supplied for the enemies, I lose too much palette information in my projects, since I take advantage of more than just the standard ones.

The good news is, when I tried using tilefromtexture, the upscaled sprites (at least those I tested) still looked good in Duke palette and worked perfectly with all the different palettes (10, 12, 16, 23, 49, etc), without the need for extra versions of the sprites. But there are two problems that would have to be overcome in order to use tilefromtexture instead of texture. One, the sprites are all 2X size. I would have to write some CON code that halves the xrepeat and yrepeat of the sprites at spawn time, and also make sure they don't become giant after resuming normal size from shrinking. That's actually very simple. But the second thing is, using tilefromtexture make new tiles based on the upscaled sprites from scratch, so it nukes all of the tile offset information, and there is a lot of it. So I would have to figure out what correct offsets would be on all of the upscaled tiles, and then apply that in the def commands. Still might be worth it, though!
2

User is offline   Phredreeke 

#3

Thanks. Yes, the palette problem is one I am unable to solve. If tilefromtexture could be made to work with larger sprites that would be great (and it would solve the other problem I had, that is the sprites remaining the same colors even underwater.

If there's any specific palette you want ask and I can probably make it (although I was unaware of there being a pal 49)
0

User is offline   Danukem 

  • Duke Plus Developer

#4

 Phredreeke, on 24 February 2019 - 11:53 AM, said:

If there's any specific palette you want ask and I can probably make it (although I was unaware of there being a pal 49)


I use Lezing's extended palette where there are about 100 usable palette swaps, which is why this is a pressing issue for me. :) Another aspect of the problem is that if the monster is in a sector that has a palette for lighting purposes, I want the sprite to reflect that. Again, this is solved by tilefromtexture
I am currently working on a hack.
1

#5

@Dan

CON side, I'd rather use EVENT_ANIMATESPRITES, having tsprxrepeat/tspryrepeat as half of sprite's xrepeat/yrepeat respectively. :)

I expect it will result in a loss of information in terms of correct sprite size in game, and a shrink/enlarge with "half the frame rate"; both due to division by 2. But i think is a FAST solution.
0

User is offline   Danukem 

  • Duke Plus Developer

#6

 RichardStorm, on 24 February 2019 - 12:52 PM, said:

@Dan

CON side, I'd rather use EVENT_ANIMATESPRITES, having tsprxrepeat/tspryrepeat as half of sprite's xrepeat/yrepeat respectively. :)

I expect it will result in a loss of information in terms of correct sprite size in game, and a shrink/enlarge with "half the frame rate"; both due to division by 2. But i think is a FAST solution.


But then the sprite will still be giant in gameplay terms, and only look normal size. This will cause a lot of problems, I think. For example, in my headshot detection code, I check the sprite's tiledata and it's actual yrepeat value. Also, it will not be able to fit into the same spaces so they won't move the same. EDIT: Just thought of another thing that will be messed up if you just change the tsprites and not the actual sprite sizes. Where a projectile comes out is hardcoded to be about halfway up the actual sprite, so if you simply make them look smaller in ANIMATESPRITES, the shots will be coming out of the top of the monsters's heads.

Anyway, my code is already done. The problem I have is now is that the upscaled monsters are immune to the shrinker for some reason.

This post has been edited by Trooper Dan: 24 February 2019 - 01:04 PM

1

#7

Right, forgot about that.

As for shrinker bug, maybe is something related with MAXSTRETCH and MINXSTRETCH (and Y counterparts)
0

User is offline   Phredreeke 

#8

wait... thinking about it, wouldn't tilefromtexture also make it compatible with the classic renderer? :) Thanks Dan!
0

User is offline   Danukem 

  • Duke Plus Developer

#9

 RichardStorm, on 24 February 2019 - 01:07 PM, said:

Right, forgot about that.

As for shrinker bug, maybe is something related with MAXSTRETCH and MINXSTRETCH (and Y counterparts)


It seems that the SHRINKSPARK is hardcoded to not set htextra on a sprite if the sprite is already below a certain size. I can see the blast hitting them and it even makes them spawn blood, but they won't shrink and their htextra is -1.

Since making the upscaled sprites appear normal requires reducing their x/y repeats by 50%, this apparently put them below the allowable shrinking threshold. So what I did was added a hack in EVENT_KILLIT, making the SHRINKSPARK check when it's about to delete whether an upscaled enemy is within SHRINKERBLASTRADIUS and then apply the hit to them so they will know to shrink. This works. The hardcoded bullshit is super annoying, though. What if I wanted a detailed enemy that has an xrepeat of 20 and I want it to be shrinkable? Not allowed, apparently.

 Phredreeke, on 24 February 2019 - 01:20 PM, said:

wait... thinking about it, wouldn't tilefromtexture also make it compatible with the classic renderer? :) Thanks Dan!



Yes, that's correct. I will have a test version of Alien Armageddon ready with this feature fully implemented within the hour.
0

User is offline   Danukem 

  • Duke Plus Developer

#10

Here's a link to a test version of Alien Armageddon that has the new upscaled sprites implemented via tilefromtexture:

https://www.dropbox....0_TEST.zip?dl=0

Disclaimers, etc: There may be bugs and it needs to be tested. Known bug: the upscaled tiles do not have offsets on them, and these will need to be added later. What this means is that many of them will appear slightly out of position. For example, when the enforcer fires you can see him moving side to side slightly. The code which implements the upscaled sprites in AA would be largely the same as used in vanilla, but there are differences. In AA, we use many alternate death animations which are at the normal resolutions, so I had to add some code to detect whether a sprite is in upscaled mode or not and adjust its size accordingly (which would not be necessary in vanilla since it would just stay upscaled). There is a hack for the shrinker working correctly, as I was saying above. It looks a little odd when they shrink, because to avoid them shrinking too fast I make them shrink every other tic. Also, this is based on our current build of AA which has some updates beyond what is publicly released -- however I removed new maps and art that would be spoilers.

EDIT: For anyone late to the party, here are the advantages of doing it via tilefromtexture. One, the upscaled sprites will work in the classic renderer. Two, they will work with all pals flawlessly, even if you use the extended palette. Three, it takes less space because you don't need special versions of the sprites for the different pals.

This post has been edited by Trooper Dan: 24 February 2019 - 02:25 PM

4

User is offline   Phredreeke 

#11

...I tested and just got the strangest glitch... one of the rail gun aliens randomly turned into a screen
0

User is offline   Danukem 

  • Duke Plus Developer

#12

 Phredreeke, on 24 February 2019 - 02:38 PM, said:

...I tested and just got the strangest glitch... one of the rail gun aliens randomly turned into a screen


I'm not able to replicate this and need more info. What renderer are you using? Was the alien shrunk and did it have any status effect on it such as burning? Did the screen act like the alien (i.e. was it actually still the alien but looked like the screen, or did it actually turn into a screen and then stop moving).

EDIT: Also I'm assuming you did a clean install and don't have art files conflicts with the AA ones. The alien in question uses tiles020 and is not even one of the monsters that the upscaling applies to.

This post has been edited by Trooper Dan: 24 February 2019 - 02:52 PM

0

User is offline   Phredreeke 

#13

It was just briefly, like less than a second, then it was back to its ordinary form. I don't think I did anything to it, but Bombshell might have (she ended up killing it afterwards)
0

User is offline   Danukem 

  • Duke Plus Developer

#14

 Phredreeke, on 24 February 2019 - 02:53 PM, said:

It was just briefly, like less than a second, then it was back to its ordinary form. I don't think I did anything to it, but Bombshell might have (she ended up killing it afterwards)


Most likely it was a bug in the animation transition code which had nothing to do with the recent upscaling stuff. I'll look into it.

EDIT: I've tried spawning dozens of them, with and without Bombshell present, and not once did any of them display as a screen. Since the code for that actor hasn't been changed recently and is well tested, I'm not sure what else I can reasonably do at this point. Do check to make sure you have a clean install, and if it happens again let me know.

This post has been edited by Trooper Dan: 24 February 2019 - 03:06 PM

0

User is offline   Phredreeke 

#15

No problem, I just downloaded the whole AA folder, unzipped it in its own folder and ran. I'll tell you if it happens again.
0

User is offline   Danukem 

  • Duke Plus Developer

#16

In addition to updating the AA test with fixes, I have put together a version of the Upscale Pack for vanilla that works the same way.

-now works by replacing the tiles with the upscaled ones in the native palette, so that all pal swaps work correctly
-for this reason it also works with the software renderer now
-all the offsets from the original tiles were copied into the defs, which is necessary now and was not before
-to make this work, the monster sprites had to be 1/2 the normal xrepeat/yrepeat, and that has various consequences for which code was needed (and supplied)

If you don't care about pal swaps and don't use the software renderer, then the version in the OP is better for you.

I am including my CON code below under a spoiler tag for those interested. It is also pasted into the supplied USER.CON

Spoiler

4

User is online   Lunick 

#17

Made a quick video showing the pack in action


6

User is offline   Phredreeke 

#18

of course the thumbnail shows the pigcop tank :)
0

User is offline   Striker 

  • Auramancer

#19

Instead of these hacks with CON and tilefromtexture, there really needs to be an 8-bit high res replacement token in DEF.

This post has been edited by Striker: 26 February 2019 - 10:46 AM

4

User is offline   Phredreeke 

#20

 Striker, on 26 February 2019 - 10:46 AM, said:

Instead of these hacks with CON and tilefromtexture, there really needs to be an 8-bit high res replacement token in DEF.


I would love that... also, it would extend usability to other Build games
0

User is online   NightFright 

  • The Truth is in here

#21

Agreed. As awesome as this is, it should require as little code modification as possible, also to avoid collision with other mods.
0

User is offline   Danukem 

  • Duke Plus Developer

#22

 Striker, on 26 February 2019 - 10:46 AM, said:

Instead of these hacks with CON and tilefromtexture, there really needs to be an 8-bit high res replacement token in DEF.


Yeah, that would be better. Case in point: I discovered a couple of bugs. My code doesn't work on the slimer or the upscaled enforcer jibs (I presume because they aren't actors), so those appear as 2X normal size. I have fixes for this in AA already but I'm not going to bother for the standalone version unless people actually want to use it. For a casual user the HRP method in the OP is better.
0

User is offline   Tekedon 

#23

 Lunick, on 25 February 2019 - 02:05 AM, said:

Made a quick video showing the pack in action




Looking very good :) should upscale the weapon first person sprites aswell.
0

User is offline   Phredreeke 

#24

Posted Image

Edit: if these look wrong to you... they should, because I just noticed I applied the wrong palette to them :)
Edit 2: Replaced it with the right palette The original (wrong one) is here if anyone want to behold my mistake lol

This post has been edited by Phredreeke: 26 February 2019 - 01:35 PM

7

User is offline   Danukem 

  • Duke Plus Developer

#25

If you are going to apply this to HUD sprites, I question whether it is worth it to keep it in Duke 3D palette, since those sprites don't normally change color (when they do it would be a sector based change that could be handled with tints). The white curvy lines on his hand in the chaingun image look bad, and I'm guessing are due to palette conversion.

EDIT: that comment was made before your edit!

This post has been edited by Trooper Dan: 26 February 2019 - 01:26 PM

0

User is offline   Phredreeke 

#26

Also, I'm gonna have to "disassemble" some of the sprites afterwards (as I inserted them on another sprite to provide context for the scaling)
0

User is offline   Radar 

  • King of SOVL

#27

Those HUD upscales are just stellar.

Perhaps they should also include the adaptations that were made for widescreen?

This post has been edited by Radar: 27 February 2019 - 02:16 PM

0

User is online   NightFright 

  • The Truth is in here

#28

If you want to play fullscreen, widescreen sprites would be a good idea. Even with EDuke32 tricks applied, one would see at least a bit of the cut-off Shrinker parts once you move/run with the weapon equipped.

This post has been edited by NightFright: 27 February 2019 - 10:52 PM

0

User is offline   Phredreeke 

#29

Yeah, I'm gonna process the widescreen edits used in cosmetic duke, here's the freezethrower

Posted Image
10

User is offline   axl 

#30

Wow, those images look really good !
0

Share this topic:


  • 8 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options