• Announcements

    • HEAVY265

      Crs Wants You!   01/18/2019

      CRS is looking for some volunteer live support chat staff.  Are you up for the assignment?  If so,  please send an email with your interest to,  Jobs@corneredrats.com
markec

Rats can easily improve the graphics with an open source upscaler ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks)

149 posts in this topic

Hello, i'm a long time lurker, I registered to make everyone aware and especially the developers of an open source upscaler called ESRGAN (Enhanced Super-Resolution Generative Adversarial Networks). What it is? Basicaly it's 'zoom and enhance'.

It can be used to greatly improve low quality textures.

I don't have access to direct textures, so I took a screenshot of a texture in-game, and then enhanced it to 4k with ESRGAN, the difference is obvious. Imagine if I can achieve such result with just a screenshot, what could the devs achieve with their original textures.

Here is the helmet texture I used

V3N98RE.png

 

After ESRGAN

 

Hd5beBA.png

 

 

 

 

Full enhancement

 

8vwYSXm.jpg

 

 

 

 

What the devs would need to do? All they have to do is run all of their textures through ESRGAN (or SFTGAN which is a different version) and then put them back into the game.

 

links:

ESRGAN - https://github.com/xinntao/ESRGAN

SFTGAN - https://github.com/xinntao/SFTGAN

tutorial on how to use ESRGAN/SFTGAN - https://kingdomakrillic.tumblr.com/post/178254875891/i-figured-out-how-to-get-esrgan-and-sftgan

Share this post


Link to post
Share on other sites

Very interesting Markec. I and several other team members have shared this with the team leaders to investigate and see if this is a viable option for us with updating some of our legacy textures.

Thanks for the heads up! S!

3 people like this

Share this post


Link to post
Share on other sites

very smart and hopefully do-able. thank you for the very specific, positive recco and examples. S! 

Share this post


Link to post
Share on other sites

I was under the impression the bulk of the vehicles were created at extremely gorgeous artwork and were 'dumbed down' to fit the graphics card budget.

 

So wouldn't you start with the already top end source and just create a higher fidelity version as higher qualities are desired?

 

I could see common other textures benefiting from this if they weren't done to the higher standards originally.

Edited by Kilemall

Share this post


Link to post
Share on other sites
13 hours ago, Kilemall said:

I was under the impression the bulk of the vehicles were created at extremely gorgeous artwork and were 'dumbed down' to fit the graphics card budget.

So wouldn't you start with the already top end source and just create a higher fidelity version as higher qualities are desired?

I could see common other textures benefiting from this if they weren't done to the higher standards originally.

Not even close.

I don't even remember what the top of the line video card was when we started this, but we had a very limited poly budget at the time. A few vehicles and terrain objects have been reworked over the years, but with the exception of a few newer models that do have higher resolution texture maps, nothing has happened to the bulk of the texture maps over the years besides being converted from bmp to dds.

As an example, the last terrain build Doc did was 2012, and it didn't make it into the game till just this last year with Merlin, Sniper, and Frisbone's dogged determination to figure out how to make it happen. So that's a good timeline with nothing being done terrain wise in all that time. That means the majority of the textures covering all the octets making up a supercell on the ground are likely 256X256. The airfields, the entire airfield square 256X256. ALL the objects on the terrain probably the same (not counting new bunkers and barracks). Vehicles? The same as well except for the latest few, Bmbm would probably have a better idea.

I think what you might be thinking of is the new infantry and small arms models. Those are incredibly high poly and "baked down" enough not to bring the client to its knees, and that goes for the new crewmen on the towed guns that have been replaced as well. If you want another good example vehicle wise, go look at any of the ships in external view, or at any of the crewmen or pilots in the vehicles. Most of that is original artwork.

So yeah. This could be an amazing gain for the game for a little amount of work. Score! :)

Share this post


Link to post
Share on other sites
Quote

That means the majority of the textures covering all the octets making up a supercell on the ground are likely 256X256

 

 

Oh man you guys are in for a treat !

With this you can make even 8k and 16k texture if you so desire, because ESRGAN/STFGAN  adds detail to every enlargment just like a real artist. So just enhance the enhancement and then enhance it again to whatever texture resolution you desire / looks best. There is no limit to what texture size you can make. :)

 

So yeah. This could be an amazing gain for the game for a little amount of work. Score!

:)

Yeah exactly :)

Edited by markec

Share this post


