Composition Mode

Compositing is the process by which the colors of objects are combined together. Besides its regular color values (red, green, and blue), an object may contain a channel to represent the transparency of the color. Commonly known as alpha channel, is used to represent the opacity of an object. In effect the opacity of an object controls how much of the object's color is used when compositing.

TerraAmazon has the following types of composition modes:


Source: (TerraView 5.1.0, 2010).

Clear: Both the color and the alpha of the destination are cleared. Neither the source nor the destination are used as input.

Source: The source is copied to the destination. The destination is not used as input.

Destination: The destination is left untouched.

Source Over: The source is composited over the destination (default).

Destination Over: The destination is composited over the source and the result replaces the destination.

Source In: The part of the source lying inside of the destination replaces the destination.

Destination In: The part of the destination lying inside of the source replaces the destination.

Source Out: The part of the source lying outside of the destination replaces the destination.

Destination Out: The part of the destination lying outside of the source replaces the destination.

Source a Top: The part of the source lying inside of the destination is composited onto the destination.

Destination a Top: The part of the destination lying inside of the source is composited over the source and replaces the destination.

XOR: The part of the source that lies outside of the destination is combined with the part of the destination that lies outside of the source.

Plus: The source is added to the destination and replaces the destination. This operator is useful for animating a dissolve between two images.

Multiply: The source color is multiplied by the destination color and replaces the destination. The resultant color is always at least as dark as either the source or destination color.

Screen: The source and destination colors are complemented, multiplied and the resultant color replaces the destination.

Overlay: The destination color is used to determine if the resultant is either a multiplication or screening of the colors.

Darken: The resultant color is the darker of source or destination colors.

Lighten: The resultant color is the lighter of source or destination colors.

Color Dodge: The destination color is brightened to reflect the source color.

Color Burn: The destination color is darkened to reflect the source color.

Hard Light: The source color is used to determine if the resultant is either a multiplication or screening of the colors.

Soft Light: The source color is used to determine if the resultant color is darkened or lightened.

Difference: The resultant color is the absolute difference between the source and destination colors.

Exclusion: The resultant color is similar to that of the difference operation. However, the exclusion resultant color appears as a lower contrast than that of of the difference resultant color.

The Composition Mode component allows the user to define how the layer will be composed with other layers when they are drawn.



Click on LAYER EXPLORER → right click over a layer-name → COMPOSITION MODE.

Default (this is the default composition mode - source over)

Plus

Advanced...

The advanced option show a dialog for composition mode selection. This interface consists only in choosing the composition mode desired. Click on the Apply button to set the composition mode to selected layer.




Raster Color Composition

One of the most practical applications for use composition mode is to display rasters in different layers resulting in a colored composition. Such as:

Layer A - Using the Style Explorer, the user associate the raster to channel Red.

Layer B - Using the Style Explorer, the user associate the raster to channel Green.

Layer C - Using the Style Explorer, the user associate the raster to channel Blue.

After this step, the user must set the composition mode for Layers B and C to "Plus". When drawing the layers, the result will be a color composite image.