<p>It's harder to do than it should be, I guess because AE is layer-based rather than node-based like Fusion etc.</p>

<p>You're going to have to make a copy of both of your layers, parent each copy to the original layer – so you only have to move one of each – and arrange them so that your layer stack looks like</p>

<pre><code>text
solid
solid
text
</code></pre>

<p>(or vice versa). Now make the bottom solid a track matte for the text layer, using alpha-inverted, so that the text is only visible where the solid <em>isn't</em>, and make the top text the track matte for the top solid, once again using alpha -inverted, so that it punches a hole in the top solid layer. The top solid will form the left hand part of the design and the bottom text the right side.</p>

<p>You could also use just the original layers and have one of them use difference mode, pre-comp them both and then use a extract effect to turn the black parts into transparency, but you'll then have to do the animating in a separate comp, which can make it harder to work with.</p>

<p>There is also the <strong>Set Matte</strong> effect. A lot of people struggle with this effect, it's a lot less intuitive than the slightly more complicated solutions above, so you'll have to do some research. A good explainer video <a href="https://www.youtube.com/watch?v=Qqk7IAPqsQ0" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2020-05-16T11:15:16.180Z
Thanks a lot and that worked like a charm.
Arun
CC BY-SA 4.0
2020-05-15T07:10:17.230Z
2020-05-16T02:39:18.217Z
2020-05-16T02:39:18.217Z
stib
<p>I am a beginner in <code>After Effects</code>. I came to know the <code>TrkMat</code> - <code>Alpha Inverted Matte "Text"</code> option to make the text transparent within a shape like the below image.</p>

<p><a href="https://i.sstatic.net/w6w75.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/w6w75.png" alt="enter image description here"></a></p>

<p>But when I move the text outside of the shape, it will stay as transparent.</p>

<p><strong>Is there any way to make the text non-transparent when moving out of the shape like the below image?</strong> </p>

<p><a href="https://i.sstatic.net/SMumc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SMumc.png" alt="enter image description here"></a></p>

<p><strong>So that when an animation occurs, the text will be non-transparent at first and the portion going inside the shape will become transparent immediately</strong>. Please help me to know if I can do this. I couldn't find any solution from the internet.</p>

<after-effects>
Is there any way to make text transparent when it is in a shape and make non-transparent when it is outside the shape?
Arun
# Is there any way to make text transparent when it is in a shape and make non-transparent when it is outside the shape?

(Asked by: username_0 on 2020-05-15)

I am a beginner in `After Effects`. I came to know the `TrkMat` - `Alpha Inverted Matte "Text"` option to make the text transparent within a shape like the below image.

[![enter image description here](https://i.sstatic.net/w6w75.png)](https://i.sstatic.net/w6w75.png)

But when I move the text outside of the shape, it will stay as transparent.

**Is there any way to make the text non-transparent when moving out of the shape like the below image?**

[![enter image description here](https://i.sstatic.net/SMumc.png)](https://i.sstatic.net/SMumc.png)

**So that when an animation occurs, the text will be non-transparent at first and the portion going inside the shape will become transparent immediately**. Please help me to know if I can do this. I couldn't find any solution from the internet.

**Tags:** after-effects


---

## 1 answers

### Answer by username_1 on 2020-05-15. Score: 1 | Accepted answer

It's harder to do than it should be, I guess because AE is layer-based rather than node-based like Fusion etc.
You're going to have to make a copy of both of your layers, parent each copy to the original layer – so you only have to move one of each – and arrange them so that your layer stack looks like
text
solid
solid
text

(or vice versa). Now make the bottom solid a track matte for the text layer, using alpha-inverted, so that the text is only visible where the solid isn't, and make the top text the track matte for the top solid, once again using alpha -inverted, so that it punches a hole in the top solid layer. The top solid will form the left hand part of the design and the bottom text the right side.
You could also use just the original layers and have one of them use difference mode, pre-comp them both and then use a extract effect to turn the black parts into transparency, but you'll then have to do the animating in a separate comp, which can make it harder to work with.
There is also the Set Matte effect. A lot of people struggle with this effect, it's a lot less intuitive than the slightly more complicated solutions above, so you'll have to do some research. A good explainer video here.

> **Comments:**
> **username_0**: Thanks a lot and that worked like a charm.  

---

