RenderKit / oidn

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

Color bleeding with camera motion blur #22

Closed Dade916 closed 5 years ago

Dade916 commented 5 years ago

I'm not sure if this can be defined a bug (see below) but I'm testing Oidn for animations and I'm observing a strange color bleeding.

This is my first simple test animation: https://drive.google.com/file/d/1fFW4UuKNqIG9ZryZTFTtYBxAuvA9s8TK/view?usp=sharing

This is a frame (raw image upper left, Oidn image upper right, albedo AOV lower leftm normals AOV lower right):

color

Do you see the slight red color bleeding on the out side of the left wall ? It is caused by Oidn.

I'm not sure if this is a bug because the problem goes away with more samples but it is till there with 256 samples/pixel (a quite high number for Oidn standards).

I assume the problem is caused by camera motion blur and the related noise on the albedo pass. There is a quite large number of features like motion blur, depth of field, SSS, volume rendering (like "God's ray") where the Albedo pass is going to be noisy and it is unclear how Oidn requires to handle the situation.

The albedo pass seems more detrimental than helpful in the above cases for Oidn.

Does we need some kind of Albedo denoiser to than feed Oidn with the result ?

atafra commented 5 years ago

I actually can't see the issue, but most of the image is black. Is this the correct image? If it is, could you please highlight the problematic color bleeding?

Dade916 commented 5 years ago

Click on the image to zoom, I enchanted the contrast to make the bleed more visibile:

bleed2

atafra commented 5 years ago

Thanks, I can see it now! It's barely visible on my calibrated monitor, but it's indeed there. This is tricky, because it's a trained network, so sometimes it's hard to come up with an explanation. It looks like the bleeding pops up where the beauty color is (seemingly) zero, but the albedo is not. But I'm not sure that motion blur is causing the issue, it's quite minimal. Did you try denoising this image without motion blur? If not, could you please try it? I suspect that it would still have the bleeding. In that case, the issue could be that the network was not trained with images with perfectly dark shadows where the final color was zero.

Dade916 commented 5 years ago

Did you try denoising this image without motion blur? If not, could you please try it? I suspect that it would still have the bleeding. In that case, the issue could be that the network was not trained with images with perfectly dark shadows where the final color was zero.

Yes, the problem is still there even without camera motion blur. Denoised image:

denoised

Raw image:

normal

I guess it is a "corner case" but it may be good idea to extend, in the future, the training set to include this situation. This kind of problem will pop up a lot, if someone try to use Oidn for denoising "direct light only" renderings.

atafra commented 5 years ago

Thanks for confirming! We'll add images with direct light only to our training data set, which should fix this corner case. Could you please send me the original EXRs for the non-motion blur case, so I could add them to our test data set?

Dade916 commented 5 years ago

Sure:

test.zip

atafra commented 5 years ago

Thanks!

atafra commented 5 years ago

Fixed in v1.0.0.