<p>You can use the <strong>silhouette alpha</strong> or <strong>stencil alpha</strong> modes on a matte layer, which will matte any layers below it. </p>

<p>Or if that doesn't work for the composition you can use expressions. Here's how:  make your first matte layer, with its mask, and then duplicate it and put it over another of the layers you want to matte. Now with both matte layers selected press <strong>m</strong> to show the <strong>mask path</strong> property for both. Select only the new layer, and while holding <em>alt/option</em> click on the stopwatch next to the <strong>mask path</strong> property to add an expression to it. You'll see a pick-whip (the spiral thing) next to the expression. Click and drag the pick-whip to the <strong>mask path</strong> property of the original layer. It should say something like <strong>thisComp.layer("the name of the original matte layer").mask("mask1").maskPath</strong>
<img src="https://i.sstatic.net/6uGVI.png" alt="expression linking mask shapes">
To make those layers follow the original matte layer they shoul be parented to it as well.</p>

<p>Of course the simpler, faster to render way is to precompose the matte layer on its own and use copies of that comp as your matte layers. Why was it you don't want to precomp?</p>

CC BY-SA 3.0
2014-12-29T14:09:14.520Z
But if I copy the precomposed matte layer, wouldn't I have duplicates, so I have to change each of them for animation changes lateron? I don't want to have a precomp of the layers where the matte is to be applied, as these are layers that must have some animation in the same precomp, and the mask should just be an addition. I'd prefer thus having the mask also inside the same composition as all the layers where the matte is to be applied.
membersound
CC BY-SA 3.0
2014-12-29T14:13:59.073Z
No, you use the same precomp with only the matte layer in it, so when you make one change you affect all the copies of that precomp. Note that if you need the original footage layer to guide where you put the mask you can add it to your pre-comp as a guide layer *Layer>Guide Layer*
stib
CC BY-SA 3.0
2014-12-29T14:43:51.543Z
Great that works very well for my case! Just one more question: what if I really would want to duplicate the matte/mask layer, and having individual masks. Can I also copy the precomposed matte and tell after effects to tread it as an individual composition decoupled from the other one?
membersound
CC BY-SA 3.0
2014-12-29T14:49:28.483Z
You'd have to go to your project window, duplicate the pre-comp and then use that duplicate to replace the pre-comp layer in the composition (select the layer in the composition and alt/option drag the new pre-comp from the project window to replace).
stib
CC BY-SA 3.0
2014-12-29T13:30:22.897Z
2014-12-29T13:30:22.897Z
stib
<p>I want to create a track matte/mask that is applied to multiple layers.
The layers should not be precomposed!</p>

<p>How could I achieve this, that I can just change the matte shape and this is reflected to any of the layers. Because currently only the layer right below the matte is masked accordingly, other layers not.</p>

<after-effects>
How to apply track mattes to multiple layers?
membersound
# How to apply track mattes to multiple layers?

(Asked by: username_0 on 2014-12-29)

I want to create a track matte/mask that is applied to multiple layers.
The layers should not be precomposed!

How could I achieve this, that I can just change the matte shape and this is reflected to any of the layers. Because currently only the layer right below the matte is masked accordingly, other layers not.

**Tags:** after-effects


---

## 1 answers

### Answer by username_1 on 2014-12-29. Score: 3 | Accepted answer

You can use the **silhouette alpha** or **stencil alpha** modes on a matte layer, which will matte any layers below it.

Or if that doesn't work for the composition you can use expressions. Here's how: make your first matte layer, with its mask, and then duplicate it and put it over another of the layers you want to matte. Now with both matte layers selected press **m** to show the **mask path** property for both. Select only the new layer, and while holding *alt/option* click on the stopwatch next to the **mask path** property to add an expression to it. You'll see a pick-whip (the spiral thing) next to the expression. Click and drag the pick-whip to the **mask path** property of the original layer. It should say something like **thisComp.layer("the name of the original matte layer").mask("mask1").maskPath**
![expression linking mask shapes](https://i.sstatic.net/6uGVI.png)
To make those layers follow the original matte layer they shoul be parented to it as well.

Of course the simpler, faster to render way is to precompose the matte layer on its own and use copies of that comp as your matte layers. Why was it you don't want to precomp?

> **Comments:**
> **username_0**: But if I copy the precomposed matte layer, wouldn't I have duplicates, so I have to change each of them for animation changes lateron? I don't want to have a precomp of the layers where the matte is to be applied, as these are layers that must have some animation in the same precomp, and the mask should just be an addition. I'd prefer thus having the mask also inside the same composition as all the layers where the matte is to be applied.  
> **username_1**: No, you use the same precomp with only the matte layer in it, so when you make one change you affect all the copies of that precomp. Note that if you need the original footage layer to guide where you put the mask you can add it to your pre-comp as a guide layer *Layer>Guide Layer*  
> **username_0**: Great that works very well for my case! Just one more question: what if I really would want to duplicate the matte/mask layer, and having individual masks. Can I also copy the precomposed matte and tell after effects to tread it as an individual composition decoupled from the other one?  
> **username_1**: You'd have to go to your project window, duplicate the pre-comp and then use that duplicate to replace the pre-comp layer in the composition (select the layer in the composition and alt/option drag the new pre-comp from the project window to replace).  

---

