Authoring Icons¶
While all textures should be creating with the final DDS container in mind, bad authoring is by far the most obvious on icons. This is caused by the combination of cutout PNG renders with alpha channel and the block compression used in most DDS formats. In a nutshell, block compression reduces the amount of colors per 4x4 pixel block down from the original 16 colors to two main and two interpolated colors. The result is usually close enough for opaque blocks as to not be too apparent.
When the alpha channel is authored incorrectly, it throws off the color interpolation. By default, fully transparent pixel are exported as black color, so you waste color accuracy on the transparent pixels. The fix is to assign colors that are actually used in the 4x4 pixel block to all the transparent pixels.
Prerequisites¶
Install Gmic for gimp.
Authoring Instructions¶
- Copy your source layer and use curves or filters (Filters > Generic > Erode) on its alpha mask to remove as much white haloing on the outline as possible. You may not need to do this with your original, e.g. if it is a render and doesn't have haloing.
- Copy the result layer from Step 1 through G-Mic's Solidify filter.
- Merge the result layer from Step 1 down onto the layer from Step 2. Without the alpha channel disabled, it should look like this:
- Replace the alpha mask for Step 3 with the original alpha.
- Use the PNG export option to preserve background color.