Previous Next


                                                  532
CHAPTER 7                                                                                Transparency



These conventions permit the compositing formulas to be restated as recurrence
relations among the elements of a stack. For instance, the result of the color com-
positing computation for object i is denoted by Ci (formerly Cr ). This computa-
tion takes as one of its inputs the immediate backdrop color, which is the result of
the color compositing computation for object i − 1; this is denoted by Ci − 1
(formerly Cb ).

The revised formulas for a simple n-element stack (not including any groups) are,
for i = 1, … , n:

fs = fj × fm × fk
  i    i    i     i
qs = qj × qm × qk
         i    i       i      i


αs = fs × qs
  i    i     i
α i = Union ( α i – 1 , α s )
                           i


     f i = Union ( f i – 1 , f s )
             αi                 i
          -
 q i = ----
        fi

       ⎛ αs ⎞                     αs
 C i = ⎜1 – ------i ⎟ × C i – 1 + ------i × [ ( 1 – α i – 1 ) × C s + α i – 1 × B i ( C i – 1 , C s ) ]
                 -                     -
       ⎝     αi ⎠                  αi                              i                               i


where the variables have the meanings shown in Table 7.6. Compare these
formulas with those shown in Section 7.2.7, “Summary of Basic Compositing
Computations.”

                  TABLE 7.6 Revised variables for the basic compositing formulas
VARIABLE                    MEANING

fs                          Source shape for object i
     i

fj                          Object shape for object i
     i

fm                          Mask shape for object i
         i

Previous Next