Flight Unlimited III high resolution terrain processing workshop

noncommercial FU3 support page - just to keep FU3 flying !

The tricky bit settings of the cpd format

The compressed maps in the .cpd files are stored the same way than the maps in the .bin files, sequentially in units of 128x128 bitmaps. The color codes are not in sequence, but arranged in a very tricky way and even splitting up in single, unordered bits ! I have no explanation why they did it that way.

A group of 16 texels in 2 rows form a coded block that are repeated 8 times in a double row.

64 such double rows contains the full 128x128 texel bitmap.


Detail of such a group of 32 texels squeezed in 11 bytes. The first is located at the bottom left corner the next 7 groups are appended to the right and the maps is filled from bottom to top. The texel in the bottom left corner is named 1 and is coded with 3 bits, texel 2 is the first 1 row up and is a 2 bit color texel. and so on until texel w. The byte stream start coding with texel 1 followed by texel 4, the 2 then 8 ... until w.


A uncompressed .bin map block of 128x128 needs 16384 bytes of storage. With compression and relative palette reference coding, a 128x128 map block needs 8 * 64 * 11 = 5632 bytes that's about 1/3 of uncompressed storage requirements.

Information: André Meystre
back to FU3 Terrain Workshop      next to Sergey's Utilities