3Dc Normal Map Compression
![]() |
![]() |
32 bpp normal map
- For a 32 bpp normal map each element contains 8-bit x, y & z normal vector co-ordinates which are then converted in Red, Green & Blue values respectively (Alpha channel goes unused)
- 3Dc operates on 4x4 blocks of integer data, resulting in 512-bits for the total block
- Discard the Z values, which can be recalculated later in the shader (z = √ 1 - x2 - y2 )
- Determine the minimum and maximum values for both the x and y values within that block
- Calculate 6 intermediate values between the min and max values for both x and y
- For each data element chose one of these 8 values that most closely matches original value, thus reducing each channel to 3-bits, hence the total for the compressed block =128-bit (96-bits for intermediate values and 32-bits for x & y min & max), resulting in a 4:1 compression ratio
For hardware to support this it does require a tweak to the DXT5 format and a shader instruction is required to calculate the Z value - fortunately this instruction can be co-issued, so it can be executed in one cycle. 3Dc also has a two component mode, which will offer a 2:1 compression ratio, but has no associated shader instruction requirements. This 2 component mode can also be useful for packing material attributes (such as shininess, roughness, transparency, refractive index) into a single texture for compression.
For hardware that doesn't support 3Dc there are some basic fallbacks, such as using a straight DXT5 compression but with a slightly different compression tool, or utilising a two component texture with a shader instruction but these are likely to result in higher bandwidth use and / or lower quality.
The basic advantages of 3Dc is that a a developer can now give compressed 3 component normal maps with about 4 times the detail as as a standard normal map, or provide the same level of detail as a non-compressed normal map but gives a quarter of the bandwidth utilisation.
Many developers have been calling for a usable normal map compression scheme and ATI hope that what they have provided with 3Dc will answer their needs. Indeed, when ATI discussed this with Croteam, makers of Serious Sam and the upcoming Serious Sam 2 engine, and provided them with hardware within three days Croteam had independently supplied ATI with a demo rendered in the Serious Sam 2 engine showing the detail they could achieve with 3Dc compression. Many other titles are already set to ship with 3Dc compressed normal maps.
ATI will provide compression utilities for developers to use and hardware recognition of the format is from the ATI2N texture format. Numerous developers have already signalled their intent to utilise 3Dc compression.