Prompted by my previous question, I am wondering if (since there is no apparent way to convert a shader to color) there is any (even using post processing) way to mix cycles shaders with blend modes besides Add and Mix.
Is this possible?
Prompted by my previous question, I am wondering if (since there is no apparent way to convert a shader to color) there is any (even using post processing) way to mix cycles shaders with blend modes besides Add and Mix.
Is this possible?
I think the answer to this is also negative.
Let me try to explain my understanding of the problem with a different blend mode. To have an example to work with, let's use Multiply:
When Cycles uses the shader, it uses it with exactly one sample. It doesn't know anything about the previous samples, and neither does it know anything about future samples for this pixel and material.
To be able to multiply two shaders with each other, you would need the averages of all samples from one shader and all samples from the other one, as it could happen that for each sample, one of them is 0 and the other one is 1 (with a 50% chance for either one to be 1). In average, both would still be 0.5 in brightness, so the correct Multiply-result would be 0.5 * 0.5 = 0.25, but because Blender only sees one sample at a time, it would always calculate 1 * 0 = 0 or 0 * 1 = 0 and the material would be black. This is why all blend-modes have to be independant of the respective other input to make sense. Add and Mix are pretty much the only two useful blend modes for which the output is only influenced by the two inputs independently.
Any linear modifications that are supposed to happen to either of the inputs or the output can be applied to the color before it even enters the shader, as all shaders are (as far as I know) linear in respect to the input color. Subtracting also works that way, you can replicate it with negative brightness in a Diffuse/Glossy/...-Shader.
This is not the programming explanation for why it doesn't work but only the explanation that I think is correct and describes the problem from a rendering process point of view, please correct me if it's not correct but I hope it helps in some way to understand what works and what doesn't and cannot work.
While a shader contains colour information it also contains other information needed by the renderer to calculate the final colour when rendering. A shader is more like "instructions" for the render engine to calculate the final colour.
If you could extract a colour from the shader it wouldn't match the final image unless you also take into account the same calculations the renderer performs to get the final colour, like surrounding objects and lights, the angle of the surface to the camera...
While you can use different methods to mix colours before you pass it to the shader, the render engine is more restrictive as to how it generates the final image.
If you use the same 100% blue colour for a diffuse shader, a glossy shader and a glass shader, each will have variations that make them appear different from each other even though the specified colour in the shader is the same.