DeclanRussell / NvidiaAIDenoiser

A simple implementation of Nvidia's AI denoiser
MIT License
398 stars 52 forks source link

Wrong result when using albedo AOV #10

Closed jackyjacky1307 closed 5 years ago

jackyjacky1307 commented 5 years ago

Hi, Declan

First, thanks for this great work, it let me use it without any platform!

However I found an issue about it. When I try to feed albedo AOV to it, I get the wrong result which appear some weird outlines of shapes on it. I figure out that I can only get correct result when my albedo pass has 4 channel(RGBA). If I use 3 channel(RGB), I will get the wrong result. After checking your code I think I might found where the bug is.

In your main.cpp, line 228, I think you should use albedo_roi.nchannels() rather than beauty_roi.nchannels() I think it cause the inputs with different channels count have bad result.

Hope you can check about it, thank you!

BTW, my personal question, can I use other AOVs like reflection pass or refraction pass to help me denoise my image? beauty + diffuse albedo + reflection + refraction -> denoised beauty?

PS. English is not my first language, please forgive me if I say something wrong~

DeclanRussell commented 5 years ago

Hey sorry for the late reply. Thanks for reporting this and I'm glad you enjoy the app :) I think your solution is probably correct. I'm planning on creating a new version soon so I will and add a fix for this too.

jackyjacky1307 commented 5 years ago

Thanks for the reply. I'm looking forward to you update!

DeclanRussell commented 5 years ago

I've fixed the bug in 2ee0cb64cd9030cfd65ddecde3531150dc30d1f7. I would prefer to wait for the next OptiX version to come out before I create a new release but this will mean waiting a bit. If you need the fix urgently let me know and perhaps I could send you a build.