RenderKit / oidn

Intel® Open Image Denoise library
https://www.openimagedenoise.org/
Apache License 2.0
1.77k stars 164 forks source link

Loosing texture details since V1.0 #46

Closed mnaehrig closed 2 years ago

mnaehrig commented 4 years ago

Since version 1.0 the denoiser doesn't work well with "high frequency" textures and details look more blurry in general. You can see the problem when looking at the carpet. Close to the window the carpet looses any structure:

carpet_oidn_1_0

Version 0.9 did a better job at this point: carpet_oidn_0_9

You may find the input images (color, albedo, normal) here: input_images.zip

Color image is SRGB.

atafra commented 4 years ago

The problem is that versions prior to 1.0 didn't denoise some regions at all, resulting in very distracting artifacts in some cases. This is visible in the second image (v0.9) too, especially in the bottom right corner. Version 1.0+ produces more balanced results, but in some cases, like for the first image, the results can be somewhat worse. However, such blurry results usually happen if a low-quality anti-aliasing filter is used, e.g. box filter. Typically the results can be improved by switching to a higher quality filter e.g. Blackman-Harris, Gaussian. What pixel filter is used in these images?

mnaehrig commented 4 years ago

The images were rendered with OSPRay pathtracer (version 1.8.5). We didn't apply any additional anti-aliasing filters. The noisy look in the bottom right corner comes from a fabric texture with a fine structure. It's also present in the albedo image. So it's not wrong in my opinion. I thought that the albedo image should allow the denoiser to distinct between noise which comes from the lighting calculation and "noise" which comes from textures.

atafra commented 4 years ago

The albedo image can (and does) contain Monte Carlo noise as well, just like the color buffer. Because of this, the neural network can't always correctly determine what's Monte Carlo noise and what's aliasing. This is why the best solution is to use a higher quality pixel filter which minimizes aliasing. Unfortunately, OSPRay currently supports only box filtering, which is the lowest quality filter with lots of aliasing. We'll soon implement higher quality filtering in OSPRay, which will improve image quality even if no denoising is used/required.

johguenther commented 4 years ago

OSPRay v2.2 now has pixel filters, thus this should work much better now.