This first tutorial aims to explain the concept of a ‘Game changer’ here applied to a sunset.
‘Game changer’ - in French, the term ‘bouleverseur’ suits me well as a translation: it aims to change the usual way of thinking and acting in terms of image processing. Before changing the way we do things, we must first agree on the way we see things.
In this tutorial, we will see how to use ‘Generalized Hyperbolic Stretch’ (GHS) and ‘Abstract Profile’ (AP) together. Of course, other tools are necessary; we will see them later.
Image selection:
Image n°5 IMGP2426.DNG from the Rawtherapee Processing Challenge feedback (begin 2024)
Image
Raw file (Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License)
Attribution: David Oliver, doliver.co.uk
This image seems innocuous at first glance, a typical sunset. The image is generally underexposed, and the sun doesn’t appear overexposed.
Learning objective:
The user will understand the ‘Game changer’ approach discussed in this tutorial:
-
The role of ‘GHS’ in the linear portion of the data, which can be considered a ‘Pre-tone-mapper’
-
The role of ‘Abstract Profile’, which prepares the data for use in the output (screen, TIFF/JPG).
-
Minimize the use of other tools, aside from those essential for the proper functioning of RawTherapee, GHS, and AP, and reduce back-and-forth navigation within the GUI.
-
Highlight the tools to avoid and those that can be beneficial.
-
The settings (sliders, checkboxes, etc.) are provided for illustrative purposes. They are not intended to provide perfect settings, but rather to show the way forward.
Pedagogical approach:
-
The lack of easily accessible and up-to-date documentation hinders this presentation, but we will manage without it (or almost without).
-
I will make two posts to avoid overloading the presentation:
a) The first post (this one) will cover GHS - the ‘White Point (WP linear)’ and ‘Black Point (BP linear)’ settings, ‘Symmetry Point (SP)’, as well as the main settings ‘Stretch Factor (D)’ and ‘Local Intensity (b)’ and also ‘Inverse GHS’. This first step will include the necessary adjustments to make beforehand: ‘Highlight Reconstruction’, ‘Capture Sharpening’, and ‘White Balance’.
b) The second will use ‘Abstract Profile’.
For each of these posts, I will include a (pp3) – which will be roughly the same as the final version, but with the steps subsequent to the one presented removed.
First step: GHS and necessary adjustments
-
Deactivate everything, switch to ‘Neutral’ mode
-
Activate ‘Capture Sharpening’ (Raw Tab): check that ‘Contrast threshold’ displays a value other than zero. Otherwise, it means it is not operational (noisy image). Resolving this potential problem related to noisy images will be covered in a later tutorial.
-
The image was taken outdoors at sunset, therefore with a daylight illuminant, so there is no problem setting the white balance (Color Tab) to ‘Automatic & refinement > Temperature correlation’.
-
To make the settings easier, set the ‘gamut’ knob so that the data and histogram use the same values as those – linear + working profile. During the process, you will regularly switch to viewing the histogram in gamma + output profile mode to see any overshoots caused by these changes and try to correct them.

