Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to make mask reveal entire object instantly when majority of object is covered

New Here ,
Aug 07, 2025 Aug 07, 2025

I have this composition which contains several squares. My idea was to create a mask that gradually reveals each square from a specific point. My plan was to use a simple circular mask, but I was wondering if there's an effect or an expression that can make each full square reveal instantly as soon as the mask touches it? or when the mask has covered the majority of a square. 

Thanks

TOPICS
Expressions , How to , Scripting
167
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 07, 2025 Aug 07, 2025

Hi Emil,

Thanks for the question. I think there probably is a way to do this effect using an expression. Perhaps a community member will drop by and help you with that.

 

I think that your current idea could work with the mask on a separate layer, like a reveal mask layer.

 

Try this:

Set each square’s Track Matte to Alpha Matte using its corresponding mask layer.

 

Then you could animate the mask’s position, so it passes over each square.

 

As soon as the mask overlaps a square, the square should appear.

 

Does that work? If not, I hope that a community member will drop by shortly. Sorry for the frustration.

 

Thanks,

Kevin

 

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 07, 2025 Aug 07, 2025

Hi Kevin!

I think your solution matches exactly what I have right now, but perhaps I’m not following what you mean?

In the attached video, there is a separate layer consisting of a circle that works as a mask for all the squares. As you can see, each square’s track matte is set to alpha matte using the circle.

My problem is that I don’t want each square to be revealed gradually by the shape of the circle. Instead, I want each complete square to appear instantly when my mask touches the square. In that way the outer edges of the circle won’t be noticable, and it will look like each square is revealed individually.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 08, 2025 Aug 08, 2025

Hi,

 

I think I'd do this using the Mosaic effect on the circle layer and settings the block width and height to match the size of the squares.  I did this by knowing the size of the squares, then taking my Comp's width and dividing it by that number (e.g. 1920 / 40) and then doing the same for the height (1080 / 40)

I did have to cheat a little to line up the squares, but as I expand the shape the underneath blocks pop into existence.

 

 blocks.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2025 Aug 08, 2025
LATEST

Try this. Make sure the anchor points of each layer are centered to their respective shapes (which they already appear to be in your video).

var circle = thisComp.layer("trigger"); // change layer name to the name of your circle layer

var circleCenter = circle.toComp(circle.anchorPoint);
var circleRect = circle.sourceRectAtTime();
var circleRadius = (circleRect.width / 2) * circle.transform.scale[0] / 100;
var srcCenter = thisLayer.toComp(thisLayer.anchorPoint);
var dist = length(srcCenter, circleCenter);

if (dist <= circleRadius) {
    100;
} else {
    0;
}

 This finds the distance between the center of the circle and the edge of the circle, i.e. the radius of the circle (var circleRadius). It then compares the radius of the circle to the distance between the center of the circle and the center of thisLayer (var dist). If circleRadius is greater or equal to dist, the opacity is set to 100. Keep in mind, shape layers have various different levels of possible transformations (it could have seperate transform controls for the shape itself, the shape group, and for the layer as a whole, etc.). When using expressions with shape layers, scaling the shape itself may produce different results than scaling the entire layer, and same goes for other transformations like position, rotation. Just something to be aware of if you notice it doesn't work as expected. However, for this specific use case it should do the trick.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines