In many videos I see and texts I read, I often encounter the phrase “…and then play with these blend types until you find one you like”. While the click-and-pray approach is a very valid technique, I think it would be better if Blender users had an understanding of what exactly these blend modes do and how they work, so aimless clicking would at the very least become educated guessing
In this thread I’d like to gather the information about all various blending modes Blender uses throughout it’s toolset (textures, materials, compositing, etc.) so that it can be compiled into a nice table and then put into Wiki, along with links in the pages that reference these modes (so that the documentation contains something meaningful instead of just a screenshot of the list of blending modes). I understand there are sites such as http://graphicssoft.about.com where you can learn about how all these modes work in principle, but it would be nice to have the info right there in the Wiki, with concrete explanation on how Blender implements its blending modes. Also I’d like to include formulas so artists and users with math knowledge can take advantage of that as well.
So here goes, my current understanding:
(LEGEND)
a - base (first) layer, i.e. source image, base color
b - blend (second) layer, i.e. texture, color ramp value
f - blending factor (Factor, Fac, Alpha where applicable)
a[SUB]i[/SUB] - per-component operation (i.e. comparisons and computations are done separately for RGB values)
a[SUB]H[/SUB], a[SUB]S[/SUB], a[SUB]V[/SUB] - hue, saturation and value elements of a single fragment
mix(a,b,f) = a⋅(1-f) + b⋅f = a + f⋅(b-a)
HSV(h,s,v) - compose a single fragment out of hue, saturation and value parameters
[TABLE=“class: grid, width: 100%, align: left”]
[TH]Blend mode[/TH]
[TH=“width: 33%”]Formula[/TH]
[TH=“width: 33%”]Description[/TH]
Linear Light
a + f⋅(2⋅b - 1)
Brightens base layer depending on blend layer. If blend layer is more than 50% bright, base layer is brightened by the blend layer values, otherwise it is darkened by the blend layer values
Soft Light
mix(a, mix(b⋅a, 1-(1-b)⋅(1-a), a), f)
Lightens or darkens base layer depending on the blend layer brighntess. The effect is softer than that of Linear Light or Overlay modes, with pure white and pure black blend layers not yielding pure white/black results.
Color
mix(a, HSV(b[SUB]H[/SUB], b[SUB]S[/SUB], a[SUB]V[/SUB]), f)
Mixes hue and saturation of the blend layer into the base layer
Value
HSV(a[SUB]H[/SUB], a[SUB]S[/SUB], mix(a[SUB]V[/SUB], b[SUB]V, [/SUB]f))
Mixes value of the blend layer into the base layer
Saturation
HSV(a[SUB]H[/SUB], mix(a[SUB]S[/SUB],b[SUB]S[/SUB],f), a[SUB]V[/SUB])
Mixes saturation of the blend layer into the base layer
Hue
mix(a, HSV(b[SUB]H[/SUB], a[SUB]S[/SUB], a[SUB]V[/SUB]), f)
Mixes hue of the blend layer into the base layer
Burn
1 - (1-a)÷mix(1, b, f)
Raises intensity of the base layer the darker the blend layer is
Dodge
a÷(1-f⋅b)
Decreases the intensity of the base layer the brighter the blend layer is
Overlay
mix(a[SUB]i[/SUB], 2⋅b[SUB]i[/SUB], f) if a[SUB]i[/SUB] < 0.5,
1 - mix(1, 2-2⋅b[SUB]i[/SUB], f)*(1-a[SUB]i[/SUB]) otherwise
Combines Multiply and Screen modes. The darker the base layer, the more the blend layer influences the mix.
Lighten
max(a, f⋅b)
Any fragments of the base layer that are darker than those of the blend layer are replaced by the blend layer fragments
Darken
min(a, f⋅b)
Any fragments of the base layer that are lighter than those of the blend layer are replaced by the blend layer fragments
Difference
mix(a, |a-b|, f)
Absolute value of the difference between base and blend layers
Divide
mix(a, a ÷ b, f)
Base layer is divided by the blend layer
Screen
1 - mix(1, 1-b, f)⋅(1-a)
Inverse of the base layer is multiplied by the blend layer
Subtract
mix(a, a-b, f)
Blend layer is subtracted from the base layer
Multiply
mix(a, a⋅b, f)
Base layer is multiplied by the blend layer
Add
mix(a, a+b, f)
Blend layer is added to the base layer
Mix
mix(a,b,f)
Linear interpolation between base and blend layers
[/TABLE]
Please feel free to post your corrections to formulas and descriptions so that we could have a complete and accurate list.
Same goes for the interpolation modes. Currently, documentation has lists like “Cardinal: Cardinal.”. Not very informative, is it? Please post your descriptions for those as well.
Here’s what I could put together for interpolation modes.
Interpolation modes:
- Linear: Linear (default). A smooth, consistent transition between colors. *material from the Wiki
- Ease: Ease by quadratic equation. *material from the Wiki
- Cardinal: Smooth step using Cardinal curves. Unlike B-Spline, control point values are preserved.
- B-Spline: Smooth step using B-Splines. Provides very soft transitions due to control point values smoothing.
- Constant: Sharp step. Each control point sets the value that remains the same until the next control point is encountered.
I will edit this post with (hopefully) additions and corrections.
PS. Also, if someone could point me to this forum’s table editing guide, I’d be much obliged. Really want to get rid of these horrid borders in favor of more thin and clean ones