Jump to content

Using Deep AI to Retexture Sacred 2


Flix

Recommended Posts

That's pretty impressive. I have seen a few interesting models trained by coworkers for instance to read rust and dirt covered product numbers stamped into industrial products from bad quality images of these or detecting and categorizing street signs in real time and determined those to be actually good examples of practical and useful applications of this whole "black magic" ai-topic in real life, but creating details almost out of nothing in the context of a wonderful computer game makes me think this might be an even better personal favorite example for non-academic, actually graspable quality of life improvements made possible by algorithms... ;)

  • Like! 1
Link to comment
4 hours ago, Dax said:

I assume it works with S1 textures too. May I send some in?

I can take a look.  You could just make a list of the file names, since I have the S1 pak files extracted.

Link to comment
1 hour ago, Dragon Brother said:

Thats quite impressive. Is this a simple enough process to do Flix? As in just upload files somewhere and it gives you a link to download the upscaled images?

Yeah it is pretty simple for the modder, considering the results.  There are some state-of-the-art, high end programs like Topaz Gigapixel that can accomplish this, but I'm neither rich nor a pirate, so I just shelled out $6 to bigjpg.com

Steps:

  • bigjpg can't handle DDS files, so first convert the source texture file to a lossless format (I use BMP).
    • Note: You will lose the alpha channel and therefore transparency information. This means if there's already a layer mask you should remove it before converting.
  • Upload the BMP file to bigjpg.com and click "Start." You can upload multiple files at once.
  • Choose the size of the rescaled output. I typically choose 4x or 8x depending on how small the original image was.  I've yet to need to 16x.
  • Choose the amount of Noise Reduction. Typically you want it at "High" or "Highest" but sometimes for intricate textures you lose too much detail so may need "Medium" or even lower.  I've also spent some time merging multiple outputs with different noise levels by hand to get the best result.
  • Click "OK" to process a single image, or "Enlarge All Images Below" to do a whole batch with the same settings.  Then you can download the resulting JPGs.
  • Next you have to convert back to DDS format.  It may also be necessary to restore the alpha channel and any transparency from the original texture. I also spend time adjusting colors that may have been muted, lines that aren't quite straight, etc.
  • Sometimes I will also use a GIMP plugin to generate a new normal map, since bigjpg does not handle the game's original normal maps well.

And that's it!  There's a very limited version of the site you can use for free, which was enough to convince it was worth the 6 bucks for 2 months.

Link to comment
35 minutes ago, dimitrius154 said:

Very Interesting. I see some medium-level blurring introduced, is that adjustable?

Generally, the lower the "Noise Reduction" setting, the less unwanted blur and detail loss.  However, this also means more of the unwanted grain and other noise remains and becomes embedded in the image.  If an item is meant to look battered, worn and dirty, this noise may be ok.  For slick and shiny items with smooth, straight lines, I have to turn up the noise reduction more.  It's a constant search for balance.  In some cases I've tried merging multiple outputs, some with high noise reduction, some with little to none.

Some perceived differences in the above images may also be due to me generating new normal maps for some items.  I did this because the original normal maps for some items are very poor quality and cause noticeable jaggedness, even with the new diffuse maps.  I was unable to get the original normal maps to upscale. After converting back to DDS they had lost some information and resulting in the item being extremely dark in-game.

Even so, the proper normal maps are better at representing height and depth than anything I can generate with a plugin.  The white shield with blue orbs and gold inlays above is the best example of this.  With the original normal map, the gold inlays have more height, but the overall look is almost as jagged as the original picture, even with the new diffuse map.

Link to comment
22 hours ago, Flix said:

Yeah it is pretty simple for the modder, considering the results.  There are some state-of-the-art, high end programs like Topaz Gigapixel that can accomplish this, but I'm neither rich nor a pirate, so I just shelled out $6 to bigjpg.com

Steps:

<snip>

Very simple, I like it!

2 hours ago, Flix said:

Even so, the proper normal maps are better at representing height and depth than anything I can generate with a plugin.  The white shield with blue orbs and gold inlays above is the best example of this.  With the original normal map, the gold inlays have more height, but the overall look is almost as jagged as the original picture, even with the new diffuse map.

Ah that would explain it - there was only one thing I felt different (in addition to the improved texture quality), but I couldn't describe it but reading this explains it perfectly

Link to comment
1 hour ago, Androdion said:

I guess my question about this would be just how taxing the new textures are to the game engine. Is there any noticeable difference in the game engine's response with the same settings and upscaled textures?

None whatsoever.  The difference between loading the original 60kb texture and the new 600kb texture for a single weapon is negligible.  Most weapon textures are already that size or larger (1.33MB is pretty common for weapons with Elite enabled).

