Need suggestions about calculating albedo color for OptiX denoiser

Hello,

We are using Optix7.4 and MDL SDK for our renderer and are using OptiX-denoiser.

Denoiser expects ‘albedo’ as input, kind-of a problem is that I could not find standard albedo function exposed by MDL API. Please, let me know if there is one.

By definition, ‘albedo’ is what we would call ‘surface color’, i.e. average color reflected in random direction when the surface is uniformly lit. Taking this into consideration, we have thought of some ways to approximate albedo value and here are the options we came up with:

  1. Base option is just to just randomize view and light directions and averaging-out BRDF, but I think this is a lost cause, since for mirror-like surfaces it’ll just give us black for a simple reason that it’s extremely unlikely to randomly pick mirror-reflection direction pair; Also, it’ll probably generally struggle with converging.

  2. Second option is to just use average first-hit sample transmittance as albedo; This would probably ‘simulate’ uniform lighting, but would introduce view-direction bias. That bias might be bad in general, but it would also record some iridescence data;

  3. Another option is to use samples again, but specifically for albedo, just randomize view-vector to eliminate that bias. We can also do multiple samples per-first-hit to converge faster (in theory). Before experimenting with any of these, I lean towards this one the most.

For option 3, there’s also a question of sampling view-direction over a half-sphere ‘above’ the front or back-face (whichever got hit), versus sampling from all directions. Front and back can behave differently, potentially breaking some opaque materials, so I guess it’s probably a good idea to stick with one side only, but I’ll be happy to hear more informed opinions.

Anyone experienced with these, what do you think the best approach would be? Are there other options we have and have not thought about?

Thank you in advance :D

Hi,
computing a real albedo on the fly is tricky because you would actually need to integrate the BSDF. We do have auxiliary functions you can generate which will provide an albedo approximation (also normal and roughness). These outputs are intended to be used for denoising where approximations are probably enough.

The SDK examples show how it’s used for at least hlsl and cuda after enabling it by backend->set_option("enable_auxiliary", "on").
With that option set, you will find another generated function in the bsdf interface called auxiliary which works very similar to evaluate and sample.

When it comes to high glossy or even specular materials this approach will also fail in some sense but I think you won’t get a good albedo for mirrors with any other approach.

So, give it a try before implementing your own estimation. Maybe you find it useful and can extend based on your denoising setup.

Kai

@krohmer thank you! Missed that one. We’ll check it out as soon as we can :D

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.