<p>You can use a Track Matte. If your vertical lines aren't already precomposed, precompose them. Duplicate the Precomposition in your main composition. Place the shadow layer between the two precomps. Set the shadow layer's TrkMat setting to Alpha. (If you can't see the Track Matte [TrkMat] dropdown press the Toggle Switches/Modes button at the bottom of your screen).</p>

CC BY-SA 4.0
2019-10-15T09:11:51.010Z
Thank you, it worked and definitely helps to sell the illusion of 3d.
WB Creative
CC BY-SA 4.0
2019-10-14T00:26:54.440Z
2019-10-14T00:26:54.440Z
Gregory Gesch
<p>How do make a layer visible only when overlapping other layers in After Effects.</p>

<p>Below are the layers:</p>

<p><a href="https://i.sstatic.net/Vj7VL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Vj7VL.png" alt="What I&#39;m getting"></a></p>

<p>I want the shadow from the bow to only be visible when over the verticle lines.</p>

<p>Below are the layers in the pre-comp:</p>

<p><a href="https://i.sstatic.net/udISX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/udISX.png" alt="The layers in question."></a></p>

<p>Above is the semi-transparent stroke as the shadow if the bow and a repeated verticle stoke. I want that shadow layer to only be visible over the verticle lines. How can I achieve this?</p>

<after-effects><visual-effects><compositing>
How do make a layer visible only when overlapping other layers in After Effects
WB Creative
# How do make a layer visible only when overlapping other layers in After Effects

(Asked by: username_0 on 2019-10-11)

How do make a layer visible only when overlapping other layers in After Effects.

Below are the layers:

[![What I'm getting](https://i.sstatic.net/Vj7VL.png)](https://i.sstatic.net/Vj7VL.png)

I want the shadow from the bow to only be visible when over the verticle lines.

Below are the layers in the pre-comp:

[![The layers in question.](https://i.sstatic.net/udISX.png)](https://i.sstatic.net/udISX.png)

Above is the semi-transparent stroke as the shadow if the bow and a repeated verticle stoke. I want that shadow layer to only be visible over the verticle lines. How can I achieve this?

**Tags:** after-effects, visual-effects, compositing


---

## 1 answers

### Answer by username_1 on 2019-10-14. Score: 2 | Accepted answer

You can use a Track Matte. If your vertical lines aren't already precomposed, precompose them. Duplicate the Precomposition in your main composition. Place the shadow layer between the two precomps. Set the shadow layer's TrkMat setting to Alpha. (If you can't see the Track Matte [TrkMat] dropdown press the Toggle Switches/Modes button at the bottom of your screen).

> **Comments:**
> **username_0**: Thank you, it worked and definitely helps to sell the illusion of 3d.  

---

