Matte only over items of a specific color?

Moderators: Disciple, zlovatt

Post Reply
JacobACrocker
Posts: 2
Joined: June 9th, 2021, 3:36 pm

Example scenario:

I have 4 boxes. Box 1 is blue, Boxes 2 & 3 are a specific color of red and Box 4 is green. I would like Box 1 (blue) to only be visible when overlapping a red box. If Box 1 overlaps Box 4 (green) nothing happens.

My question: Is there a way I can matte a shape so that it is only visible when it overlaps a specific color? Essentially like a “Set Matte” effect that is driven by an RGB hex code rather than a layer’s bounds.

crossrad
Posts: 9
Joined: May 1st, 2021, 1:36 pm
Contact:

Yes, you can create "TrackMattes" which is basically saying mask one layer (A) by the one (B) immediately above it. This layer can be a copy of another layer and have various colour manipulations applied. Wherever the result is white, A will be visible, black it will not.

The attached project achieves this, but thinking about it, it may not be quite what you wanted because I have the coloured boxes in diferent comps. An efect that might be useful is Channel->Set Channels which allows you to pick particular RGBs.

If you only used RGB as part of your description but actully want to use precise colours in the Track Matte, then you are into keying and you may want to look at Keying->Keylight (1.2).

Attachments
MateItemsSpecificColor.zip
(11.94 KiB) Downloaded 17 times
JacobACrocker
Posts: 2
Joined: June 9th, 2021, 3:36 pm

Thanks for the reply! Unfortunately, pre-comping and regular mattes wont work for my purpose.
I am trying to achieve a similar effect to this:
In this show that my kids watch, the characters have outlines that only show up when they cross over an object with the same fill color. Example being if a hand crosses over the face, the hand would have an outline to separate it. You can see this effect when this character's arms move in-front and behind her body. There is an outline that appears matted to the parts sharing the same fill color.

https://youtu.be/1F-4b7ewr6U?t=848

I know this show was made in Toon Boom, but I have after effects and am trying to replicate this effect.

Attachments
Screen Shot 2021-06-14 at 8.13.10 AM.png
Screen Shot 2021-06-14 at 8.13.10 AM.png (149.31 KiB) Viewed 279 times
crossrad
Posts: 9
Joined: May 1st, 2021, 1:36 pm
Contact:

I think I understand what you are trying to do better now. I will stick with my original answer though - track mattes with colour manipulations have amazing possibilities - here is a short example - the plane has been coloured blue to match the sky. A red border has been added which is active only when the plane is over the sky, not when it is over the white clouds.

https://youtu.be/eI33koHc_BA

I can attach the AE project file but unfortunately the footage is much too large, so it may be difficult to use.

Attachments
AEE_150621.zip
(39.54 KiB) Downloaded 16 times
Post Reply