-
In the Exposure Tab, disable ‘Clip out-of-gamut colors’, enable ‘Highlight reconstruction’, and zoom the image to 100% while examining the sun. Try ‘Inpaint Opposed’, ‘Blend’, and ‘Color Propagation’. For each case, re-enable ‘Clip out-of-gamut colors’ and observe the differences. The image without artifacts (I think?) is with ‘Color Propagation’ and ‘Clip out-of-gamut colors’ disabled. Try ‘Blur’ (Color Propagation) to see if artifacts at transitions appear or disappear. ‘Blur’ is finally set to 0.
-
Do not enable the following tools, as they will interfere with the operation of GHS: a) ‘Contrast by Details Levels’ (Detail Tabs). You can use this feature later if necessary, but in ‘Selective Editing’ with a new RT-Spot; b) ‘Graduated Filter’ (Exposure Tab) - a GHS function (Inverse GHS) allows for easy substitution. c) ‘Dynamic Range Compression’ (Exposure Tab). A redesign of the process would be necessary to place ‘Selective Editing’ further upstream, but this is complex in terms of event handling.
IMGP2426.DNG-1.pp3 (20.0 KB)
Using GHS
Preamble
I won’t compare it to other tone mappers in RawTherapee or other software, using tables or a pros/cons list. That would be tedious and probably not very interesting from a user’s perspective. I will simply (given the lack of documentation) draw your attention to the specific points that are crucial:
-
Setting the ‘White point (WP linear)’ and ‘Black point (BP)’ is THE first fundamental aspect of its operation. It is done entirely in linear mode (unlike Black EV and White EV). It is dynamic, meaning that each new session (for example, when creating a second RT Spot) recalculates and triggers the GHS algorithm. Consequently, the values are always accurate (at least in theory). Preferably, use the ‘Auto Black point & White point’ checkbox (except in Inverse mode). This setting is only accessible if ‘Stretch factor (D)’ is between 0.001 and 0.002. These very low values will have little effect on the image, but they allow adjustments to ‘WP Linear’ and ‘BP Linear’ and enable the GHS algorithm to function.
-
To understand how this works in the simplest way possible, let’s assume that the base data, before the calculation and implementation of ‘BP Linear’ and ‘WP Linear’, is in the range [0, 1] (this is rarely the case)… If the ‘auto’ setting for ‘BP Linear’ is 0.05 and ‘WP Linear’ is 3.05. This means that if we do nothing, the actual data after the ‘Color Propagation’ action would be 0.05 for the BP (resulting in a loss of contrast due to an excessively high black point) and a WP of 3.05, which will be incompatible (or very poorly handled) by the majority of Rawtherapee’s algorithms, which are not at all designed to work with huge values, often resulting in data clipping, color drift, etc. The RGB data will be transformed by dividing the actual values by a factor equal to the difference between ‘WP linear’ and ‘BP linear’, which here is 3.05 - 0.05, therefore 3. This means that the data we saw in the ‘Preview’ which was in the range [0, 1] becomes [0, 0.33]. The image becomes extremely dark, but the sun enters the gamut with a value of 1.
-
The second factor to consider, and one that caused me a lot of problems, is determining the ‘Symmetry Point (SP)’ value. Theoretically, this is the peak of the luminance in the histogram in linear mode. In astrophotography software, the user clicks on an area that seems most promising. This seems quite obvious: the brightest nebulae located near stars. The ‘SP’ is then adjusted to the value found. In the case of general-purpose images, I challenge anyone to find the area where the histogram (luminance portion) has its maximum in both Working Profile and Linear modes. This ‘SP’ is THE second key point that determines how the algorithm works. It has little to no relation to mid-grey. GHS’s complex calculations use a variety of complex hyperbolic functions, depending on the values of ‘SP’, ‘Stretch factor (D)’, and especially ‘Local Intensity (b)’. These functions provide an asymptote to the luminance for highlights and adjust the amplitude range (increasing or decreasing) of the data within the interval [0-1] to make the image acceptable. By default, leave the ‘Symmetry point (SP)’ slider checkbox set to Automatic.
-
Of course, I suggest you try modifying these ‘auto’ settings and changing ‘Color Propagation’ to something else. Uncheck the ‘auto’ boxes, set ‘Stretch factor (D)’ to 0.001 (default), change ‘SP’, and change ‘WP linear’ and ‘BP linear’. … Just to see the effects and potentially find better settings.
-
The ‘GHS Curve Visualization’ has very little relation to a ‘Tone curve’, it only reflects the action of hyperbolic functions and not the direct action on tones.
Adjusting ‘Stretch factor (D)’ and ‘Local Intensity (b)’
‘Stretch factor (D)’ will stretch (and compress) the image data according to the areas. It is a logarithmic function (but has absolutely no relation to Filmic or Log encoding). You will notice that there are only positive values – we are working in ‘positive space’. If you want to use the equivalent of negative values (which is impossible with a Log function), you must switch to ‘Inverse GHS’ mode, which activates ‘negative space’ mode. We will see this later.
’Local intensity (b)’ will localize the effect of Stretch. Depending on its value, hyperbolic functions of very different natures will modify the data (the only point in common with Sigmoid is the term hyperbolic).
Let’s return to the image to be processed.
I have made a series of adjustments that provide a possible solution. I’m not aiming for perfection, but rather for clarity.
‘Stretch factor (D)’ is set to 6.844, and ‘Local intensity (b)’ to 8.558. Try changing these values.
Two points to note:
-
I set ‘Protect highlight (HP)’ to 0.67849. You can see the effect on the View Curve. This setting aims to subjectively reduce the highlight value.
-
Note that GHS settings can cause data (depending on the GHS settings) to fall outside the [0, 1] range, both in linear and output data. Constantly monitor the histogram in both modes (working profile - linear and output profile - gamma) and make any necessary corrections.
-
In ‘Stretch Regularization & Midtones’, I set the value (LC) – the local contrast – to zero to avoid artifacts in the sun area.
-
To see the effects, instead of a single ‘Stretch factor (D)’ of 6.844 and ‘Local intensity (b)’ of 8.558, you can try constructing the stretch using two spots. The first with lower (D) and (b) values. The second with values adjusted to your preference. You’ll see that for this second RT-spot, the values of (BP linear) will be close to zero, and those of (WP linear) very close to 1.0 (minor adjustments are possible). The image will be different, the sun less prominent…
The image is starting to become ‘watchable’
IMGP2426.DNG-2.pp3 (20.0 KB)
Inverse GHS
This function, not available in Selective Editing’s ‘Basic’ complexity mode, allows you to undo previous actions on all (somewhat oddly) or part of the image. It works similarly to ‘negative space’.
The selection of the ‘White point (WP linear)’ and ‘Black point (BP linear)’ is manual… Move closer to [0, 1] if it isn’t already.
In the case of the processed image, I created a second RT-spot in normal mode, in the form of a rectangle. Its purpose is to reduce the effect in the sky area without significantly affecting the sun. It resembles (somewhat) a Graduated Filter. The center was placed on a cloud, with the Scope set to 60. The center of the spot is positioned relatively far in the image. Of course, you can change the position of the RT-spot, Scope, and Transition in Selective Editing > Settings.
Sliders like ‘Stretch factor (D)’ work in reverse. They reduce contrast, darkening the image.
IMGP2426.DNG-3.pp3 (20.0 KB)
The image is now ready for processing with ‘Abstract profile’.


