I’m working on integrating Cycles in our CAD product to get some nice renders, and I’ve been struggling with getting the denoiser to work, to the point where I just gave up and am looking for alternatives.
Currently, I think my best shot is to call OpenImageDenoise directly after I get my final (noisy) render done.
From what I can gather, for best resutls, it would be ideal to provide OID with the final image, normals and albedo.
After some struggle, I managed to fetch different buffers, but I’m having some small issues.
Normally I have an output like this:
but if I add a pass for PASS_DIFFUSE_COLOR (by adding it to the scene passes and to the buffer params on session reset), I get this:
No idea why this happens… Adding a normal pass doesn’t create this issue…
This isn’t very serious, since I can still fetch the Combined pass by using RenderBuffers::get_pass_rect instead of using the display buffer (even if it is better for interactive rendering).
There doesn’t seem to be an actual albedo pass or any way to get it. I thought PASS_DIFFUSE_COLOR could be it, but metallic colors get set to black there… I could combine that with PASS_GLOSSY_COLOR (adding both), but the glossy color pass is view dependent (which shouldn’t happen with a true albedo pass). Isn’t there a way to retrieve just color, with no lighting?
I guess I could output UV/material id and sample the texture maps, but that seems like hell…