Using Logical Operations
 
 
 

Logical operations are applied separately to each of the red, green and blue channels of images. You can apply Logic Ops controls to combine the RGB channels of corresponding pixels from two source images as described in this section. To learn when you use the Logical Operations, see the “To use the Logic Ops controls:” procedure in Using Logical Operations.

Add Adds the luma values of the corresponding pixels from two source clips and assigns the resulting value to the corresponding pixel in the generated clip. If the result is greater than 255 (in 8-bit mode), the pixel in the destination clip is clamped at a value of 255 (white). In 12-bit mode, the maximum colour value is 4095.

The order in which the two source clips are selected does not affect the result of the Add operation. The generated clip is brighter than either of the two selected source clips.

And Applies a bitwise logical AND operation between the RGB channels of corresponding pixels in the two source clips. The order in which the two source clips are selected does not affect the result of the AND operation.

AndInv Applies a bitwise logical AND operation between the negative of the RGB channels of the pixels of the front clip and the RGB channels of the pixels of the back clip.

AndRev Applies a bitwise logical AND operation between the negative of the RGB channels of the pixels of the back clip and the RGB channels of the pixels of the front clip. AndRev and AndInv yield the same result if you switch the order of the two source clips.

Blend Blends the RGB channel values of corresponding pixels in the front and back clips according to the specified transparency value. The resulting RGB channel values are assigned to the corresponding pixels in the generated clip. The order in which you select the source clips affects the result if the transparency value is not equal to 50%.

Difference Calculates the difference between the RGB channels of the corresponding pixels of the two source clips. As opposed to Subtract, the order of the two source clips does not matter, as the smaller channel value is always subtracted from the larger channel value. Blending with white inverts the colour channel values; blending with black produces no change.

Divide Divides the RGB channel value in the front clip by the RGB channel value in the back clip for corresponding pixels in the two clips. The resulting RGB channel values are assigned to the corresponding pixels in the generated clip. The order in which you select the source clips affects the result.

Exclusion Adds the RGB channel values of the corresponding pixels from the two source clips, then subtracts twice the product of these channels. The order of the source clips does not matter.

HardLight Multiplies or screens the selected colour of the front clip onto the back clip, depending on the blend colour. The effect is similar to shining a harsh spotlight on the image, and greatly reduces the contrast levels in the image.

If the blend colour (light source) is lighter than 50% grey, the image is lightened as if it were screened — this is useful for adding highlights to an image. If the blend colour is darker than 50% grey, the image is darkened, as if it were multiplied — this is useful for adding shadows.

Inv. Non Additive Evaluates the corresponding pixels in the front and back clips to determine which has the lower colour value.

Non Additive Evaluate the corresponding pixels in the front and back clips to determine which has the higher colour value.

Max/Lighten Compares the RGB channels of each pixel of the source clips individually and returns the larger of the two values in the resulting clip. The order in which you select the source clips does not affect the result.

Min/Darken Compares the RGB channels of each pixel of the source clips individually and returns the smaller of the two values in the resulting clip. The order in which you select the source clips does not affect the result.

Multiply Multiplies the RGB channel values of corresponding pixels of the two source clips and normalizes the result by dividing by 255 in 8-bit mode, or by 4095 in 12-bit mode. The resulting RGB channel values are assigned to the corresponding pixels in the generated clip. The order in which you select the source clips does not affect the result.

Nand Applies a bitwise logical AND operation between the RGB channel values of the corresponding pixels of the two source clips, negates the result, and assigns the result to the channels of the corresponding pixels in the generated clip.

Nor Applies a bitwise logical OR operation between the RGB channel values of the corresponding pixels of the two source clips, negates the result, and assigns the result to the channels of the corresponding pixels in the generated clip. The order in which you select the source clips does not affect the result.

Or Applies a bitwise logical OR operation between the RGB channel values of the corresponding pixels of the two source clips, and assigns the result to the channels of the corresponding pixel in the generated clip. The order in which you select the source clips does not affect the result.

OrInv Applies a bitwise logical OR operation between the negative of the RGB channel values of the pixels of the front clip and the RGB channel values of the corresponding pixels of the back clip, and assigns the result to the channels of the corresponding pixels in the generated clip.

OrRev Applies a bitwise logical OR operation between the RGB channel values of the pixels of the front clip and the negative of the RGB channel values of the corresponding pixel of the back clip, and assigns the result to the channels of the corresponding pixels in the generated clip.

OrRev and OrInv yield the same result if you switch the order of the two source clips.

Overlay Multiplies or screens the colours, depending on the RGB channel values of the first clip you select. Patterns or colours overlay the existing RGB channel values while preserving the highlights and shadows of the first clip's colour. The first clip's colour is not replaced but is mixed with the second clip's colour to reflect the lightness or darkness of the original colour.

Screen Multiplies the inverse of the second clip's colours with the colours of the first clip. The resulting colour is always lighter. The colour remains unchanged when you screen with black. Screening with white produces white. The effect is similar to projecting multiple photographic slides on top of each other.

SoftLight Shines a soft, diffuse light on the image. If the blend colour (light source) is lighter than 50% grey, the image is lightened. If the blend colour is darker than 50% grey, the image is darkened. Using this mode with a black frame results in a very dark effect, with white a very bright one.

Subtract Subtracts the RGB channel values of the pixels of the back clip from the RGB channel values of the pixels of the front clip and assigns the result to the RGB channel values of the pixel in the generated clip. If an RGB channel value from the back clip is larger than the corresponding channel value of the front clip, yielding a negative result, that result is clamped at 0 (black).

The order of source clips is important since the back clip is subtracted from the front clip. The resulting clip is always darker than either of the two source clips.

Xnor Applies a bitwise logical exclusive OR operation between the RGB channel values of the corresponding pixels of the two source clips, negates the result, and assigns the result to the channels of the corresponding pixels in the generated clip. The order in which you select the source clips does not affect the result.

Xor Applies a bitwise logical exclusive OR operation between the RGB channel values of the corresponding pixels of the two source clips, and assigns the result to the channels of the corresponding pixels in the generated clip. The order in which you select the source clips does not affect the result.

To use the Logic Ops controls:

  1. With Fx selected from the A/V Tools box, click Logic Ops.

    The Logic Ops controls appear.

    Show small imageShow large image

    (a) Front/Back/Matte box  (b) Logical operations box  (c) Transparency field  

  2. In the Transparency field, specify the percentage of the second (back) clip that will be used in the operation. For example, if you enter a transparency value of 30%, 30% of the back clip and 70% of the front clip is used.
  3. In the Front/Back/Matte box, specify the clips you want to use in the operation.
    Select: To:
    Front/Back Use a front clip and a back clip.
    Front/Back/Matte Use a front, back, and matte clip. When you use a matte, the result of the operation appears only in the white area of the matte. In the black area of the matte, the contents of the back clip appear in the result clip.
  4. From the Logical operations box, select the logical operation you want to use.
  5. Do one of the following:
    • If you selected Front/Back, select the front and back source clips to be used for the operation. The order in which you select the clips may affect your operations. See the description of each operation in the preceding sections.
    • If you selected Front/Back/Matte, select clips in the following order: front, back, and then matte.
  6. Select a destination in the Source Area or Record Area.

    The result clips appear in the selected destination.