Blend Modes - Multiply and Screen - Soft Light

Soft Light

This is a softer version of Overlay. Applying pure black or white does not result in pure black or white.

There are a variety of different methods of applying a soft light blend. The formula used by Photoshop has a discontinuity, and other formulas correct it. Photoshop's formula is:

 f_{photoshop}(a,b) = \begin{cases} 2 a b + a^2 (1 - 2 b), &\mbox{if } b < 0.5 \\ 2 a (1 - b) + \sqrt{a} (2 b - 1), &\mbox{otherwise} \end{cases}

where a is the base layer value and b is the blend value. (Note, this formula is not the official one from Adobe but rather was reverse engineered by http://www.pegtop.net/delphi/articles/blendmodes/softlight.htm. Adobe's equations are not officially documented anywhere, as they are proprietary and are probably legally considered "trade secrets". In fact, the reverse engineered equation for Soft Light is incorrect! I have just tested it and checked and rechecked it in my own software using this reverse engineered algorithm, and it is consistently giving visibly different results than the official Adobe implementation. In case the version of Photoshop makes a difference, the version I have that I used to do the comparison was Photoshop Elements 9.)

Pegtop's formula is smoother and corrects the discontinuity at a = 0.5:

A third formula defined by illusions.hu corrects the discontinuity in a different way, preserving some gamma properties:

The formula specified by recent W3C drafts for SVG and Canvas is mathematically equivalent to the Photoshop formula with a small variation where b≥0.5 and a≤0.25:


f_{w3c}(a, b) =
\begin{cases} a - (1 - 2 b) \cdot a \cdot (1 - a) & \text{if } b \leq 0.5 \\ a + (2 b - 1) \cdot (g_{w3c}(a) - a) & \text{otherwise}
\end{cases}

where


g_{w3c}(a) =
\begin{cases} ((16 a - 12) \cdot a + 4) \cdot a & \text{if } a \leq 0.25 \\ \sqrt{a} & \text{otherwise}
\end{cases}
.

This is also the formula used by Cairo, and in earlier PDF documentation.

Note that this W3C variation is the actual variation used by Photoshop (at least in my version of Photoshop which is Photoshop Elements 9). I determined this by using Visual Basic 6 to implement each of the Soft Light variations listed here on this Wikipedia page, until I found the one that is identical to the one in Photoshop (with only difference being invisibly small pixel value differences of 1 in some cases, which are most likely due to differences in rounding errors between VB6's math and Photoshop's math)

Read more about this topic:  Blend Modes, Multiply and Screen

Famous quotes containing the words soft and/or light:

    O why do you walk through the fields in gloves,
    Missing so much and so much?
    O fat white woman whom nobody loves,
    Why do you walk through the fields in gloves,
    When the grass is soft as the breast of doves
    And shivering sweet to the touch?
    Frances Cornford (1886–1960)

    Decade after decade, artists came to paint the light of Provincetown, and comparisons were made to the lagoons of Venice and the marshes of Holland, but then the summer ended and most of the painters left, and the long dingy undergarment of the gray New England winter, gray as the spirit of my mood, came down to visit.
    Norman Mailer (b. 1923)