Sunday, February 16, 2020

Dungeon Siege - high resolution textures (ESRGAN) - Part 2



After more than 4 months of work I have uploaded the texture pack for Dungeon Siege that contains 3929 updated textures and is 5.97 GB large (compared to original 700 MB). All terrain textures have been updated, 750 world objects and decals, as well as bosses and some larger enemies and NPCs.

No custom textures have been used, everything is based on original textures. I think the new textures preserved the original look very faithfully. You can watch the comparison video on YouTube and download the texture pack on ModDB:



This is the first time I hit limitations of 32 bit programs. First when I went to pack the textures into dsres files (think of it like Dungeon Siege rar archives), the program would stop when hitting 4 GB. Then the game would not load dsres files larger than 2 GB. Luckily the game was designed to load multiple dsres files. It is surprising all this even works, considering the increase in size. One fun fact; game originally supported screen resolutions only up to 1024x768, but now many texture files themselves are larger than that at 1024x1024.

Probably more than 99.9% of textures were updated using the "Misc" model. "Misc" is a fantastic universal model, the author "Alsa" did an amazing job. Other models used were "Manga109Attempt", "Skyrim Wood" and "Ground". Manga109Attempt was used for things that are supposed to look cartoony, like paintings or carpets with colorful designs.

A lot of work went into fixing and tweaking the original textures in GIMP to prepare them for ESRGAN for optimal results. Original textures were often blurry, some were too pixelated, others had compression artifacts that would be further exaggerated when upscaling. Simple use of noise and denoise filters on original textures produced great results. Also some sharpening of original textures before sending it to processing can help a lot.

 Blurring pixelated parts and adding noise to original texture before upscaling improved poor original result.

Skyrim Wood model was useful in few occasions where the original texture was extremely grainy, this model gives a "grainy blur" result which worked well on few tapestry, some carpets and statues.
 
 Skyrim Wood model.

Sometimes models give good results for one part of texture, but fail in other parts. For the terrain around Fortress Kroth I had to cut the grass from the "Ground" model results and copy it over grass from the "Misc" model.


Adding a bit of HSV noise in GIMP to original texture can add a bit of detail in the final texture. In this example this helped making snow look less like shaving cream and more like snow. It is a very subtle difference. Adding too much noise would make it look more like sand.


In a completely opposite example denoising the swamp floor textures before using ESRGAN helped them look more like grass with leaves compared to original result that lacked any clear detail. Unfortunately for me GIMP denoising filter often creates dark spots in corners of the image, so I had to manually fix that for each texture, it was very annoying and time consuming.


To finish this on a positive note here is an example were the algorithm and the Misc model did an amaazing job without me doing anything. This is a very cery complex texture yet the ivy came out looking excellent, with defined individual leaves.