Should I use two instances of sigmoid

I often ignore this part of the manual. Not because it’s wrong, but because I find Sigmoid to be a really good module for artistic purposes, especially with the new Primaries section. Honestly, I can almost finish an image just using Sigmoid these days, along with the basic modules of exposure, WB, etc.
You can set contrast, skew, colour grade, add an old-film fade… it really is a great module and very robust in my experience.

The manual also talks about how you can adjust Target Black in Sigmoid, but it’s best done with Global Offset in colour balance RGB. Again, not saying the manual is wrong, but I have experimented with both and I can’t tell any difference visually. Maybe the math behind it all works better in the way the manual recommends, but my eyes can’t usually see these differences.

In sum, don’t be afraid to break the “rules” if breaking them produces the results you want and like. Darktable is a toolbox, and it’s great to just experiment and play around with it. That said, I would always recommend to people to read the manual, especially beginners.

1 Like

If you use the waveform you can see that shifting the black in sigmoid actually also impacts the highlights and you get a sort of compression towards the middle whereas the CB is pretty much a black offset lifting the baseline like a black compensation… but visually in many images you are likely right you might not really see a difference…

it’s the result that counts - if its achieved after several deviation from darktables recommendations then it’s completely ok.
darktable doesn’t protect you from shooting into your feet - but if someone likes that pretty gunshot wound then why not?

1 Like

Not being a DT user, I am struggling to follow this interesting thread. May I ask:

Does “sigmoid” refer to an S-shaped mapping?

If so, does the skew slider move the sigmoid function inflection point i.e. to the right, more highlight contrast and to the left, more shadow contrast?

Hi @xpatUSA, I am not an expect on this so I defer to anyone more knowledgeable that answers. However, I would say yes you are correct. I often move the skew slider to the left to add more contrast to the shadows and give more room for the highlights to retain detail. Moving the skew slider to the right increases contrast in the highlights but means you have to be careful not to bleach out the brightest parts of the image.

Thanks for the speedy response, Terry.

I’m a GIMPster, so I imagine that the Curves tool set to smooth would do something similar and that moving a point of maximum slope would have a similar effect.

But of course more adjustment steps than the DT sigmoid function …

I would suggest Sigmoid and Filmic do functions beyond the curves in GIMP, Photoshop, Lightroom and other programs. Darktable also has curves.

I too am a GIMP user but I see the big difference is that DT is predominantly a RAW file editor despite being able to work JPG and TIFF files. GIMP is for JPG and TIFFS and doesn’t do RAW files.

Since I mainly shoot in RAW I have become a dedicated DT user. GIMP I mainly use for photo restoration work.

If you take this test image… and simply open up sigmoid and drop the contrast to around 0.7…and set the histogram to waveform… now you can play with the sliders and basically visualize the change in the mapping curve and color channels when you play with skew and hue preservation…

Sweep_sRGB_Linear_Half_Zip.exr (74.8 KB)

3 Likes

Yes, I already had a quick play in GIMP Curves and it wasn’t particularly easy to emulate a sigmoid-esque function with variable inflection.

I believe the idea of the tone mappers like filmic and sigmoid are to take the high bit depth images of a RAW file and map them into a compressed range that can be viewed on our computer screens or print media. I am happy to be corrected by a more knowledgeable person if this is not the case.

EDIT: I put bit depth when I really should have put dynamic range. But this is well explained by the posts below.

While bit depth does come into play, the mapping concerns the dynamic range (difference between lowest and highest luminosity).

According to wikipedia, paper can handle something around 7 EV (1:128), a standard display ~9EV (1:512), a modern camera 12-14 EV (> 1:4096) . So if you have a scene that covers the full dynamic range of your camera, you have to find a way to reduce that dynamic range (or accept black and/or white areas in your image).
But if you use a straight mapping, you reduce the contrast over the whole image. Human vision is most sensitive to contrast in the midtones, so we like to preserve that as much as possible. That means finding a compromise between contrast in mid tones, highlights and shadows.

You can have a scene that does not exceed the dynamic range of e.g. paper (reproductions of printed images, or a pure diffuse scene, with no shadows or direct lights in the view). In that case, you don’t need a tone mapper.

[Even then, filmic etc. still play a role, in that they also change the way the light values are encoded, from scene-referred to display-referred, but that’s a different issue]

About bit depth not being the most important: you can map any range of luminosities on any bit depth, but the higher the bit depth, the more levels you have. And with more levels, you get more gradual gradients. An extreme exemple is pure black and white: bit depth is 1 bit, but you can cover the full range between black and white… So to get visually smooth transitions, you need either sufficient bits or use tricks like dithering (but that needs higher resolution).

3 Likes

Try here:
https://share.streamlit.io/jandren/tone-curve-explorer
If I recall correctly, sigmoid uses the log logistic curve.
Note that, contrary to ‘display-referred’ (0 … 100% input → 0 … 100% output) curves (like those in Gimp, for example), both sigmoid and filmic work with unbounded input values (theoretically -infinity … +infinity), which they map into the displayable range (0 … 100%). In filmic, you get to choose the actual limits (black and white relative exposures).

2 Likes

Actually you can remove/reduce fog with multiple instances of sigmoid. In the first instance, set contrast to 10, in the second, set contrast lower, depending on how much haze/fog you want to remove. For the parts that are too dark/bright, use tone equalizer and parametric masks.