Answers.Body: <p>So, if we will continue analogy with Lego blocks:</p>
  
  <ol>
  <li>First you need add On &amp; Off effect for your blocks. You can find <a href="http://lesterbanks.com/2012/02/creating-an-on-off-expression-in-after-effects/" rel="nofollow">here</a> how.</li>
  <li>Then you shall add Collision detection. You can find about it <a href="http://www.motionscript.com/design-guide/collision.html" rel="nofollow">here</a>.</li>
  <li>Now you need to trigger On &amp; Off effect when your object (mask?) collide with block. </li>
  </ol>
  
  <p>I never tried it myself, but now really want to test it!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-14T14:16:13.230Z
Answers.Text: Thank you so much! This is great thank you!! to clarify the way you are suggesting would mean I am copying the code from the collision detection into the on/off effect? It seems the code may be used in itself to have an on/off effect, by saying its on (100% opacity) when it detects collision and off (30% opacity) otherwise. If this is possible, where in the layer would you put the collision code if you did not use the on off effect?
Answers.UserDisplayName: Caitlin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-14T21:01:59.007Z
Answers.Text: Once again, I don't have experience in doing it myself. You shall try it couple different ways on 2-3 objects, and when you will find correct way, just do it for whole project.
Answers.UserDisplayName: Shultc
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-14T11:20:13.360Z
Answers.LastActivityDate: 2016-04-14T11:39:04.453Z
Answers.LastEditDate: 2016-04-14T11:39:04.453Z
Answers.UserDisplayName: Shultc
Body: <p>I'm looking for a way to reveal my entire layer when a portion of my mask covers the layer. I have a composition with multiple individual layers, that I want to reveal with a set matte. However lets say when 30 percent of the layer is covered I would like the entire layer to appear. When it's less than 30 percent the layer does not need to appear. </p>
  
  <p>Another option may be a correlation between opacity and area covered. Like 20 percent covered 20 percent opacity, 60 percent covered 60 percent opacity, etc</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T18:56:01.327Z
Comments.Text: As far as i see, the way to go for this would be through expressions. Unfortunately AE "Expressions" don't seem to have a parameter to query individual mask points and thereby gather data to calculate the size they cover. I think it could be helpful if you described what you are trying to achieve, to enable others to think if there is another way than you are envisioning it.
Comments.UserDisplayName: Hans Meiser
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T18:58:03.623Z
Comments.Text: For example i didnt quite understand how (and why) the mask is changing its size, what the shape is (square, round, elliptic, complex) etc.pp.
Comments.UserDisplayName: Hans Meiser
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T21:33:19.190Z
Comments.Text: Sure! I am making a project that attempts to combine an art and music work. There are columns of pictures in the artwork. The masks key points are extracted from the audio of the music so that it becomes bigger at louder points. The mask I created is a rectangle placed in the center of the artwork. Since the artwork is a grouping of separate compositions, I would prefer for the pieces to appear together.
Comments.UserDisplayName: Caitlin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T21:35:11.220Z
Comments.Text: To make an analogy, it would be like revealing lego blocks with a mask. You want them to be revealed with a mask, but the lego block is seen to appear as a single unit instead of partial pieces
Comments.UserDisplayName: Caitlin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T21:39:38.357Z
Comments.Text: Ok, so just an idea: audio levels are relatively equivalent to mask size, right? So if you cannot query mask size, you could use the audio level values to additionally set opacity by using an expression, which would be fairly easy...
Comments.UserDisplayName: Hans Meiser
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-13T22:06:41.163Z
Comments.Text: http://www.motionscript.com/design-guide/basic-audio.html
  
  which is probably what you are doing already, if mask size responds to audio level... just additionally add it to opacity as well! (unless i misunderstood what you want to do ;)
