Overview

This materials allows the composition of up to three different materials. It is also possible to use any two if the three layers for simpler compositions.

This material is designed so that looking the layer stack from the backfacing side composites the layers from bottom to top. This allows, for example, the design of a bottle label that looks different from each side. In a nutshell, this shader can be used to: 

  • Create cutouts (e.g leaf shape on a rectangular patch)
  • BRDF mixes to create more complex materials.
  • As a simple texture mixing node. 

Parameters Description

Top Layer
Top Mask

The input top materials and it's corresponding mask. A mask of [1,1,1] means total coverage and a mask of [0,0,0] means this layer is invisible.

Middle Layer
Middle Mask

Specifies the middle layer color and it's corresponding mask.

Bottom Layer
Bottom Mask

Specifies the bottom layer color and it's corresponding mask.

Technical Details

This materials performs a 3-way composition with is defined as such:

Final Color = Over(Top, Top_Mask, Over(Middle, Middle_Mask, Bottom) )
Final Transparency = (1-Top_Mask) * (1-Middle_Mask) * (1-Bottom_Mask)

Top and Bottom Layer are reversed in the case of a backfacing surface. And the Over operation is defined as follows:

Over(A, mask, B) := A * mask + B * (1-mask);

  • No labels