Mask literally means to hide. We already know about clipping mask where you draw a path over the image or shape and then hide the unwanted areas.
Tip: You can also use Effect > Stylize> Feather which will soften the edges of the shape or image which is inside the mask, or otherwise. (The result will be a raster, the max is 250pt)
In the terminology of masking, black means to hide, white means to reveal, gray means to partially hide.
- I pasted two images on the artboard, one on the top and another at the bottom, they are partially overlapping each other horizontally in the center.
- On the top image, we will draw a shape (rect) which will cover that entire image and we will cut that shape.
- We will still keep the top image selected and will go to Window > Transparency SHIFT+CTRL+F10
- Click on the top right corner of the transparency panel and click on Make Opacity Mask, you will now see a tiny black thumb which accompanies the thumb of the image in the transparency panel. You will also see a tiny chain or link icon which is connecting both of the thumbs. At the same moment you will see that the image is no longer visible and you have 3 buttons, release, clip and invert.
- You will click on the black thumb and you will go to Edit > Paste in Front
- Now go to Gradient panel and confine the gradient only to black and white and you can change the angle per the need, for example 90 degree. How much portion of your image is visible within the mask is decided by the volume of black and white in the gradient panel, if you want to reveal more you will obviously drag the stop of the white slider in the gradient ramp more.
- If you want to totally hide the black area, you will click on the black stop in the gradient panel and you will make its opacity 0%.
- Remember till now you are in the mask mode, so you have to exit this mode by clicking again on the thumb of your image in the transparency panel.
- You can also disable the opacity mask to temporarily hide the applied effect.
- You can release the opacity mask if you no longer need it.
- Once you are done with all the above steps and you exit the opacity mask mode, if you feel the need to again edit the mask, you have to again go to the transparency panel and click on the mask thumb and edit the gradient.
- There can be masks inside the mask, for example first you may need to apply clipping mask, and then you use opacity mask and then again if you feel then need to apply clipping mask you may do so, this can be done as many times as you need. When you need to access the inside portion or the subject, you may double click on the masked object. You can also use the direct selection tool to select the objects inside the mask.
You can increase or decrease the opacity of the shadow, can decide the distance between the target shape and the shadow (which is called offset) and can also decide the blurness, as well as color/darkness of the shadow. This is further controllable through the apperance panel.