Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Create matte from underlying transparency

  • Create matte from underlying transparency

    Posted by Mike Foran on June 11, 2019 at 10:14 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?

    Kalleheikki Kannisto replied 6 years, 11 months ago 3 Members · 8 Replies
  • 8 Replies
  • Kalleheikki Kannisto

    June 12, 2019 at 6:41 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

  • Mike Foran

    June 12, 2019 at 12:00 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.

  • Kalleheikki Kannisto

    June 12, 2019 at 7:13 pm

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

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Mike Foran

    June 12, 2019 at 9:04 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.

  • Mike Foran

    June 12, 2019 at 9:29 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.

  • Greg Gesch

    June 12, 2019 at 11:26 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. (?)

  • Mike Foran

    June 13, 2019 at 3:27 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.

  • Kalleheikki Kannisto

    June 13, 2019 at 7:46 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy