# Correctly combining a two layer material in cycles

I am trying to create a material that has two physical layers. A thin top layer covering the second main body layer of the object, I have drawn a quick sketch of what I mean:

Light interacting with the material can

0) be reflected off its surface
1) be scattered by the top layer
2) be scattered by the lower layer
3) be scattered by both layers
4) be transmitted right through both layers.

My question is, how to combine these two layers. Say I have the properties of each layer set up in an individual shader, will a mix node give the correct results or do I need to combine them in a different manner?

• Looking for a solution that doesn't require extra geometry, I see two "hypothetical" options. [A] A surface shader (0) and two volume shader (that will cover everything else, (1)(2)(3)(4)), where their mixing factor depends on a "distance from the surface" coordinate, that - as far as I know - doesn't exist as a node. [B] Two surface shaders added together: one for (0) plus a subsurface scattering for (1) and (3); and a volume shader for (2) and (4). Unfortunately, though, the subsurface scattering doesn't have an entirely sharp falloff mode, so your red and yellow materials would blend. – Nicola Sap Jul 19 '17 at 17:37
• Is there a separate texture to the lower layer? If not, these various situations look like they could all be represented by a proper mix of SSS and translucency. The ratio of the two shaders determines the amount of category 4 rays and the radius of the SSS relates to the thickness of the top material. – PGmath Dec 25 '17 at 2:38