Link to post
Share on other sites
4 minutes ago, markec said:

 

Oh man you guys are in for a treat !

With this you can make even 8k and 16k texture if you so desire, because ESRGAN/STFGAN  adds detail to every enlargment just like a real artist. So just enhance the enhancement and then enhance it again to whatever texture resolution you desire / looks best. There is no limit to what texture size you can make. :)

can it work with DDS format, or does it require converting to PNG or other format 1st?

Share this post


Link to post
Share on other sites
3 minutes ago, Merlin51 said:

can it work with DDS format, or does it require converting to PNG or other format 1st?

Yea I think it needs to be a picture,  jpg, png. I was enhancing a png.

Although don't quote me on that, I did not try a .dds :)

Edited by markec

Share this post


Link to post
Share on other sites

Here is a texture comparison from Just Cause 2 of ESRGAN and STFGAN, so you guys need to check out which one would be the best for you :)

 

ESRGAN

lb5FAre.jpg

 

 

SFTGAN

 

vuzl3UU.jpg

Share this post


Link to post
Share on other sites
2 hours ago, HATCH said:

I don't even remember what the top of the line video card was when we started this, but we had a very limited poly budget at the time. 

That's EASY... The Voodoo 5 5500! j/k

Probably the GeForce 2 GTS/Ultra.

Share this post


Link to post
Share on other sites
3 hours ago, HATCH said:

Vehicles? The same as well except for the latest few, Bmbm would probably have a better idea.

Largest texture atm is 2048x2048. If we could double or quadruple that it’d be neat, tho at the cost of a heftier DL. Not sure how much the current engine can take wrt loading, so erring on the side of caution.

Share this post


Link to post
Share on other sites
6 hours ago, HATCH said:

I don't even remember what the top of the line video card was when we started this

had to be voodoo3 as the original geforce1 wasn't fast. at launch, geforce3 had likely just hit the market.

everyone's cell phone has a GPU significantly more capable.

3 people like this

Share this post


Link to post
Share on other sites
Quote

ESRGAN/STFGAN  adds detail to every enlargment just like a real artist. So just enhance the enhancement and then enhance it again to whatever texture resolution you desire / looks best.

This is getting to be a pretty long thread, but I haven't seen any technical explanation yet of how these programs operate so that the image changes they make are positive contributions to the original artist's creation of a realistic depiction.

I appreciate that as they upscale they're doing a lot of sharpening, so that what otherwise would be a smooth gradient now is a minimal gradient, a sharp edge and another minimal gradient. That's just mechanistic, though. 

In this game in particular, maybe just that change would be useful, because the existing 2k x 2k and smaller textures are sometimes displayed close up, way overzoomed for their resolution.

But, a further problem with 2k x 2k or smaller textures that are going to be displayed close-up is that the original artist had to average-out the realistic detail finer than the original texture could represent. It's that finer detail that needs to be added in during a process of moving to higher res textures. The statement above says that ESRGAN/STFGAN will do that. How does that work?

Edit:  https://github.com/xinntao/ESRGAN/blob/master/README.md seems to say that this is "just" a very well engineered upscaler/sharpener. No negative spin intended...it's excellent at what it does...but it doesn't add detail. It only sharpens what the original artist put there so it doesn't look so bad when displayed larger than the perceptual limit of the original resolution.

Edited by jwilly

Share this post


Link to post
Share on other sites
24 minutes ago, madrebel said:

Yes, noted.

As I said above, this doesn't "add detail to every enlargment just like a real artist".

It "just", via excellent engineering, upscales and sharpens the detail the original artist / image creator put into the original-limited-resolution image. 

That by itself is a very useful capability. It takes an image that looks like a wetted watercolor at excessive zoom, and makes it look much better.

Adding new content to the modified finer-resolution image though, so it will look realistic when displayed at high zoom, is not described as part of the program's functionality.

Assuming that a decision is made to enlarge the size of the downloadable to include larger textures, I think the question is: is the improvement from ESRGANing the low res textures enough less work to justify that the result is not fully realistic?

Or, when a higher resolution file exists from the original artist's creative work and that file originally was downscaled to make the low res texture that's been in-game, would it be an unfeasibly greater amount of work to find that original artist's high res file and create the larger game texture directly from it?

Edited by jwilly

Share this post


Link to post
Share on other sites

Of course, it's never going to add detail, it can only use what data is already in the image but it could still improve things until we can get an artist to create new textures.

3 people like this

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.