ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Create matte from underlying transparency

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Foran
Create matte from underlying transparency
on Jun 11, 2019 at 10:14:51 pm

I am looking for a way to create a matte from the combined transparency of the current layer and below. In essence, it would work like the "Preserve Underlying Transparency" switch on the timeline. However, it would be an effect, so this matte could be included in the effects chain, just like the 'Set Matte' effect.

I've wished for this a number of times, but most often it is to create a drop shadow that only casts on available pixels. I can create one that is set to only cast on a specific layer, usually the layer directly below, with this combination of effects:
- Fill
- Transform (to offset the shadow)
- Gaussian Blur
- Set Matte (to the layer being cast upon)
- CC Composite (RGB Only unchecked)

However, I would like the 'Set Matte' instance to instead create a matte of the total transparency of the current layer and below, so that it casts on everything. Is there a way to do this?


Return to posts index

Kalleheikki Kannisto
Re: Create matte from underlying transparency
on Jun 12, 2019 at 6:41:51 am
Last Edited By Kalleheikki Kannisto on Jun 12, 2019 at 6:44:00 am

Here's one way to combine several layers transparency with set matte I just concocted.

Note the trick of inverting the mattes to combine them then inverting the combined alpha result.



Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Mike Foran
Re: Create matte from underlying transparency
on Jun 12, 2019 at 12:00:33 pm

Thanks, I've done combinations like that in the past. It's a cool technique, but it would be impractical in this case. I might be dealing with hundreds of layers. I'm looking for something that would work on many more layers automatically. Ideally it wouldn't be a processor hog either, although I suspect the calculations might grind everything to a halt. The 'Preserve Underlying Transparency' switch is pretty fast though, so I thought it might be possible.


Return to posts index


Kalleheikki Kannisto
Re: Create matte from underlying transparency
on Jun 12, 2019 at 7:13:17 pm

I guess you have a reason not to precompose the lot.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Mike Foran
Re: Create matte from underlying transparency
on Jun 12, 2019 at 9:04:35 pm

Well they would have to cast shadows on each other. So imagine if I had 100 shape layers moving around, each with the drop shadow effect applied. But where the background is transparent, no shadow could be cast.

There are ways to do it but they are all a pain to set up or slow. I could duplicate each layer, set the lower layer to be the shadow, and then set it's Preserve Transparency switch. Or I could make them all 3D layers, separate them in Z space slightly, and add a light. Neither option is great. If I could preserve transparency like I want it would be a single layer effect and a breeze to set up. And the matte would be helpful in other capacities too.


Return to posts index

Mike Foran
Re: Create matte from underlying transparency
on Jun 12, 2019 at 9:29:26 pm

I'm not sure I made my intent clear. Here are a couple screenshots. The first shot shows standard application of the Drop Shadow effect on multiple overlapping objects. You can see that the shadow is rendered on the transparent areas. The second is the technique I currently would use to change that. I duplicate all the layers, then set the underlying layers to fill, offset and blur, and then activate the Preserve Transparency switch. It's cumbersome to work with.





Return to posts index


Greg Gesch
Re: Create matte from underlying transparency
on Jun 12, 2019 at 11:26:01 pm

Hi. You might try precomposing the final image, add the Curves effect to the precomposed layer and drag the bottom of Chanel = Alpha to the right to get rid of the shadow on the alpha. (?)


Return to posts index

Mike Foran
Re: Create matte from underlying transparency
on Jun 13, 2019 at 3:27:04 am

That's a good thought, thanks. The matte is the thing though. There are so many other uses for it if I could create it.


Return to posts index

Kalleheikki Kannisto
Re: Create matte from underlying transparency
on Jun 13, 2019 at 7:46:47 am

Yes, you're right, I had that backwards, I thought you wanted a single combined shadow for multiple layers.

If I were to do what you demonstrate there, I would duplicate the layers before adding drop shadows, move all to top, add shadows to the bottom set, precompose the set with shadows and the set without shadows and use the one on top (without shadows) as a track matte.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]