LuminanceCurve & LightnessCurve
The CurveTools are a set of Photoshop actions for Photoshop CS/CS2/CS3 that allow the user to apply a tone mapping (or zone mapping, if you like). The CurveTools are unique in fully decoupling the luminosity of pixels from their color (hue & saturation), and allowing for luminosity-only adjustments on pixels as a function of their original luminosity.
This is unlike other common tools, such as Photoshop’s standard curves or a lightness curve in Lab mode, both of which have side-effects on saturation and sometimes hue. In fact, an alternate description of the CurveTools is to differentially change the exposure of pixels, depending on their luminance value. For this reason, it may be intuitive to think of the curves as exposure curves.
Note: Most of the functionality of the CurveTools has been superseded by the Tonability plug-in for Photoshop (Windows only).
Download (freeware)
CurveTools.zip (contains two separate action sets for gamma 1.8 & gamma 2.2 spaces)
Applications
The CurveTools really come into their own on images that need large tonal adjustments. Examples are highlight compression, single-shot HDR images, the contrast boosting of flat images and the setting of black points. Using the standard curves tools in Photoshop, these large adjustments create very visible side-effects on the hue and saturation. For a comparison of the luminance curve with more conventional curves that are available within Photoshop, see the following example, in which we try to boost up the shadow detail using four different methods. .
ACR conversion of a very contrasty (and overly typical) Venetian scene, produced using ‘linear’ tone mapping settings (explained here).
The same image, with a tonal mapping applied using three common methods, compared with the application of the Luminance Curve (bottom right).
Usage instructions
- Install the action set by clicking the rightward-pointing triangle on the action palette in Photoshop (downward pointing menu arrow in CS3).
- Select the topmost layer in the image you wish to apply a curve tool to and run the appropriate action. Make sure to use a tool that matches your document’s gamma-encoding.
- Double-click on the Luminance curve or Lightness curve layer to modify the appropriate curve.
Requirements & notes:
- The CurveTools need to be designed specifically to match the gamma of the RGB colour space. There are two action sets (.atn files), one for gamma 1.8 and one for gamma 2.2 spaces.
- The CurveTools perform quite large adjustments on layers. Therefore it is recommended to use them only on 16-bit images, although the 16-bit layer operations limit its use to Photoshop CS or higher. The CurveTools might work in 8-bit mode on older versions of Photoshop, but this has not been tested and the results will likely disappoint.
Luminance or Lightness curve?
The CurveTools set contains two tools named LuminanceCurve and LightnessCurve. They differ only in the units on the axes of the curve adjustment. In the case of LuminanceCurve, this is the more physical gamma-encoded luminance Y^(1/gamma), whereas LightnessCurve uses the perceptual lightness L*. Both tools can be used to generate exactly the same results, but the different choice of units can make one preferable to the other.
A few examples of operations with common tool choices:
Exposure adjustments:
Use LuminanceCurve, as a straight line through the origin corresponds precisely to an exposure adjustment.
Tonal compression or stretching (such as blackpoint setting):
Use LightnessCurve, in which any straight line maps a perceptual lightness range uniformly onto another.
Generic luminance tone curves (for re-use):
Use LightnessCurve, in which the shape of a curve is independent of the gamma of the RGB-space.
Image-specific custom curves:
Use LuminanceCurve, as it uses less operations and a smaller layer stack than its lightness counterpart.
Which version?
Both LuminanceCurve and LightnessCurve come in three variants, functionally only differing in the maximum amount of brightness that can be added. The maximum brightening is given in F-stops. Obviously, the variant with the largest exposure latitude is the most flexible of the three, but the extreme tonal adjustments can lead to significant banding in the preview. When working on 16-bit files, this banding will not be visible in the final image. When large brightness increases are not needed, the medium version is usually a better option. Finally there is the darkening only variant that skips a number of processing steps to create a smaller, thus faster, layer stack.
Inner workings
For the technically inclined, I’ll give a short overview of the inner workings of the CurveTools. First, let me list what they are not. The CurveTools are not
- curves with luminosity blending mode. Unfortunately, Photoshop does not compensate for the document space gamma before calculating the luminosity (big issue) and uses default weights for the RGB channels (smaller issue). Also, the scale that is used for the adjustments (RGB-value) is not a perceptually relevant scale (like Y or L*) on which a curve adjustment should be based.
- Lightness-channel curves in Lab-space. That doesn’t work properly either because the a and b-channels are not completely independent of L*.
Here is an overview of the CurveTools in a pseudo-code like manner that roughly corresponds to the final layer stack as traversed from the bottom up.
- Calculate a pixel’s luminance Y, gamma encoded as Y^(1/gamma)
- In the LightnessCurve action, transform to L*
- Apply a user-defined curve to either Y^(1/gamma) or L*, forming Y’^(1/gamma) or L*’ respectively for LuminanceCurve and LightnessCurve.
- In the LightnessCurve action, transform L*’ back to Y’^(1/gamma)
- Calculate the multiplication factor F=(1/k)*(Y’/Y)^(1/gamma), where 1<=k<=4 determines the exposure headroom (due to restrictions in Photoshop).
- Multiply the original RGB triplet by F
- Multiply by k to recover the proper brightness
- To properly handle blow-out highlights, re-apply the hue of the original image
Copyright and license statement
Copyright (c) Simon Tindemans. All Rights Reserved.
Redistribution in original or modified form is permitted provided the above copyright notice and a link to this web page is included. The name of the author may not be used to promote or endorse derivative products without prior written consent. This software is provided ‘as is’, without warranty whatsoever, including noninfringement. The author takes no responsibility for damage of any kind resulting from the use of the CurveTools.