I've noticed something about some of the texutre mods uploaded to Nexus. This post is to draw attention to good texture mod packaging practices, and generate discussion on techniques artists can use to create such mods.
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
A saving of 125M -- and remember
no image quality is lost. DXT5 and DXT1 look the same, DXT1 just doesn't store alpha. If we presume the majority of these textures are loaded while walking around Whiterun, and if you're already at your video card's memory limit, not only would this prevent stuttering caused by taxed video memory, but it would also leave enough video memory to go from using no AA at all to 8xAA, or enabling SSAO, or using a mod like ENB. Or simply having more video memory to be able to use more texture mods!
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
Look at this list as a trade off to what you can and can't have if your video memory is approaching its limit -- let alone the use of more texture mods as well. Thus, there's tremendous benefit for texture mod authors to correclty compress and package their mods -- it not only allow users to use your mod in the first place, but as an author the smaller file sizes means it's quicker to upload too. Win!
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
And
- 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.
Deathb0rn has conviniently linked a table of common texture volumes with the resulting file size after compression at various DXT levels -- this way you can usually tell what compression a texture has by its size. http://i255.photobucket.com/albums/hh122/deathb0rnwc3/Skyrim/ResolutionsandCompression.jpg The only thing to add to this is that when a texture is lacking mipmaps, it's usually 33% smaller than the sizes you see in the table.
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.
isoku chimes in: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