Fetching albedo color

Hi there!

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.

  1. Normally I have an output like this:
    Screenshot_7
    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:
    Screenshot_8
    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).

  2. 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… :open_mouth:

Best regards,
Diogo

Are you activating denoise from the render panel or from the compositor?
It would be better if you can show any screenshots of your problem, the render panel, the passes you activated or the compositor.

He’s using standalone Cycles from a different app, I think.

Hi there.

Yes, I’m using Cycles directly from the standalone app (more precisely an application I’ve built based on the standalone app(.

Thanks!
Diogo

I see. I have no knowledge about how cycles standalone works, although you can ask Bretch

You mean Brecht :wink:

In my experience Brecht is a nice person, and sometimes he can find the time to answer these sort of questions. But I don’t think supporting cycles-standalone for use in other apps has a very high priority at the moment, so don’t have too high expectations. All blender devs are spread very thin as is, extra work outside the scope of blender development is not really possible I think (time wise).

My strategy would be to study how blender passes stuff to cycles. It takes some time to get to know that part of the code, but it the only ‘documentation’ that is guaranteed to be up to date (I think). And you don’t need to understand the whole of blender just to understand the data passing between blender and cycles, as they’re fairly separate.

Thanks for the suggestions. I’m not using the standalone itself, just used it as a baseline to start my work.
The problem with the Blender/Cycles integration is that the denoising part seems to be very different on the two branches, hence I couldn’t use it as a reference.

Anyway, I got it to work; not this separate passes thing, but the denoising, so I don’t need the individual passes anymore.

Thanks for the help!
Diogo