I am currently working on a neural denoiser for Cycles, that’s why I statistically analyze all sorts of data from Cycles. So far, I assumed that all the colors in Cycles are positive or zero. But the EXRs for the training contain plenty of negative colors, especially in the direct/indirect glossy/diffuse passes.
Is there an issue in my data or in the way I analyzed the data?
If not, is there any kind of clamping going on during the compositing or are combinations of the passes always positive, like direct + indirect >= 0 or maybe color * (direct + indirect) >= 0?
I should have used the term ‘Combined’ instead of ‘Composed’ to avoid confusions. The passes are combined as described in this document: https://wiki.blender.org/index.php/Doc:UK/2.6/Manual/Render/Cycles/Passes
The misunderstanding was that the raw Cycles output only contains positive color values. My question is whether any combination of those passes always produces positive color values.
That’s not something I can choose, because I have to consider all possible cases. Because you mentioned that negative values can also occur due to the sampling, I had to rethink some parts and was able to come up with another solution that works with positive and negative inputs. Thanks again!
It should be noted that in most cases, when a value extends beyond the encoding limits of the encoding model, the data becomes non-data. One should always evaluate if the negative values represent anything in the encoding system they are manipulating the data.
While a full discussion of input characterization is outside the scope of this document, there are differing philosophies on what camera linearizations should aim to achieve at very darkest portions of the camera capture range. One axis of variation is to decide if the lowest camera code values represent “true black,” in which the average black level is mathematically at 0.000 in scene-linear, or if instead the lowest camera code values correspond to a small but positive quantity of scene-linear light. This issue becomes more complex in the context of preserving sensor noise/film grain. If you consider capturing black in a camera system with noise, having an average value of 0.000 implies that some of the linearized noise will be small, yet positive linear light, and other parts of the noise will be small, and negative linear light. Preserving these negative linear values in such color pipelines is critical to maintaining an accurate average black level. Such challenges with negative light can be gracefully avoided by taking the alternative approach, mapping all sensor blacks to small positive values of linear light. It is important to note that the color community is continues to be religiously split on this issue. Roughly speaking, those raised on motion-picture film workflows often prefer mapping blacks to positive linear light, and those raised on video technology are most comfortable with “true black” linearizations.