New ways to have fun with CFS1

Chapter 4

Attribute 68 transparent colors 

Literature on transparency attribute is very short n' sweet. For Manfred Moldenhauer and Trevor de Stigter, it's being resumed by "68 - transparent colors". Hem...building on that (?!), I experimented to discover that the color palette is treated in a totally different way. In fact, the palette does make more sense than the F0 palette, as we should see.

Further investigation led me to Konstantin Kukushkin works. According to Kukushkin's Notebook, transparency is obtained by solid pixels alternating with "void" pixel in a checkered pattern. The apparent change in transparency is an optical illusion created by the changing of color of the solid pixels. The pattern never changes and the solid pixels never become "less solid". It is an impossible phenomenon to observe. Zooming-in or getting close to a transparent polygon will not work; the rendering engine always maintain the same ratio of pixels or, in other words, you can't see an enlarged pixel. Even with a good magnifying glass, I was unable to detect individual pixels on my 22" panoramic screen. We'll have to take Konstantin word for it, at least for now...

The first 32 colors (00 to 1F) are transparent grays (or greys) going from almost black to almost white;



Follows a gradation of twelve tints (20 to 2B) for red color, going from dark red brick to rosy pink;



Another twelve tints (2C to 37) treat green color, from dark grass to fluorescent green;



A last gradation of twelve tints (38 to 43) is for the blue color, from blue-grey to light sky blue;



Orange color is treated with nine (44 to 4C) tints, from dark earth to bright orange;



Next is yellow, also treated with nine (4D to 55) tints, from dirty to light yellow;

We go on with nine tints (56 to 5E) of brown, from dark brown to light tan;



Another nine tints (5F to 67) gradation of red color follows, from brownish-red to orangy-red;



Green is also repeated in a gradation of nine tints (68 to 70), this time from dark fern to light grass;



A short series of three tints (71 to 73) adds to the mid-range of blue color, from grey-blue to aqua;



The next six colors (74 to 79) are constant, which means that they "glow" at night;



We have red (74), green (75), blue (76), aqua (77), orange (78), and yellow (79).

Another suite of six (7A to 7F) constant colors applies to shades of gray;

The following series is of particular interest. It covers 32 (80 to 9F) shades of orange that are closely associated with the F0 panel/dial colors (9F to AF) already covered in chapter 3.

All day colors are a mid-dark gray that turns into a shade of orange at night. The higher the number, the brighter the orange.

That whole palette works as well with interior application;



Considering that AF99 only offers a choice of 10 transparent colors, I have to admit that I was a bit surprised by the actual vast choice. I never used "old" transparent colors that much, but I may rethink that position in view of the whole palette available.

Some 68 attribute's properties

How does old transparencies react to each other and to F0 colors? I was curious to know.

First, what happens when a transparent color overlap another transparent color? To verify, we will use our cube;

:TheCube ;10x10x10 cube
Points( 1 ; 8 points
780 0 780 ; 1
780 1560 780 ; 2
780 1560 -780 ; 3
780 0 -780 ; 4
-780 0 780 ; 5
-780 1560 780 ; 6
-780 1560 -780 ; 7
-780 0 -780 ; 8
)
SurfaceColor( 79 68 ) ;bright yellow
; Poly( ai 5 8 4 1 ) ;bottom int
; Poly( ai 2 3 7 6 ) ;top int
; Poly( ai 1 2 6 5 ) ;fore int
Poly( ai 8 7 3 4 ) ;aft int
; Poly( ai 4 3 2 1 ) ;right int
; Poly( ai 5 6 7 8 ) ;left int
SurfaceColor( 00 68 ) ;dark gray
; Poly( a 5 8 4 1 ) ;bottom ext
; Poly( a 2 3 7 6 ) ;top ext
Poly( a 1 2 6 5 ) ;fore ext
; Poly( a 8 7 3 4 ) ;aft ext
; Poly( a 4 3 2 1 ) ;right ext
; Poly( a 5 6 7 8 ) ;left ext
Return


I have made the aft interior wall bright yellow, a "glow in the dark" color, and the fore exterior wall dark gray. Note that I have "spared" other lines by simply putting them behind a semi-colon. After compiling and saving, it should look like this in the game;



So much for Kukushkin theory! According to him, the aft transparency should disappear behind the pixels of the front one. This is obviously not the case! Something must have changed since the good old days of FS5. The aft interior wall is still visible at night through the front one by the way.

How about using a non-constant transparent color? For this, we will use another yellow (55 68) for contrast;

:TheCube ;10x10x10 cube
Points( 1 ; 8 points
780 0 780 ; 1
780 1560 780 ; 2
780 1560 -780 ; 3
780 0 -780 ; 4
-780 0 780 ; 5
-780 1560 780 ; 6
-780 1560 -780 ; 7
-780 0 -780 ; 8
)
SurfaceColor( 55 68 ) ;bright yellow
; Poly( ai 5 8 4 1 ) ;bottom int
; Poly( ai 2 3 7 6 ) ;top int
; Poly( ai 1 2 6 5 ) ;fore int
Poly( ai 8 7 3 4 ) ;aft int
; Poly( ai 4 3 2 1 ) ;right int
; Poly( ai 5 6 7 8 ) ;left int
SurfaceColor( 00 68 ) ;dark gray
; Poly( a 5 8 4 1 ) ;bottom ext
; Poly( a 2 3 7 6 ) ;top ext
Poly( a 1 2 6 5 ) ;fore ext
; Poly( a 8 7 3 4 ) ;aft ext
; Poly( a 4 3 2 1 ) ;right ext
; Poly( a 5 6 7 8 ) ;left ext
Return


The effect is still the same, day ... and night .

Now, to verify F0 versus 68 attributes, I will "paint" the interior aft wall solid red and the exterior fore wall dark gray;

:TheCube ;10x10x10 cube
Points( 1 ; 8 points
780 0 780 ; 1
780 1560 780 ; 2
780 1560 -780 ; 3
780 0 -780 ; 4
-780 0 780 ; 5
-780 1560 780 ; 6
-780 1560 -780 ; 7
-780 0 -780 ; 8
)
SurfaceColor( 05 F0 ) ;solid red
; Poly( ai 5 8 4 1 ) ;bottom int
; Poly( ai 2 3 7 6 ) ;top int
; Poly( ai 1 2 6 5 ) ;fore int
Poly( ai 8 7 3 4 ) ;aft int
; Poly( ai 4 3 2 1 ) ;right int
; Poly( ai 5 6 7 8 ) ;left int
SurfaceColor( 00 68 ) ;dark gray
; Poly( a 5 8 4 1 ) ;bottom ext
; Poly( a 2 3 7 6 ) ;top ext
Poly( a 1 2 6 5 ) ;fore ext
; Poly( a 8 7 3 4 ) ;aft ext
; Poly( a 4 3 2 1 ) ;right ext
; Poly( a 5 6 7 8 ) ;left ext
Return



Without surprise (for once!), the solid color is seen through the transparent one, day and night.

CONCLUSIONS

Attribute 68 transparency offers a very large palette of colors. They could be used for propeller disc, windows, smoke effects or, with the constant colors, for night lightning effects. They do not have shading properties but, with transparencies, this is less of a problem.