Revisiting the concept of creating and using Luminosity Masks in GIMP. This script-fu will generate a full set of Light, Dark, and Midtone masks as channels for your image (based on the work of Tony Kuyper originally).
This is the automated script-fu version of the full tutorial that can be found here:
Getting Around in GIMP - Luminosity Masks Revisited
Once installed, the filter can be found at
Filters → Generic → Luminosity Masks (patdavid)...