As explained in the superpalette page, there are texels with 2 bit color code and with 3 bit color code. A byte has 8 bits 2+3+3 and can store the 3 texels using this coding. On the next page you will learn how tricky this simple rule is implemented.

My GenQuadrant tool is going another way and start with a level 0 map in Targa format. The first 3 steps are going in a bottom up direction. step 1 generate a level 1 map by choosing the best fit for a subpalette including the 4 neighborhood texels and storing the subpalette code as level 1 texel. Same is done for level 2 and level 3. now we have all maps and the level 2 - level 3 assignments are all valid - but during the up process there are some texels in the level 1 that have changed to fit in the level 2 palette and that will also affect the level 0. In the last steps, starting with level 2, the level 1 is matched to the predefined subpalette in level 2 and then makes the last color modification to the level 0 using the predefined new subpalette codes of level 1. After that the color is valid for the full chain.
The color dependency of the subpalette sharing affects 64 level 0 texels, 16 level 1 texels, 4 texels of level 2 and 1 texel of level 3 as shown in the next pictures.




Information: André Meystre
back to FU3 Terrain Workshop
next to Compression and cpd file format