Difference between revisions of "Choose the right DXTC compression algorithm"

Byline removed
imported>DragoonWraith
(byline)
imported>QQuix
(Byline removed)
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Byline}}


[[Category:Modeling_and_Texturing_Tutorials]]
[[Category:Texturing_Tutorials]]
[[Category:Tutorials]]
[[Category:Tutorials]]
--[[User:Blade9722|Blade9722]] 07:33, 23 November 2006 (EST)


{{Tools|req0=(re)texture tools}}


=Preface.=
=Preface.=
Line 22: Line 21:
if the alpha channel is set to 1 (white), RGB channels store usual color info. Instead if the alpha channel is set to 0 (black), upon saving the texture RGB channel are set to 0 as well. In other words, each pixel could contain color info only if the alpha channel is set to white.  
if the alpha channel is set to 1 (white), RGB channels store usual color info. Instead if the alpha channel is set to 0 (black), upon saving the texture RGB channel are set to 0 as well. In other words, each pixel could contain color info only if the alpha channel is set to white.  
This makes a sense, as a black alpha channel usually means that the pixel is completely transparent (invisible), so there's no need to store color info.
This makes a sense, as a black alpha channel usually means that the pixel is completely transparent (invisible), so there's no need to store color info.
This algorithm is tipically used for icons, decals, blood, tatoos, i.e. texture with a completely transparent part.
This algorithm is typically used for icons, decals, blood, tatoos, i.e. texture with a completely transparent part.


Instead, DXT1C is often described as "RGB texture withouth alpha channel". This is not true: the alpha channel is still present, but is completely white. Actually, there's no physical distinction between this and DXT1A, simply upon choosing DXT1C as compression algorithm the alpha channel is set to be completely white just before saving. This is tipically used for common completely opaque textures.
Instead, DXT1C is often described as "RGB texture withouth alpha channel". This is not true: the alpha channel is still present, but is completely white. Actually, there's no physical distinction between this and DXT1A, simply upon choosing DXT1C as compression algorithm the alpha channel is set to be completely white just before saving. This is typically used for common completely opaque textures.


==DXT3==
==DXT3==
Line 47: Line 46:
'''The most common mistake is this: some modders probably thinks that DXT5 is increasing RGB visual quality, so they systematically use it without caring whether alpha channel is used or not'''
'''The most common mistake is this: some modders probably thinks that DXT5 is increasing RGB visual quality, so they systematically use it without caring whether alpha channel is used or not'''


==Uncompressed dds==
==Uncompressed dds (8.8.8.8 Unsigned)==


Channels bit depth: 8:8:8:8 RGBA.
Channels bit depth: 8:8:8:8 RGBA.
Line 53: Line 52:
Well, I think there is no need to explain this.
Well, I think there is no need to explain this.


Sometimes useful if you really want to avoid compression artifacts in a normal map, but be careful because the file size will be huge.
Sometimes useful if you really want to avoid compression artifacts in a normal map, but be careful because the file size will be huge.  On normal maps, if no compression-introduced artifacts are already present, you can afford to reduce the texture size to a smaller one and still maintain a quality normal map.


=Texture Types=
=Texture Types=
Line 78: Line 77:


'''If it's a landscape texture'''(i.e. is inside the textures\landscape folder):
'''If it's a landscape texture'''(i.e. is inside the textures\landscape folder):
I'm not 100% sure about that, but it seems the alpha channel is useless, as tranparency info is stored directly in the esp. So I recommend using DXT1. This even if in some Bethesda landscape textures alpha channel is present, as (courtesy from Qarl who discovered this) it seems it's only because they are a copy of other mesh related textures, where the alpha channel is really used.
the alpha channel is usualy not needed. However, some objects (mostly big rocks) do use landscape textures with alpha, so if you're modifying an existing texture you should keep the alpha if it already exists. If you don't need alpha, I recommend using DXT1.
 
*NOTE: If using the '''OVEP/OBGE Detailed Terrain shader''' mod (http://tesnexus.com/downloads/file.php?id=15245), the alpha channel is used in improving terrain transition blending.


'''If you don't know how or simply don't have time to check this''':
'''If you don't know how or simply don't have time to check this''':
Line 86: Line 87:
(identified by the _n.dds suffix)
(identified by the _n.dds suffix)


'''RGB Channels''': store the normal map info
'''RGB Channels''': store the normal map info.  Red stores X-axis changes from left to right in height (white = lowering, dark = raising, 50% gray = flat).  Green stores Y-axis changes in height in a manner similar to the Red channel but from top to bottom.  Blue stores Z-axis changes in height (white = steady, grays = change)


'''Alpha Channel''': if specular map is enabled, stores the reflectivity info (white: shine, Black: dull)
'''Alpha Channel''': if specular map is enabled, stores the specular highlighting info (white: shine, Black: dull)


'''How to enable specular mapping''':
'''How to enable specular mapping''':
Line 105: Line 106:


'''Alpha Channel''': from my knowledge, is never used, so I recommend using DXT1 in all cases.
'''Alpha Channel''': from my knowledge, is never used, so I recommend using DXT1 in all cases.
==See also==
*[[DDS_Files]]
*[http://tesalliance.org/forums/index.php?/topic/1139-guest-speaker-texturing-101-by-vince/ Texturing 101] at TES Alliance
Anonymous user