None of the new textures are going beyond a size that's already established in Elite Textures.  Basically those items that were stuck in "minimal" are now up to snuff with the other 90% of item textures.

Link to comment

Love this Ben. It's so elegant and razor honed on this game... targetting that remaining 20 percent to make them perfect... I love how the closer you are getting to this game...the more you "see" and want to elevate.

What a way to bring Sacred into the now :bounce: 

And... is there other possibilities with Deep AI?  I read about Topaz... fascinating

:)

 

ggoo

Link to comment
On 11/22/2020 at 8:44 PM, gogoblender said:

And... is there other possibilities with Deep AI? 

Oh yes. I'm convinced the only limits to the possibilities are our own imaginations.  It's advanced faster than anyone would have guessed.

Here's a bite-size video about the basic potential:

 

 

  • Like! 1
Link to comment

Re embedding... you're right.. I wasnt able to get the link to show as text while maintaining the link, but I placed youtube video in... I'll ask Schot to take a look at the code to see about mending this

:dance:

gogo

  • Thanks! 1
Link to comment

Amazing exploration Flix.  Right up my alley, haha.  One of my clients is heavily into the Topaz collection.  She calls on me to clarify things for her on occasion.  When first saw my client had bought Gigapixel AI I admittedly saw it as a gimmick to add onto her collection of Topaz products but as the software evolves it's becoming more and more useful.  And what great use you're making of it!  The reprocessed textures are much improved.  I'm most impressed by the first sword in your list.  Interesting that the flat gold lines going towards the tips of the blades became embossed in the up-scaled version.  It doesn't seem to me as though there was any embossing of those lines in the original.  Pretty cool stuff!

spacer.png     oQfqwJA.jpg

P.s.
Regarding the strange forum behaviour of auto embedding youtube links; try the follwoing:

  1. paste youtube link
  2. link becomes a video
  3. scroll down to just under the now embedded video
  4. look for the message "Your link has been automatically embedded.   Display as a link instead.
  5. Click on "Display as a link instead" to get rid of the embedded video and leave a link in it's place.

Somewhat annoying.  I know!

Link to comment
15 hours ago, Schot said:

The reprocessed textures are much improved.  I'm most impressed by the first sword in your list.  Interesting that the flat gold lines going towards the tips of the blades became embossed in the up-scaled version.  It doesn't seem to me as though there was any embossing of those lines in the original.  Pretty cool stuff!

It's been over 2 weeks since I first tried it and I'm still consistently impressed every time I get the results of a new batch.

About the embossing: I believe that is the result of improved normal maps.  Like the diffuse map, the original normal map was quite small, jagged, and low detail.  I couldn't upscale it, so I generated a brand new normal map in GIMP.  This is one instance where the generated normal map improves on the height and depth of the original details.

  • Like! 1
Link to comment
55 minutes ago, Flix said:

Well here's a longstanding wish of mine fulfilled - no more blurry and jagged Dragon Mage tattoo!  The DM has a large amount of very low-res equipment as well.  I'll probably be reviewing those textures for upscale candidates this week.

Before:                               After:

l5OPQD5.jpg   6r2Yniw.jpg

Its a pretty good difference, another nice elegant touch

... I can see, monsieur Flix, that this is simply the genesis of an enormous  beginning...

 

:superman:

gogo

  • Haha 1
Link to comment

Sadly, there are still many upscaling artifacts, while first 2 shields have changed awesomely, the fourth shield is looking even worse than original : it has lost it's volume, looking flat and very artificial

On 11/21/2020 at 8:27 AM, Flix said:

XbqsuEt.jpg     nKcthvQ.jpg

About dragon mage, well, I dunno, the AA of a modern card is doing all the necessary work:tongue::

Untitled.png

Edited by lacr
Link to comment

P.S. : in this game we are watching our characters from a great distance, so texture resolution is not that very important. I have recently started to play total war warhammer 2 and my first impression was "wow, what a graphics!", but after playing for some time, I have noticed that most of the time, I actually don't see all that coolness due to the distance of my point of the view and, practically, the game is looking like total war medieval 1(released in 2002 y.):D

Link to comment
7 hours ago, lacr said:

the fourth shield is looking even worse than original : it has lost it's volume, looking flat and very artificial

That's not the fault of the upscaling though.  That's me fooling around with normal maps since I haven't been able to upscale the originals yet. Later today I'll post what it looks like with the upscaled diffuse map and the original normal so it's a better comparison.

Almost all of the screenshots above have new normal maps that I generated so it's not always a bad thing. Sometimes the plugin just can't mimic the volume of the originals.

  

7 hours ago, lacr said:

in this game we are watching our characters from a great distance, so texture resolution is not that very important.

The "Default" texture setting would be appropriate for you then, I think.  If you're zoomed that far out then you'd likely be seeing the lower resolution DDS mipmaps anyway.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up