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?
[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. $\endgroup$