Here is an example of using Mask:
The goal is to create a false Day-for-Night image. In order to do this we need to isolate large bright parts of the image and then darken them.
This can be done in theory with curves where we invert all pixels above middle gray. However with curves we don't have enough control over how it is applied, in particular we want the mask to be blurred to avoid darkening any small details. Using curves the image will not be very convincing Night-Time..
We will use luminance mask then clamp the mask with levels to create it black/white, blur it and then use gamma to darken the image.
1. Original image
2. Create mask from the image Luminance
3. This is the Mask, the image is in Mask mode
4. Apply Levels on the Mask
5. We want the Mask to be more black/white instead of various shades of gray so we will isolate only part of the tonal range
We can also use brushes at this point to paint with white over the residue dark color in the sky to refine the mask better. But we will not do it in this example.
6. Apply Gaussian Blur to the mask so it smoothes the mask edges
7. Switch Off the Mask Editing (same as using Show Channels - Mask)
8. We are back in Composite image, nothing has changed yet
9. Now adjust the Gamma to make the image dark
10. The Gamma will be applied only where the mask was white creating a Day-For-Night inversion.