S_MathOps

Combines two clips using one of a variety of mathematical operations. The colors of each input can also be adjusted using the lights, darks, and saturation parameters.

In the Sapphire Composite effects submenu.


Inputs:

SourceA:  The current layer.   The first input clip to be processed.

SourceB:  Defaults to None.   The second input clip to be processed.
        

Parameters:

Operation:   Popup menu,  Default: Add.
Determines which mathematical operation is applied to combine the pixel colors of the two source inputs.
Add:  A + B.
Subtract:  A - B.
Multiply:  A * B. This can be used as an 'intersection' operation on matte images. The result only contains white where both inputs are white.
Divide:  A / B. This can be used to 'un-premultiply' an image by using its matte as the second input.
Screen:  A + B - AB. This can be useful in combining the bright areas of two clips. It can also be used as a 'union' operation on matte images. The result is white where either of the input images is white.
Average:  (A + B) / 2.
Overlay:  combines A over B with an overlay function.
Minimum:  the smallest value for each color channel of each pixel. This can also be used as an 'intersection' operation with slightly different results than Multiply.
Maximum:  the largest value for each color channel of each pixel. This can also be used as a 'union' operation with slightly different results than Screen.
Difference:  similar to Subtract but the absolute value of the result is used, which tends to give more resulting colors in bounds. This can be used to select the regions of two matte images where one or the other is white, but not both.
Xor:  performs an 'exclusive-or' operation on the colors of the source clips. This can also be used to select the regions of two matte images where one or the other is white, but not both, with slightly different results than Difference.
Xor Bits:  performs a bitwise exclusive-or on the colors of the source clips. This can produce some interesting contour effects although the results are often difficult to predict.
And Bits:  performs a bitwise logical and on the colors of the source clips. Similar to XorBits but tends to produce darker results.
Or Bits:  performs a bitwise logical or on the colors of the source clips. Similar to XorBits but tends to produce brighter results.
Mod:  gives the remainder after dividing the colors of the first source clip by the second. Set the A Scale parameter to a high value for some unusual pixel banding effects.
Round:  the colors of the first source clip are rounded using the values of the second input as the step size.
Bounce:  similar to Mod but the result contains fewer jagged edges. Set the A Scale parameter to a high value for some striping effects.

Swap Inputs:   Check-box,  Default: off.
If enabled, effectively swaps the A and B Source inputs, and can be helpful for non-commutative operations like subtract. Note that this also causes parameters labeled 'A' to affect the 'B' input instead, and vice versa.

A Lights:   Default: 1,  Range: 0 or greater.
Scales the brightness of SourceA before performing the operation.

A Darks:   Default: 0,  Range: -8 to 2.
Offsets the darker regions of the first input before performing the effect. This can be negative to increase contrast.

A Saturation:   Default: 1,  Range: 0 to 10.
Adjusts the color intensity of SourceA before performing the operation. 0.0 makes it monochromatic, 1.0 has no effect.

B Lights:   Default: 1,  Range: 0 or greater.
Scales the brightness of SourceB before performing the operation.

B Darks:   Default: 0,  Range: -8 to 2.
Offsets the darker regions of the second input before performing the effect. This can be negative to increase contrast.

B Saturation:   Default: 1,  Range: 0 to 10.
Adjusts the color intensity of SourceB before performing the operation. 0.0 makes it monochromatic, 1.0 has no effect.

Dest Lights:   Default: 1,  Range: 0 or greater.
Scales the brightness of the result after performing the operation.

Dest Darks:   Default: 0,  Range: -8 to 2.
Offsets the darker regions of the result after performing the effect. This can be negative to increase contrast.

Dest Saturation:   Default: 1,  Range: 0 to 10.
Scales the color intensity of the result after performing the operation. 0.0 makes it monochromatic, 1.0 has no effect.

Opacity:   Popup menu,  Default: Normal.
Determines the method used for dealing with opacity/transparency.
All Opaque:  Use this option to render slightly faster when the input image is fully opaque with no transparency (alpha=1).
Normal:  Process opacity normally.
As Premult:  Process as if the image is already in premultiplied form (colors have been scaled by opacity). This option also renders slightly faster than Normal mode, but the results will also be in premultiplied form, which is sometimes less correct.

See Also:

Layer
Sapphire Plug-ins Introduction


© 2007, GenArts, Inc. All rights reserved.