Jump to content

Deep learning rescale applied to PZ (Topaz)


Ayrton Orio

Recommended Posts

I have been using the same program as the rescale of FF7 (https://venturebeat.com/2019/01/28/final-fantasy-vii-hd-graphics-mod-makes-backgrounds-less-blurry-with-machine-learning/) to rescale some project zomboid sprites.

1 - this is probably silly to start with as many sprites probably stem from a larger artwork anyway

2 - This is essentially against the original art direction

3 - Sometimes it doesn't look great, sometimes it looks amazing in my opinion

4 - Topaz is not trained specifically for this task (pixel art to ... HR artwork i guess?)

Topaz test 8 copy.jpg

Topaz test 7 copy.jpg

Topaz test 5 copy.jpg

Topaz test 4 copy.jpg

Topaz test 3 copy.jpg

Topaz test 2 copy copy.jpg

Topaz test 1.jpg

Link to comment
Share on other sites

They seem to have a good look, especially the larger objects. Haven't thought of using it on the game, I'll give it a try myself and see what results i get. Thank you for the inspiration!

 

Edit: Added some photos enlarged by 4x (with Topaz A.I Gigapixel)

chair.PNG

fridge-AI.PNG

bbq-ai.PNG

books-AI.PNG

flowers-ai.PNG

locker-ai.PNG

machine-ai.PNG

water-ai.PNG

stove-ai.PNG

statue-ai2.PNG

statue-ai.PNG

Link to comment
Share on other sites

23 minutes ago, Ayrton Orio said:

Well done!

I was wondering if you could show aversion of the zoom at 400%? (so you get the pixel art unaltered on one side and a Topaz version at 100% on the other side? you see what i mean?

You mean zooming out at maximum (250%)?

Link to comment
Share on other sites

If you train a neural network to do the opposite, from HR artwork to pixel art you could get a pretty neat "pixel art" filter. 

dataset should be restricted to isometric art which could probably be detected through AI, I don't think the data is what is lacking anyway

 

Link to comment
Share on other sites

1 hour ago, sniperman1109 said:

This looks great! Will this eventually be a mod for the game?

I'm thinking about turning this proof of concept into a texture mod, but first i have to read up on how modding works for this game, as i have no clue how to reinsert the modified (larger) textures as of now.

It's still an improvement to upscale and then reduce them to their original size so i can use the PZ Unpacker to remake the .pack easily but i was hoping for a 2x size in textures at least (highly lossless compression applied of course)

Link to comment
Share on other sites

1 hour ago, Ayrton Orio said:

I'm not 100% sure, but it might get quite difficult to double or quadruple the texture size, it's not a matter of just changing the source tiles. 

Noticed that the hard way, the game will not accept larger textures than the ones already present. I tried making an up-scaled version then reduce it to the default size, they look better (especially the wood/metal furniture) but the texture edges don't blend in with each other. Not sure how to fix it for now and i don't have that much time to invest into it.

Screenshot (289).png

Screenshot (281).png

Link to comment
Share on other sites

actually i tried the upscale-->downscale method (bilinear smoother, sharper and nearest neighbour) and all it does is that the original model loses detail, on all accounts i thought the original artwork was better.

As for tile size, yes they are hard coded, and there might be many other things that relies on the tiles being a given size. I think it would be quite a hefty mod to make.

Lastly, the blending in between tiles doesn't work because you used anti aliasing in the making of your tiles which makes seams messy. If you check at the orignal tiles you will see that every tile is pixel perfect, that's why the seams are invisibile.

Link to comment
Share on other sites

7 minutes ago, Ayrton Orio said:

actually i tried the upscale-->downscale method (bilinear smoother, sharper and nearest neighbour) and all it does is that the original model loses detail, on all accounts i thought the original artwork was better.

As for tile size, yes they are hard coded, and there might be many other things that relies on the tiles being a given size. I think it would be quite a hefty mod to make.

Lastly, the blending in between tiles doesn't work because you used anti aliasing in the making of your tiles which makes seams messy. If you check at the orignal tiles you will see that every tile is pixel perfect, that's why the seams are invisibile.

Thank you for the tip about anti-aliasing, ill try and see how it goes.

The upscale helps a little with edges and wood grain as you can see in this comparison

left original / right upscale + downscale

orig vs upscaled.PNG

Link to comment
Share on other sites

I don't think it's a "just a mod" thing, if someone wants to do it there is quite a few obstacles to overcome:

- know the PZ engine inside out to be able to adress all the bugs that will for sure occur

- painstakingly long task of resizing (Topaz), cleaning up & fixing, transparency mask (i think topaz doesn't tapke in account transparency), then redifining tile size for all sprite (a lot of handwork i think)

- keeping up to date with PZ development as new sprites and textures are being added

 

i think it's a lot of work and maybe it's more a thing of "let's wait until the game is finished and stable development wise" and then let's plan what to do then. Also, you never know but the development team might revamp the way sprites are handled and make things considerably easier in the future.

 

 

Link to comment
Share on other sites

2 minutes ago, Viperel said:

The upscale helps a little with edges and wood grain as you can see in this comparison

I think you are right in the sense of wood veins being much more defined and smooth, for wood grain I think it makes all the grim disappear and makes wood look very slick. 

It's because of how Topaz works: to give you an example I was recently working on a resizing of an actual photography where the main subject was a man with a 5'o clock shave (grey, one day after you shaved) and the upscaled version looked very neat and detailed except for the beard shade that disappeared. I think the same thing is happening with the grim on the furniture tiles.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...