Comments.UserDisplayName: Hans Meiser
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-14T00:44:14.243Z
Comments.Text: Right! I think I know what you mean, but I think I'm trying to do something a little different. I'll put more detail in lego terms to see. There is a wall of legos in the composition. I am revealing these separate layers (one for each block) with a mask (set matte) rectangle in the center whose scale is dictated by an audio file. So the louder the audio the more blocks are revealed. However what I want to change is that I want either a lego to appear or not. I do not want the mask to reveal parts of the block like it cuts into right now. Is that different from what it sounded like before?
Comments.UserDisplayName: Caitlin
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-15T09:16:19.520Z
Comments.Text: I think your description of what you want would be much simpler with a few pictures/sketches/screenshots - it's a bit tricky to understand as text!
Comments.UserDisplayName: tomh
Tags: <after-effects><after-effects-expressions><mask>
Title: Reveal entire layer in after effects with mask partial overlap
UserDisplayName: Caitlin
ThreadText: # Reveal entire layer in after effects with mask partial overlap
  
  (Asked by: username_0 on 2016-04-13)
  
  I'm looking for a way to reveal my entire layer when a portion of my mask covers the layer. I have a composition with multiple individual layers, that I want to reveal with a set matte. However lets say when 30 percent of the layer is covered I would like the entire layer to appear. When it's less than 30 percent the layer does not need to appear.
  
  Another option may be a correlation between opacity and area covered. Like 20 percent covered 20 percent opacity, 60 percent covered 60 percent opacity, etc
  
  **Tags:** after-effects, after-effects-expressions, mask
  
  > **Comments:**
  > **username_1**: As far as i see, the way to go for this would be through expressions. Unfortunately AE "Expressions" don't seem to have a parameter to query individual mask points and thereby gather data to calculate the size they cover. I think it could be helpful if you described what you are trying to achieve, to enable others to think if there is another way than you are envisioning it.  
  > **username_1**: For example i didnt quite understand how (and why) the mask is changing its size, what the shape is (square, round, elliptic, complex) etc.pp.  
  > **username_0**: Sure! I am making a project that attempts to combine an art and music work. There are columns of pictures in the artwork. The masks key points are extracted from the audio of the music so that it becomes bigger at louder points. The mask I created is a rectangle placed in the center of the artwork. Since the artwork is a grouping of separate compositions, I would prefer for the pieces to appear together.  
  > **username_0**: To make an analogy, it would be like revealing lego blocks with a mask. You want them to be revealed with a mask, but the lego block is seen to appear as a single unit instead of partial pieces  
  > **username_1**: Ok, so just an idea: audio levels are relatively equivalent to mask size, right? So if you cannot query mask size, you could use the audio level values to additionally set opacity by using an expression, which would be fairly easy...  
  > **username_1**: http://www.motionscript.com/design-guide/basic-audio.html  which is probably what you are doing already, if mask size responds to audio level... just additionally add it to opacity as well! (unless i misunderstood what you want to do ;)  
  > **username_0**: Right! I think I know what you mean, but I think I'm trying to do something a little different. I'll put more detail in lego terms to see. There is a wall of legos in the composition. I am revealing these separate layers (one for each block) with a mask (set matte) rectangle in the center whose scale is dictated by an audio file. So the louder the audio the more blocks are revealed. However what I want to change is that I want either a lego to appear or not. I do not want the mask to reveal parts of the block like it cuts into right now. Is that different from what it sounded like before?  
  > **username_2**: I think your description of what you want would be much simpler with a few pictures/sketches/screenshots - it's a bit tricky to understand as text!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2016-04-14. Score: 0 | Accepted answer
  
  So, if we will continue analogy with Lego blocks:
  
  1. First you need add On & Off effect for your blocks. You can find [here](http://lesterbanks.com/2012/02/creating-an-on-off-expression-in-after-effects/) how.
  2. Then you shall add Collision detection. You can find about it [here](http://www.motionscript.com/design-guide/collision.html).
  3. Now you need to trigger On & Off effect when your object (mask?) collide with block.
  
  I never tried it myself, but now really want to test it!
  
  > **Comments:**
  > **username_0**: Thank you so much! This is great thank you!! to clarify the way you are suggesting would mean I am copying the code from the collision detection into the on/off effect? It seems the code may be used in itself to have an on/off effect, by saying its on (100% opacity) when it detects collision and off (30% opacity) otherwise. If this is possible, where in the layer would you put the collision code if you did not use the on off effect?  
  > **username_3**: Once again, I don't have experience in doing it myself. You shall try it couple different ways on 2-3 objects, and when you will find correct way, just do it for whole project.  
  
  ---
  
  