modo bubbble logo

Layer Blend Modes

Home >> Shade, Light & Render >> Layer Blend Modes

back next

The flexibility and power of the Shader Tree is extended with the use of 'Blend Modes', a means of determining how multiple layers interact with each other. The key point being that there must be more than one layer in order for blending to work. The shader trees layered approach to shading surfaces works in a fashion similar to layers in an image editor such as Photoshop; any layer above another will obscure layers below unless one (or more) of three options is applied, 1. A mask is applied, either as a layer or a surface tag, this limits the affect of the layer exclusively to areas inside the mask, revealing lower layers outside of the mask. 2. The transparency of the layer is changed to reveal the lower layers. 3- A Blend Mode other than 'Normal' is specified, changing the way the layer interacts with the lower layers.

Blend Mode Menu

Nearly every item layer in the shader tree offers a Blend Modo option. Blend modes offer a way to combined two or more layers in various ways using mathematical operations. The mode can be easily specified by LMB-clicking on the 'Blend Mode' option itself, this opens a contextual popup menu, users can then highlight the blend mode from the available options and LMB-click to select. Please note that Blend Mode results will only be visible in the final render or in a Preview viewport.

Blend modes will affect the RGB color values (even if you just have black and white specified) and have a couple rules that need to be adhered to -- 1. There must be more than a single layer of the same 'Effect' type, for example, a 'Diffuse Color' layer will only 'Multiply' with another layer specified as 'Diffuse Color' and 2. A layer with a blend mode will only affect other layers below it in the shader tree. The various modes available are as follows (with samples to illustrate the effect).

  Photo Based Texture Photo Based Texture Cellular Procedural Texture  
2 Layers --
Fractal Noise
  Original Images  


Doing the Math

Blend modes work by calculating the math (as specified) on the individual RGB channels. Take for instance 'Add', this function takes the values from the two layers and adds them together for the result. Depending on the texture and the blend mode, it may produce values beyond 100%. To reduce or eliminate clipping for certain effects that can't be driven higher than 100% (such as Displacement), users may also need to adjust a layers transparency. Let's explain how this works with an example-

1.) Cellular displacement layer
2.) Noise layer overwrites
the Cellular layer
  Both 100%
3.) Noise layer set to 'Add'
produces clipped values
  Both 50%
4.) Transparency of both
layers set to 50%

Example one shows a Cellular procedural layer is applied as a displacement map. In the shader tree, a Noise layer was added above it, also set as displacement for example two; this supersedes the lower layer in the tree in example one. To produce a combination of both, the noise layer was set to 'Add' as a blend mode, but this produces 'clipped' values in example three, this is because math that produces values beyond 100%, i.e. 75% + 75% = 150%, but there is no value higher than 100% (meaning all the way displaced), so that value is truncated to 100. By changing the Opacity value of both layers to 50%, each layer now contributes equally to the displacement. This can be biased either direction by adjusting the opacity values either direction, as long as both equal 100% you wont receive any clipped values (although, that may be the look you are going for). In some instances, certain effects can be driven higher than 100%, in those cases, it won't be necessary to adjust the transparency.

Tip icon

TIP: A single 'Material' item produces values for multiple effects, such as diffuse color and amount, reflection, transparency, etc. Single texture layers in the shader tree can effectively 'Blend' with the values produced by the material item without the need for an additional matching layer.



back next