Noggog Posted December 12, 2011 Share Posted December 12, 2011 So, I was going through my texture packs and reducing the rediculous 2048x2048 textures down to 1024. As I was doing this, I noticed there were a few ways of saving these dds files (I'm using Photoshop with Nvidia's DDS converter): DXT1 - no alpha DXT3 - explicit alpha DXT5 - interpolated alpha I noticed a great deal of texture packs had textures that had absolutely -no- transparency saved in dds versions that support alpha masks (DXT3/5). Why is this an issue? Because supporting alpha masks increases their file size a good amount. A 2048x2048 texture in DXT3 is ~ 2.7MB, while a 2048x2048 DXT1 version is 2MB, a file size decrease of 25%(Not to mention: a 1024x1024 DXT1 is only .5MB, a file size decrease of 80% :tongue: ) Am I right in thinking that textures that are completely opaque can be saved as DXT1 to reduce filesize without any bad side effects?I've done some testing in-game, and this seems to be the case. I haven't noticed any strange anomalies. If so, a lot of these texture packs out there need to do some tweaking, because they're wasting user's precious FPS away for nothing. Link to comment Share on other sites More sharing options...
Ghogiel Posted December 12, 2011 Share Posted December 12, 2011 (edited) Depends on the texture obviously. Most normal maps will need to be DXT5 as their alpha channel houses the specular map< which you definitely want, and wouldn't matter if you are resaving it now after it was already saved at DXT3 previously.DXT3 has a specific use, it reducing the greyscale to 16 tones, in effect stripping 95% of the color information out of the channel, which is usually not wanted by texture artists, they usually make their map the way they want and preserving what's in it is a good thing. The diffuse maps though, usually have no use of alpha channels and should be a DXT1. There are a couple exceptions to that. Landscape textures have a blend map in their alpha channel, so everything in that folder pretty much should be a DXT5. the other reason would be if it is does in fact have a transparency map. Also you may have noticed the other annoying noob thing... no mipmaps. You want them. I have explained why a few times before. without getting technical it's just faster on your cpu and gfx card. And looks better. But your assumption is correct for the most part. It's an error. Everyone knows compression so I don't know if it is laziness or noobness. You math sounds wrong to me though... DXT3&5 2048x2048 should be 5.33MB The alpha channel is a full 8bit texture basically, as such always doubles the file size. DXT1 will be half that. DXT3&5 1024x1024 is 1.33MB and.... DXT1 will be half that. Edited December 12, 2011 by Ghogiel Link to comment Share on other sites More sharing options...
Noggog Posted December 12, 2011 Author Share Posted December 12, 2011 Hey, thanks for the feedback. As I've been doing my texture-comb, I've been saving any texture file that looks to have some transparency in it as DXT5 (as a lot of the landscape textures do). If it looks like the texture is 100% opaque coloring, I save it as DXT1. Ah yes, mipmaps, the GFX card uses the smaller versions as they're father away, and then brings the full version in as you get near? Am I correct in my understanding of their use? Are there any tradeoffs to not having mipmaps? Are there be any cases where they shouldn't be present? As for the math, I just took one of my 2048 textures, checked the filesize, did the save, and compared. 8\ Don't know what to say about it being 100% right in theory.I do know DXT1 is less by some degree, at least. Haha Link to comment Share on other sites More sharing options...
Ghogiel Posted December 12, 2011 Share Posted December 12, 2011 Ah yes, mipmaps, the GFX card uses the smaller versions as they're father away, and then brings the full version in as you get near? Am I correct in my understanding of their use? Are there any tradeoffs to not having mipmaps? Basically correct in their function. As for the trade offs, there are only down sides to not using them. If you do not use them, the engine has to sample a huge 2048 texture at run time, and often, to find the color pixels out of all millions of pixels, instead it could have been sampling from one of the mips that is pretty much very close to the size it wants to display... and actually with the mips it would be much closer to correct color and sharpness, would you believe that mipmaps premade in a powerful photo editing software are better than a game engine doing it on the fly? Anyway this pointless excess sampling actually increases the texture fill rate. And taxes both cpu an gfx. Plus if texture filtering isn't on it'll look like crap. Actually it'll look like crap as the LOD versions get resampled/swapped. you approach it, the engine sampled texture fake mipmap, will be extra jumpy when the full texture gets rendered. Link to comment Share on other sites More sharing options...
Noggog Posted December 12, 2011 Author Share Posted December 12, 2011 Yeah, totally makes sense. Until today, I've always just been assuming "texturer knows best" Sweet! I'm pumped to see the results once I'm done with my 1024x mipmap optimization. 8)Hopefully will gain a few sweet FPS numbers back Thanks a ton!We need to start having texturers do this themselves. >8( Link to comment Share on other sites More sharing options...
Recommended Posts