Disclaimer: I'm not actually a texture artist myself, though I have some limited experience manipulating textures (re: MMM), so those more knowledgeable than me please feel free to chime in!
The Problem
```````````````
There are so many texture mods of all makes and models that have been released so far, some them fantastic and very professionally made. However I noticed, delving into the files, that some of them have textures saved in the wrong format, while others often forget mipmaps. And given Skyrim is already more demanding memory wise than its predecessors, it's more important than ever to keep an eye on memory usage when using texture mods. Unfrotunately texture mods, especially large ones, if saved using the wrong format can waste a lot of valuable video memory real estate.
When video memory reaches its limit, textures are streamed from main memory causing a huge performance loss. There may be users playing now with texture mods that don't realise the sudden FPS jumps and stuttering they're experiencing are due to taxed video memory on their cards.
But it's not just performance that takes a hit. Visual fiedilty can be sacrificed in order to stay within the limits of video memory. Users are told to run at a lower resolution, or turn down their AA, to recover performance -- but if the problem is a poorly packaged texture mod pushing you past your card's limit, then there may not be a need to do this at all. And if you're an author, keep in mind that if your mod is too demanding people may elect not to use it -- and if you made it to be shared and used, you're losing out from having your work bringing joy to the denizens of Skyrim (read: everyone!)
The Example
```````````````
How important is the correct format? By way of example I'm running a good 30 odd texture mods -- some are large replacers (landscape, NPCs, clothing, armor, weapons for example) while others focus on particular areas (objects, architecture etc). I've selectively chosen them to keep within my video card's memory limit -- 1536MB (Nvidia GTX 580).
Now there are a lot of amazing texture mods on Nexus, but a fair few I've seen so far don't always use the correct texture formats. A high-profile and popular mod (and I don't mean to single you out Chris!) that's done this is Chris2102's Whitrerun HQ Texture Pack.
By default this weighs in at 226M zipped, 487M uncompressed. However for whatever reason, while Chris has saved his textures containing an alpha layer and normalmaps correctly as DXT5, there's a large number of textures without alpha also saved as DXT5 when they can be saved as DXT1 for a significant memory saving. Re-compressing Chris's mod using DTX1 where needed gives us:
- Default -- 487M
- Recompressed -- 362M
And that's just with one mod.
Two other examples I've come across inlcude HQ Towns and Villages where recompressing DXT5 textures without alpha to DXT1 netted a 17M reduction in size (which, given all these textures are used at once, is a saving of 17M in-game) and the Blunt Weapon Enhancement Pack which goes from 90M to a tiny 12M, saving 78M -- here, you might not have all the blunt weapons loaded at once but each one gets a saving of around 3M, so if four different blunt weapons are loaded in a cell that's 12M saved. And, of course, the savings from each of mod add up.
Now before you get too excited, some of the major overhauls -- including the gigantic Skyrim HD and Vurt's Skyrim Flora are both compressed correctly, and there's no savings to be made. But I have, at least in my list, about 18 texture mods -- of just those that I've chosen to download -- that I found I could recompress to gain valuable video memory back.
As an aside, these are all factors that affect video memory usage in addition to textures being loaded:
- Resolution
- Anti-aliasing
- Transparency anti-aliasing
- Triple buffering
- SSAO
- Skyrim: uGrids and extended range tweaks
- Post-processing mods like ENB
The Solution
```````````````
So if you're a texture modder, what are the guidelines to follow?
- Remember to generate mipmaps (these help reduce GPU load)
- Save textures as DXT1
- Save textures with alphas as DXT3 or DXT5
- Save normalmaps as DXT5
- If you've uploaded a texture mod already, and you're not sure about the formats you've used, please check it and re-upload the mod if necessary.
Again my forays into texture creation are limited, so any input from the experts is welcome here -- for example what about bump maps? Specular? Can normal maps be compressed as DXT1 if they have no alpha? Please share your expertise!
Incidentally, I've been using AMD's The Compressonator to examine textures, generate mipmaps, compare textures and of course recompress them. It's a brilliantly easy tool to use, and its image comparison feature esepcially is fantastic (you can see at a glance what impact different compression levels will have). While I can't confirm this, from what I've read it apparently also produces better quality compressed textures than Nvidia's DDS tools, but I'll leave that for the experts to debate.
The Solution Ver 2 (kinda)
``````````````````````````````
Ethatron has released his DDSOpt tool which does a great job at picking up and fixing (by re-compressing a texture or a normal map correctly) some of the issues discussed above. It also has an excellent mipmap generator that adds higher levels of details in the mipmaps, leading to even better texture quality at mid to long ranges.
So -- for users users and especially texture authors -- you can run DDSOpt to optimise textures to be correctly saved in the right format, and thereby reduce VRAM usage. It is still in development however, so if encounter any odd results please post in the http://www.gamesas.com/topic/1330264-ddsopt-of-use/.
-----> However, there is a large caveat <-----
DDSopt can correctly re-compress textures and can sometimes pick up minor issues such as unnecessary alpha channels, but it is not a silver bullet to magically make all your textures perfect. It cannot fix errors in textures and alpha channels created (however inadventently) by the texture author. Things like left-over borders, stray pixels in alpha channels and a whole bunch of stuff that actual texture artists could probably mention that I can't.
In other words, if you make and upload texture mods DDSOpt can help you ensure your textures are properly saved with the most optimal DXT compression format, but it cannot fix problems with textures, alpha channels and normal map generation. This is up to you to get right first time before you upload the mod -- and unfortunately, while testing DDSOpt with Ethatron, there are a lot of mods that have these sorts of issues and as a result DDSOpt can't optimise them. So if you're a texture author, please check your work
DDSOpt can be http://www.skyrimnexus.com/downloads/file.php?id=5755.
Thankyou for reading.
isoku chimes in:
MadCat221 adds:
teanandcigarettes says:
Ethatron adds:
Huleed gives the straight dope:
Resources
````````````
The Compressonator -- http://developer.amd.com/tools/compressonator/pages/default.aspx
Oblivion DDS guide -- http://cs.elderscrolls.com/index.php/DDS_Files
Wikipedia on DXT modes -- http://en.wikipedia.org/wiki/S3TC
Generating normal maps (thanks to teaandcigarettes) -- http://wiki.polycount.com/NormalMap
More on DXT formats (thanks to teaandcigarettes) -- http://wiki.polycount.com/DXT
Another good read on DXT formats (thanks to Phitt) -- http://www.fsdeveloper.com/wiki/index.php?title=DXT_compression_explained
How to choose the right DXT compression (thanks to Thottlekitty) -- http://cs.elderscrolls.com/index.php/Choose_the_right_DXTC_compression_algorithm
Normal map workflow (thanks to Thottlekitty) -- http://www.poopinmymouth.com/tutorial/normal_workflow.htm
Combining normalmaps (thanks to Thottlekitty) -- http://www.rodgreen.com/?p=4
Throttlekitty's Keep Details profiles for Photoshop -- http://www.tesnexus.com/downloads/file.php?id=11817
DDSopt by Exatron -- http://www.gamesas.com/topic/1330264-ddsopt-of-use/