# Matting

## Create Matte / Mask <a href="#create-matte" id="create-matte"></a>

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw7fFF5SiLM1Pa8hfu%2FIcons-A_16.png?alt=media&#x26;token=9c96e55a-09d4-4258-ba7b-9977adbb25dc" alt=""></div>

Creates a matte, either to one layer, to multiple layers, or to a group, as well as creates *Linked Masks* (Win: Ctrl+Alt+Z, Win \[German]: Shift+Z, Mac: macControl+Z).

### Single Matte

![Quick Track Matte created to a Layer](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-mqOIhYz_Pil2bjC0%2F-MU-nT0s8lGebE42Vd8A%2FMatte---Create.jpg?alt=media\&token=974f4492-5911-4edf-91ad-86371b934904)

With one layer selected, this function will create an empty track matte layer to the selected layer. By default, it will be two times the size of the current composition. This is to have extra pixels for when the matte will be parented or animated, so it doesn't get cut off on the edges when moving. If you open up the *Settings* and go to the *Matting* tab, you can set another default size for the matte layer.

If the selected layer already has a track matte, *Workflower* will execute *Merge Mattes* ([see below](#merge-mattes)), so that both mattes will be matted to the selected layer.

By default, mattes are created with *Collapse Transformation* enabled. In the *Matting Settings*, you can also disable this option.

As of [version 2.5](https://workflower.constantin-maier.com/releases#id-2-5), you can enable in the *Matting Settings* (optionally right-click on the *Create Matte* button) to create an *FX Matte* instead of a track matte when executing *Create Matte* in a single layer. An *FX Matte* means, *Workflower* will add a *Set Matte* effect to the layer, then create an empty layer and link the *Set Matte's* layer control to the added layer. (This is the same function as covered in [Creating Single Mattes from Effects](#creating-single-mattes-from-effects) but it skips the necessity to create a *Set Matte* effect first.)

### Other Elements from Single Layers

#### Creating Single Mattes from Effects

**(Added in** [**version 2.0**](https://workflower.constantin-maier.com/releases#2-0)**)**

If you have an effect with a layer control selected on your layer, and you execute *Create Matte*, Workflower will **not** create a track matte to the layer but it will create empty layer and link the layer control to the added layer.

Very useful when you, for example, want to quickly create a matte for a *Set Matte* effect. But it also works for every other effect with a layer control, e.g. for creating a depth map layer to a *Camera Lens Blur*, or a map layer for a *Displacement Map*.

{% hint style="warning" %}
Please note that the dropdown *Source / Masks / Effects & Masks* will **not** be modified on the effect and you will have to set it manually before or after executing *Create Matte* (since you usually want to change it to either *Effects & Masks* or *Masks*).

The only exception to this is the *Set Matte* effect where Workflower will set the dropdown to *Effects & Masks* for you.

(We plan on expanding this to other effects in the future, however, since it's not easy to set this dropdown via scripting, this might take some time.)
{% endhint %}

When the selected layer doesn't have comp transforms or *Collapse Transformation* enabled, the created matte will have the exact dimensions of the selected layer and will be parented to the layer to ensure the matte is always at the correct position of the original layer. (If you don't have the setting enabled to always create mattes with *Collapse Transformation*, this will always be done.)

#### Creating Linked Masks

**(Added in** [**version 2.5**](https://workflower.constantin-maier.com/releases#id-2-5)**)**

With one regular layer selected **AND** mask/s on it selected, the function creates a matte layer where it copies the selected mask/s to, and it links the original mask to the copied mask (i.e. creates a [Linked Mask](https://workflower.constantin-maier.com/main-functions/connections#adding-linked-masks)).

Since all mask transforms are exactly mirrored on the original mask regardless of the layers' transforms, this allows you to parent and animate the matte layer and all transforms will be reflected on the original mask.

{% hint style="warning" %}
Please note that a *Linked Mask* **cannot** take variable feathering into account.
{% endhint %}

### Multi-Layer Matte

With several layers selected, this function will create a *Multi-Layer Matte* that applies to all selected layers.

#### Multi-Layer Mattes in AE 23 and upwards

*Simple Multi-Layer Mattes:*

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2FFqGwx8nwUkfvBGrpTmP5%2Fmatting---multi---v2.jpg?alt=media&#x26;token=6d7831ba-ffe6-4059-aa81-bbbcf4a96855" alt=""><figcaption><p>Multi-Layer Matte applied to Layers without existing Track Mattes in AE 23 or upwards</p></figcaption></figure>

In AE 23 and above, if the selected layers don't have an already existing track matte, a *Multi-Layer Matte* will be created and the track mattes of all selected layers set to the *Multi-Layer Matte.*

*Merged Multi-Layer Mattes:*

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2F61C8pIYDgWKcpSNAZrmk%2Fmatting---multi-merge---v2.jpg?alt=media&#x26;token=e42da9ca-c4db-4c79-b6ac-c8407178c1a2" alt=""><figcaption><p>Multi-Layer Matte applied to Layers with an existing Track Matte in AE 23 or upwards</p></figcaption></figure>

If the selected layers have already existing track mattes, those track mattes will be merged with the *Multi-Layer Matte* using a [Matte Merge](#merge-mattes). In addition, an *Intermediate Matte Merge* (also called *Inter-Merge*) will be created which is used to be referenced as track matte by all layers that don't have an existing track matte.

This *Inter-Merge* is necessary so that all matting controls, present in the [Matte Layer Settings effect](#modifying-matte-source-layers), align with the controls on the *Matte Merge Layers* that were created for the layers with existing track mattes.

When an *Inter-Merge* has to be created, you will have the option to choose beforehand whether you want to use a custom matte layer or an already existing layer from the comp as your *Multi-Layer Matte*.

#### Multi-Layer Mattes in AE 22 or below

![Multi-Layer Matte applied to Layers in AE 22 or below](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MU-mqOIhYz_Pil2bjC0%2F-MU-p1xhvWRQ1v7xSa3k%2FMatte---Multi.jpg?alt=media\&token=8865b280-e522-447a-93df-8d1161436406)

In AE 22 or below, [Matte Merge Layers](#merge-mattes) will be created for every selected layer, containing a reference to the *Multi-Layer Matte*.

You have the option of either using a custom matte layer or an already existing layer from the comp.

### Group Matte

With a group header selected, *Workflower* will create a *Group Matte Layer.* By default, the *Group Matte Layer* is a custom layer, added to the top of the group.

#### Group Mattes in AE 23 and upwards

*Simple Group Mattes:*

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2FkoKEBtlRRmALdYSl9jZn%2Fmatting---simple-group-mattes-2.jpg?alt=media&#x26;token=8e4aa0e9-feb2-4d91-b81d-971f2a54d224" alt=""><figcaption><p>A Simple Group Matte applied to the Group</p></figcaption></figure>

In AE 23 and above, the track matte of all contained group layers will be simply set to the *Group Matte Layer* **if** the following conditions apply:

1. No group layer has an already existing track matte
2. You're **not** using an [external layer as the *Referenced Group Matte Layer*](#group-matte-settings-effect) (like the [group header](#using-the-group-header-as-referenced-group-matte-layer))
3. No contained sub-group holds a *Group Matte*

{% hint style="warning" %}
Please note that there are [a few minor limitations on the *Group Matte Settings* effect](#group-matte-settings-effect) when using a *Simple Group Matte*.
{% endhint %}

*Merged Group Mattes:*

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2F9W4rf92FTMEad4GI2YDU%2Fmatting---merged-group-mattes-2.jpg?alt=media&#x26;token=84ea431d-c229-4214-afa2-8710e3a0970c" alt=""><figcaption><p>A Merged Group Matte applied to the Group (since one Group Layer had an existing Track Matte and a Sub-Group holds a Group Matte as well)</p></figcaption></figure>

If one of the conditions listed above does **not** apply, an *Intermediate Matte Merge* (also called *Inter-Merge*) has to be created above the *Group Matte Layer* and the group layers' track matte will reference that *Inter-Merge*.

If a layer has an already existing track matte, the matte will be merged with the *Referenced Group Matte Layer* using a [Matte Merge](#merge-mattes).

*Inter-Merges* for *Group Mattes* are necessary for a few reasons:

1. An *Inter-Merge* makes sure that all matting controls present in the [Group Matte Settings effect](#the-group-matte-settings-effect) align with the controls on the *Matte Merge Layers* that were created for the layers with existing track mattes.
2. When you're just using an external *Referenced Group Matte Layer*, the *Inter-Merge* is necessary so that the referenced layer does not become a track matte which will add certain undesired attributes to the layer: for example, when a layer is a track matte, it has to be disabled if you don't want to see it since you can't just set it to 0% opacity (this would make all layers invisible that are referencing it as track matte). However, when you would disable the group header, this would [trigger the entire group to get disabled](https://workflower.constantin-maier.com/group-functions/disable-solo-and-lock-groups#enable-disable-group). But when the group header is only referred to in an effect (as the *Inter-Merge* provides), its opacity is disregarded and you can set the opacity to 0%. In the example of the group header, this allows the group header to be enabled and still be used as an invisible matte.
3. When you have a sub-group that holds a *Group Matte*, the *Inter-Merges* exist so that multiple *Group Mattes* can be merged on one track matte.

As soon as a *Group Matte* doesn't qualify anymore for a *Simple Group Matte*, it will be converted to a *Merged Group Matte* right away upon executing [Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#refresh-layout). If, on the other hand, it qualifies again, it will be converted back to a *Simple Group Matte*.

You can also disable the creation of *Simple Group Mattes* in favor of *Merged Group Mattes* in all instances by going to the *Matting Settings*. You might want to do that because there might be an attribute or two that doesn't match exactly when switching between *Simple Group Mattes* and *Merged Group Mattes.* For example, when trimming the in/out point of a *Simple Group Matte*, all group layers become visible without matte being applied outside of the in/out points, whereas when trimming a *Merged Group Matte*, all group layers become completely **in**visible. Also, it's [not possible to invert a *Simple Group Matte* in addition to adjusting their blending modes](#group-matte-settings-effect).

{% hint style="info" %}
However, please be aware that since an intermediate matting effect is necessary and the matte can't be referenced right away as track matte, *Merged Group Mattes* will perform slightly slower than *Simple Group Mattes*, even if no existing track mattes have to be merged and you just use, for example, the group header as *Referenced Group Matte Layer*.

Nevertheless, even *Merged Group Mattes* will be many times faster than [*Group Mattes* in AE 22 or below](#group-mattes-in-ae-22-or-below).
{% endhint %}

#### Group Mattes in AE 22 or below

![A Group Matte applied to every Group Layer](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MST3tbik0q2ThTHRIBW%2F-MST6Y81AdKQE3aNwMZJ%2FGroup-Matte-Applied.jpg?alt=media\&token=f18447f2-a7b3-47ed-b3e8-2774246d5ca3)

In AE 22 or below, *Merge Mattes* will be executed on every layer, contained in the group, to apply the *Group Matte*. (These *Matte Merge* layers which have been added as the track matte above every group layer and which hold a matting effect, referencing the *Group Matte*, will be called *Group Matte Merge Layers* in the following paragraphs. However, *Group Matte Merge Layers* can also contain other [merged mattes](#adding-new-mattes).)

By default, *Group Mattes* won't be applied to disabled layers in AE 22 or below. You can choose to apply them too by going to the *Matting Settings* and deactivating that setting.

#### Group Matte Settings Effect

![Group Matte Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MS7pDODJTlGlvKOO7UW%2F-MS7qoNCgeDyeXWa8LCS%2FGroup-Matte-Effect.jpg?alt=media\&token=bbf0aa24-3a14-4d3d-ba5e-37eef7f86da4)

Using the *Group Matte* effect, to be found on the *Group Matte Layer*, you can customize your matte.

Among other things, you can choose another layer from the comp as your *Referenced Group Matte Layer* by selecting the desired layer from the dropdown and hitting [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections). (Note that what is called *Referenced Group Matte Layer* - the actually visible *Group Matte* on every layer - can differ from the *Group Matte Layer* - the custom layer at the top of the group.)

To disable a *Group Matte* temporarily, just deactivate the effect switch of the *Group Matte* effect.

**Note for AE 23 and upwards:** When you're using a [Simple Group Matte](#group-mattes-in-ae-23-and-upwards) (i.e. without an *Intermediate Matte Merge*), there are some limitations:

* Changing the *Blending Mode* requires you to execute *Refresh Layout* afterwards
* *Respect In/Out Points*, *Invert Matte* and *Show Matte* **cannot** be modified:
  * In/out points will always be respected since that's the way track mattes work in AE
  * You can invert your matte by changing the *Blending Mode* to *Silhouette Alpha* or Silhouette *Luma*, however, it's not possible to additionally invert the matte
  * *Show Matte* is a property that only makes sense when working with [Invisible Mattes](#invisible-mattes). However, since a *Simple Group Matte* is a regular track matte, the layer does not have to stay enabled and the opacity set to 0% so that layer bounding boxes are retained. To show your matte, simply enable the layer as you're used to with track mattes.

#### Moving Group Layers

As of [version 1.1](https://workflower.constantin-maier.com/releases#1-1), when new layers have been added to the group or layers have been released from the group, you have to execute *Refresh Layout* to add/remove the *Group Matte Merge Layers* to/from all new/old group layers.

(In prior *Workflower* versions, or if you have *When executing 'Refresh Layout', check whether Group Mattes need to be refreshed* disabled (to be found under the *Matting Settings*), you need to select a group layer or the *Group Matte Layer* and execute *Refresh Connections* in order to add/remove the *Group Matte Merge Layers* to/from the layers.)

#### Group Mattes and Sub-Groups

If you have sub-groups with *Group Mattes* themselves, *Workflower* will apply the *Group Matte* of the sub-group as well as the *Group Matte* of the higher group to every layer.&#x20;

#### Using the Group Header as Referenced Group Matte Layer

**(Added in** [**version 1.1**](https://workflower.constantin-maier.com/releases#1-1)**)**

![Using a Mask on the Group Header](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2Frpcz2Ve1UZSGWROsGPcS%2FMasksEffectsGroupHeader01-1.jpg?alt=media\&token=40f3ea36-69d5-4d93-bc63-39c437d2c794)

You can also use the group header as your *Referenced Group Matte Layer*. Simply draw masks on the group header and execute [Refresh Connections](https://workflower.constantin-maier.com/main-functions/connections#refresh-connections).

*(Note: Workflower needs a mask path, not a shape path. However, when you draw a shape path, Refresh Connections will convert it to a mask path.)*

If you don't have a *Group Matte Layer* yet, *Workflower* will then create it and link the group header as *Referenced Group Matte Layer* on the *Matte Layer* control. (If your *Group Matte Layer* already exists, *Workflower* will just link the reference.)

Using the group header instead of the *Group Matte Layer* can be useful if you want to collapse your group and still be able to manipulate the *Group Matte*.

Please note that only the masks of the group header will be considered. Effects altering the alpha cannot be taken into account as they will already be considered for the [Group Linked Adjustment Layer](https://workflower.constantin-maier.com/adjustment-layers#applying-effects-to-the-group-header). If you need effects to be taken into account, please use the *Group Matte Layer* itself or an external layer as your *Referenced Group Matte Layer*.

By default, the border size of the group header will be expanded to comp size when it holds masks. However, there can be certain situations where the matte could get cut off. To expand the border size, please twirl down the group header and go to *Contents > Border > Fill > Size*. If you remove the mask/s from your group header, the border size will turn back to the default group header size.

#### True 3D Objects within a Group Matte

True 3D objects in AE's *Advanced 3D* renderer cannot set track mattes. That's why *Workflower* **cannot** add a *Group Matte* to those layers. So in case a true 3D object is within a *Group Matte*, you might want to create a [Prime Clone](https://workflower.constantin-maier.com/cloning#prime-clone) or [Clone in Comp](https://workflower.constantin-maier.com/cloning#clone-in-comp) of your 3D layer first which can be matted properly.

#### Removing a Group Matte

To remove a *Group Matte*, either:

1. Select the group header and hit *Create Matte* again.
2. Use [Delete Layer / Clone / Group](https://workflower.constantin-maier.com/group-functions/ungroup-dissolve-and-delete-groups#delete-layer-clone-group) on the *Group Matte Layer.*
3. Delete the *Group Matte Layer* using AE's *Delete* and then execute [Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#refresh-layout).
4. When using the group header as the *Referenced Group Matte Layer*, select the group header, remove the mask/s and execute *Refresh Connections*.

All references to the *Group Matte* will then be removed from the layers.

If layers have *Group Matte Merge Layers* which contain only the reference to the deleted *Group Matte Layer* (those only exist in AE versions below 23), the *Matte Merge* layer and track matte state will be removed.

If multiple matte references on the *Matte Merge* layer exist, the *Matte Merge* layer will stay intact, and only the *Calculations* effect, referencing the *Group Matte Layer* will be removed. If there's just one matte reference left after removing the reference to the *Group Matte Layer*, the *Matte Merge* will be undone and the matte converted back to a single track matte.

(Fixed in [version 1.1](https://workflower.constantin-maier.com/releases) ->) ~~Do **not** simply delete the *Group Matte* layer. If you would then execute *Refresh Layout*, the *Group Matte* will be removed - however, *Matte Merge* layers will remain above the group layers, even if they have no matting effect left on them. (*Tip:* If you quickly want to delete empty *Matte Merge* layers, select them and execute~~ [~~Delete Layer / Clone / Group~~](https://workflower.constantin-maier.com/miscellaneous-layer-functions#delete-layer-clone-group)~~. This will remove the matte layers as well as the track matte state of the layer below.)~~

#### Order of Group Mattes, Group Clones, and Group Linked Adjustment Layers

*Group Mattes, Group Clones*, and *Group Linked Adjustment Layers* have a specific layer order when used in conjunction. Read up [here](https://workflower.constantin-maier.com/group-functions/miscellaneous-group-functions#order-of-group-clones-group-mattes-and-group-linked-adjustment-layers) for more information.

#### Shying of Group Matte Merge Layers <a href="#shy-mattes" id="shy-mattes"></a>

*<mark style="color:red;">**(Only applicable in AE 22 or below)**</mark>*

**(Added in** [**version 1.1**](https://workflower.constantin-maier.com/releases#1-1)**)**

![Left: Group Matte Merge Layers visible; Right: Group Matte Merge Layers shy'd (Shy Mattes)](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2F4CgEZFgYm6pjllUW3qfP%2FMatting---Shy.jpg?alt=media\&token=52cd8c77-29f6-4bdc-bbb4-d7896bb4d819)

When using a *Group Matte*, [Matte Merge](#merge-mattes) layers will be added above every group layer as a track matte (*Group Matte Merge Layers*). This, however, makes it more difficult to see the structure of layers. That's why you have the option to shy *Group Matte Merge Layers* that solely contain *Group Matte* effects (called *Shy Mattes*). (This is disabled by default. Go to *Settings > Matting* to enable it.)

If you want to move a group layer, select it and execute [Select Group](https://workflower.constantin-maier.com/group-functions/collapse-and-select-groups#select-group). This will additionally select the *Shy Matte* above.

If enabled under *Settings > Matting > Temporarily unshy Shy Mattes when executing 'Select Group'*, all *Shy Mattes* within your comp will be temporarily unshy'd so that you can move your layers without accidentally moving your layers in between another layer and its *Shy Matte*. When you execute *Refresh Layout* afterwards, all *Shy Mattes* will be shy'd again.&#x20;

If *Temporarily unshy Shy Mattes* is **not** enabled, the selection icon \[   ] will indicate that the *Shy Matte* above has been selected as well so that you know you can now move your layers. Having the setting disabled guarantees a faster workflow since the layers don't have to be unshy'd. However, you also have to pay more attention so that you don't move your layers in between another layer and its *Shy Matte*. If you move them in between, Workflower will give you an error message, telling you either to undo your action or to hit *Refresh Layout* so that track mattes will be arranged correctly.

![Illegal Shy Matte Movement Error Message](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2FohbO979LJ4oamQTQa4Tf%2FMatting---Shy-Error.jpg?alt=media\&token=29000705-06e6-4457-8e58-e308c0a015a0)

If you want to temporarily unshy all *Shy Mattes* but you **don't** want to select anything via *Select Group* (or you don't have *Temporarily unshy Shy Mattes* enabled), you can also execute [Unshy Layers](#unshy-layers). This will unshy all *Shy Mattes* until the next time you execute *Refresh Layout*. Useful when you, for example, want to move a layer without an existing *Shy Matte* into a group with group matte and you want to be able to easily place it at the correct position.

You don't always have to execute *Select Group* first to select the *Shy Matte*. The following *Workflower* functions will consider *Shy Mattes* even if they are not within the selection:

* [Duplicate Group](https://workflower.constantin-maier.com/group-functions/create-and-duplicate-groups#duplicate-group) will duplicate the selected layers as well as their *Shy Mattes* above.
* [Create Group](https://workflower.constantin-maier.com/group-functions/create-and-duplicate-groups#create-group) will move all selected layers along with their *Shy Mattes* into the new group.
* [Delete Layer / Clone / Group](https://workflower.constantin-maier.com/miscellaneous-layer-functions#delete-layer-clone-group) will delete all corresponding *Shy Mattes* of the selected layers.

### Known *Create Matte* Bugs

{% hint style="warning" %}
[There are known *Create Matte* bugs. Click here to read up on their descriptions as well as potential workarounds.](https://workflower.constantin-maier.com/known-bugs#create-matte-bugs)
{% endhint %}

## Merge Mattes

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw7jErg_LEVy31jp2q%2FIcons-B_16.png?alt=media&#x26;token=a52719a2-f793-4874-bff8-34d81e35cb18" alt=""></div>

Merges multiple mattes into one track matte layer to a layer (Win: Ctrl+Alt+Shift+Z, Mac: no default shortcut).

### Creating the Matte Merge Layer

![Left: Base and Matte Layers selected before Matte Merge; Right: The created Matte Merge Layer and Matte Collection Group](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSbms370XRV5zn8PJn8%2F-MSboIO5cez78pR6iAjR%2FMerge-Mattes---Collection-Group.jpg?alt=media\&token=435795a8-1439-405e-934f-ce01be4e7574)

First, select the layer you want the mattes to be matted to. If the layer already has a track matte, you can also select the track matte. After that, select your desired matte layers and hit *Merge Mattes*. A *Matte Merge Layer* will be created and used as a track matte for the layer that the mattes should be matted to. On the *Matte Merge Layer*, matting effects, using AE's *Calculations* effect, for each matte layer will have been created. If the matte layers are directly above the base layer and are disabled, they will be put into a *Matte Collection Group*. (For more information on this, [see below](#matte-collection-groups).)

If the matte layers have *Collapse Transformation* enabled, or have comp dimensions and are unmoved, the matte effects on the *Matte Merge Layer* will reference those layers directly. For all other matte layers, a *Precomp Clone* of the layer will be created in order to fit it to comp dimensions.

**Note for AE 23 and upwards:** Although in AE 23 and up, you can potentially move the track matte layer to another spot in the comp, you **need to keep the&#x20;*****Matte Merge Layer*****&#x20;always directly above the matted layer** in order for the layers to be recognized as connected. This connection is important when you want to add or remove a [Group Matte](#group-matte) or [Multi-Layer Matte](#multi-layer-matte) so that mattes can be merged correctly. Nevertheless, it is still possible to reference the *Matte Merge Layer* as track matte by other layers, however only the layer directly below will be recognized as the main matted layer.

(Fixed in [version 1.0.4](https://workflower.constantin-maier.com/releases#1-0-4) ->) ~~As of now, when changing the comp size, *Matte Merge* layers will **not** be adjusted to the new size automatically. To make the *Matte Merge* layer work again, you need to go to its *Solid Settings* and hit *Make Comp Size*. It is recommended to disable *Affect all layers that use this solid.* (Only when you are sure that no *Workflower* layer other than the *Matte Merge* layers of the comp with a new size use this solid, you may enable *Affect all layers that use this solid*.)~~

### Modifying Mattes

![Multiple Matting Effects](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MSbY5EmbS0xbobXNG2E%2F-MSbm905WthCM3YN7Pip%2FMerge-Mattes---Calculations.jpg?alt=media\&token=1dcb4c68-44ca-493c-b211-6f8e67879fba)

On the *Matte Merge Layer*, you can use the *Calculations* effects to modify your mattes by changing the blending modes (either to *Normal*, *Stencil Alpha*, *Stencil Luma*, *Silhouette Alpha*, or *Silhouette Luma*), the opacity, the inverted state, and the matte order by moving the *Calculations* effects around.

### Modifying Matte Source Layers

![Matte Layer Settings Effect](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-Mf4w1_PVQEwfAzBYZYE%2F-Mf58nlzwow936fhmk2m%2FMatting---Modifying.jpg?alt=media\&token=017cb1d9-636f-4083-a2fb-3e2358976387)

To all matte source layers, a *Matte Layer Settings* effect will be applied. Using the effect, you can choose whether in/out points should be respected and modify the blending mode, inverted state, and opacity. Modifying these states on the layer itself - as compared to modifying it on the *Matte Merge Layer* effect - is useful when having a matte that is applied to multiple layers so that changes don't have to be made on each *Matte Merge Layer* individually.

#### True 3D Objects as Matte Source Layers

True 3D objects in AE's *Advanced 3D* renderer cannot contain effects. That's why *Workflower* **cannot** add a *Matte Layer Settings* effect to those layers. So in case a true 3D object is a matte source layer, you can control the matte properties of this layer only by adjusting the *Calculations* effect on the *Matte Merge Layer* itself.

#### Invisible Mattes

<figure><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2FvMatEKlmIJgZXdGVnJTd%2Fdoc---inv---matte.jpg?alt=media&#x26;token=2f5d5431-b8fc-4e11-8305-17f549871275" alt=""><figcaption><p>Invisble Mattes as indicated by the ‡ Icon (Icon introduced in v2.0)</p></figcaption></figure>

On the *Matte Layer Settings* effect, you also have the option to enable *Invisible Matte*. That means that the layer will be set to 0% opacity while it is still enabled. That way, the layer will behave like a regular track matte: It is not visible but you can move it with your cursor around in the composition viewer (which would not be possible with a disabled layer).

You can also very quickly show the layer itself again by clicking on *Show Matte*. This will temporarily set the opacity back to its actual value.

On *Invisible Mattes*, you **can't** set the *Opacity* on the *Matte Layer Settings* effect to *From this Layer* (since it will be at 0% opacity). You can only set it to either *Custom Opacity* or *From Matte Merge Layer Effect*.

Layers that are put into a [Matte Collection Group](#matte-collection-groups) will be set to *Invisible Matte*. Other matte source layers won't be set to *Invisible Matte* by default, however.

### Adding new Mattes

To add new mattes to an already existing *Matte Merge Layer*, simply select the *Matte Merge Layer* first (or its matted layer), then the new matte layers, and hit *Merge Mattes* again. You can also add new mattes using [Add / Remove Layer References](https://workflower.constantin-maier.com/main-functions/connections#add-remove-layer-references). (Be aware, though, that, using this function, the order of selection is reversed.)

As of [version 1.1](https://workflower.constantin-maier.com/releases#1-1), the blending mode of new mattes added to the *Matte Merge Layer* will be set to *Stencil Alpha* by default. (In prior versions it would have been set to *Normal*.)

If you select either the matted layer or the *Matte Merge Layer* and execute [Create Matte](#create-matte), an empty matte will be created to the *Matte Merge*.

### Updating Effect Names & Clones

If you have no layer selected and you execute *Merge Mattes*, all matting effects on the *Matte Merge Layer* will be renamed to the current name of the referenced layer. Perform this action after having changed layer names and then working on the Matte Merge Layer since it is difficult to read the layer name from the layer control on the matting effect.

When executing *Merge Mattes* with no layer selected, all unused matte clones will be deleted, too.&#x20;

### Matte Collection Groups

![A Matte Collection Group above the Matte Merge Layer](https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MfmVyp4IgvnNPIbut86%2F-MfmXNTen4XkJCQGKBfM%2FMerge-Mattes---Collection-Group-2.jpg?alt=media\&token=2b0b2dea-0b4e-4680-af7e-649905443f50)

#### Creating a Matte Collection Group

If the selected matte layers are directly above the layer that they should be matted to **AND** they are disabled, a *Matte Collection Group* will be created above the *Matte Merge Layer*, into which the matte layers will be put. The *Matte Collection Group* always needs to stay directly above the *Matte Merge Layer* if new mattes should be put into it as well. If new mattes are added to the *Matte Merge Layer* and the *Matte Collection Group* is not directly above, they won't be automatically added. (However, you can of course still put them into the group yourself.)

All layers that are put into the *Matte Collection Group* will be turned into an *Invisible Matte.* Read up more about *Invisible Mattes* [here](#invisible-mattes). (On the other hand, layers that are not put into a Matte Collection Group, won't be turned into *Invisible Mattes*.)

You can disable the creation of *Matte Collection Groups* too by going to the *Matting Settings*.

#### Properties of Matte Collection Groups

A *Matte Collection Group* differs from a normal group insofar that it inherits the label color from its containing group, as well as its parent if the containing group is a parented group.

If *Precomp Clones* are created for a *Matte Merge*, they will be put into a custom *Matte Clone Collection Group*.

*Matte Collection Groups* are symbolized by the Icon ∆, *Matte Clone Collection Groups* by ∆∆.

#### Converting Matte Collection Groups

You can convert a regular group to a *Matte Collection Group* by selecting it and hitting *Merge Mattes*. If you select a *Matte Collection Group* and hit *Merge Mattes*, it will convert it to a *Matte Clone Collection Group* - but only if it doesn't already exist - otherwise, it will just convert it back to a regular group. If you select a *Matte Clone Collection Group* and hit *Merge Mattes*, it will convert it to a regular group.

### Known *Merge Mattes* Bugs

{% hint style="warning" %}
[There are known *Merge Mattes* bugs. Click here to read up on their descriptions as well as potential workarounds.](https://workflower.constantin-maier.com/known-bugs#merge-mattes-bugs)
{% endhint %}

## Select Shy Matte

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQrCmGZz5honeHZINyR%2F-MQw5XX8KD2Om8Lm_Hi7%2F-MQw7ACPGcXvG6MAc8uA%2FIcons-A_08.png?alt=media&#x26;token=7be32dd6-a45a-4474-aa47-f369e9e115ff" alt=""></div>

*<mark style="color:red;">**(Only applicable in AE 22 or below)**</mark>*

**(Added in** [**version 1.1**](https://workflower.constantin-maier.com/layer-functions/broken-reference)**)**

To select [Shy Mattes](#shy-mattes), select the desired group layers which have *Shy Mattes* above and execute [Select Group](https://workflower.constantin-maier.com/group-functions/collapse-and-select-groups#select-group).

## Unshy Layers

<div align="left"><img src="https://3790197535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQrCmGZz5honeHZINyR%2Fuploads%2F1kewPY8oqezaSYiV9a6C%2Fdoc---unshy.png?alt=media&#x26;token=5214408f-f3e3-46a3-aafb-fcfb87bf16ea" alt=""></div>

*<mark style="color:red;">**(Only applicable in AE 22 or below)**</mark>*

**(Added in** [**version 1.1**](https://workflower.constantin-maier.com/layer-functions/broken-reference)**)**

Temporarily unshys [Matte Merge](#merge-mattes) layers that only have [Group Matte](#group-matte) effects applied to them, a.k.a. [Shy Mattes](#shy-mattes) (Win: Alt+F9 \[when using AE 22 and below], Mac: no default shortcut).

Useful when you, for example, want to move a layer without an existing *Shy Matte* into a group with group matte and you want to be able to easily place it at the correct position.

If you execute [Refresh Layout](https://workflower.constantin-maier.com/main-functions/layout#refresh-layout) afterwards, all *Shy Mattes* will be shy'd again.
