I’m a python programmer and I made some tests as a proof of concept of a high-quality noise reducer for Cycles. I’m attaching a simple test but the theory is what matters, here is what the program does:
-It separates the individual faces on images that will be used as a kind of “mask” for the denoiser.
-It discards small faces, atm it just leaves them noisy, but in the future may apply the denoise over whole objects (for high-poly objects), atm it doesn’t take into account smoothed faces, they should generate a single “mask”.
-Then it applies a 10px blur to the “masked” image and over this one it inserts the original image (so you get a 10px blurred outline with roughly the same colours of the noisy image, this is to make sure the denoiser won’t generate artifacts).
-Then it applies the denoise (in this case a closed-source commercial one, but an opensource could be used also) to the individual faces, so the noise gets blurred but the edges stay perfectly sharp (or almost) after applying the respective masks and merging them into a single image. (the mask doesn’t have AA though)
Of course, when there’s a fine texture there, the thing just wouldn’t work. To solve that problem the GI should be rendered separately, denoised, and multiplied by a “flat” image with the textures and stuff. The denoiser should only be applied to the GI image, of course it is not going to be perfect, but if the theory is correct then it’s worth loosing some accuracy in exchange of noise.
Alternatively, there could be a way to adjust the denoising value manually for individual objects also.
Here are my tests, please note that I couldn’t apply a high denoising value because that would blur the direct illumination too much. Ideally this shouldn’t happen because It shouldn’t be applied to the final image but only to the secondary GI bounces. AND this is an extreme case of a very noisy image.
A fine grain noise could be applied over the entire image also (it tricks the eye).
Next i’m gonna render a cornell box.
Left: Original output, Right: Denoised output (yes, the input is the image on the left :D)
PS: Sorry the JPG format, but the PNG was too big and the JPG is in very high quality.