Autodesk / sitoa

Arnold plugin for Softimage
Apache License 2.0
33 stars 16 forks source link

add required variance aovs for denoising (noice) #34

Closed caron closed 5 years ago

caron commented 5 years ago

Add the required AOVs for denoising with noice. We don't have a standard interface in Softimage for controlling the filter per AOV. The easiest solution would be to handle it automatically behind the scenes when a check box in render options is turned on, similar to how MtoA is doing this.

Thoughts?

JenusL commented 5 years ago

A check box sounds good to me. From the Maya docs:

Output Denoising AOVs Automatically outputs the optional AOVs (diffuse_albedo, Z, N). This should be used for denoising using Noice (Arnold denoiser), (multilayer EXR) or Kick.

I guess they forgot to say in the docs that variance aov is also outputed :) I was planning to make a new tab in render settings named AOVs when adding LPEs (#32). We could have these settings there as well. Looking how MtoA has named things, this is what I think.

Since only the variance AOV is actually needed, you get better result with diffuse_albedo, Z and N. I think that checkbox in MtoA is outputting all of those AOVs. Should we make two checkboxes instead? One for just variance and one for the optional ones?

What do you think?

caron commented 5 years ago

I am going to think about it more tonight, I want to review the other plugins a bit more.

According to the documentation for MtoA, that one check box does it all. I can see staying in sync with other plugins would be nice but I could also see a more 1 to 1 implementation with Arnold core where we support adding channels to the pass options which just have a custom token ([Variance]) or key word "_variance" which will do the work of hooking up the filter to the associated non-variance channel. This could allow users to control exactly what variance AOVs are exported instead of getting all of them. This has the potential for being more work though for a little to non-existent user base. Man, I wish they didn't kill Softimage.

@kikou or @sjannuz if you have any feedback let us know.

caron commented 5 years ago

OK, so MAXtoA and C4DtoA both have 'AOVs' and 'Denoiser' tabs. Maya has the 'AOVs' only tab and puts denoising controls in 'System' or 'AOVs' (controlling Optix or noice respectively). C4DtoA has Optix denoising control in 'System' like Maya but MAXtoA has all denoising in the 'Denoiser' tab.

That's a bit all over the place so, I am not worried about matching any other plugin exactly. I like the idea of grouping denoising control in one tab like MAXtoA. To avoid confusion about Optix vs noice and for quicker first glance access. I think we can still add 'AOVs' tab for LPE support and any other new AOV stuff that might need more control, cryptomatte control.

JenusL commented 5 years ago

@caron Have you had the time to do anything on this?? If not, do you mind if I start working on it?

caron commented 5 years ago

Please go ahead, still pretty busy

*written with my thumbs

On Mon, Dec 3, 2018, 1:10 PM Jens Lindgren <notifications@github.com wrote:

@caron https://github.com/caron Have you had the time to do anything on this?? If not, do you mind if I start working on it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Autodesk/sitoa/issues/34#issuecomment-443871511, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmNHhsdpZR9Oag4D-8ytcneRkPhjMlcks5u1ZNfgaJpZM4Wksrq .

JenusL commented 5 years ago

Ok so I'm almost done writing a first version of the "Output Denoising AOVs" feature. I opted for the way MAXtoA does it, but to be honest I feel both ways that MAXtoA and MtoA does it isn't very good. Here's a rundown of how (I think) they works and their pros and cons.

MAXtoA Creates a new driver_exr with a suffix: _Noice_Input.exr In this driver it puts RGBA, N, Z, diffuse_albedo and variance. Pros: Strict, AOVs can't collide with each other, Artist can't screw anything up. Cons: No control over driver settings (compression, bit-depth, etc), doesn't seem to add per light AOVs

MtoA Much more complicated. Tries to use existing AOVs on the driver. If AOV doesn't exist on the driver, it will be added with _noice suffix. If there's a conflict, like Z already exists but the filter is not the same as for beauty, a new Z is added that gets named Z_noice. In MtoA you need to enable Merge AOVs to output all AOVs to one exr (a requirement for noice). If Merge AOVs is disabled, I think a new driver is created for the noice aovs. I don't now what file suffix it gets. I have no idea of how it handles per light AOVs. Pros: No duplicated AOVs on disk. Control over exr settings. Light AOVs should work? Cons: Complicated, AOV has different names depending on if there's a conflict or not. Control over exr settings.

This makes the two plugins really different. It's also not clear from the Arnold docs how to go about with light AOVs. And there no information about compression, bit-depth, bounding box, etc. of the different AOVs required by noice. @sjannuz Maybe you could answer the questions about exr settings and light AOVs... If I want to denoise light AOVs, do they each have to have their own variance AOV or are they using the main variance AOV?

As I said above, right now I have coded so it works like in MAXtoA, but I would really like some input here so we can find a better way. Should I switch to how it's in MtoA? SItoA doesn't have a Merge AOVs setting, so just adding the AOVs to the main driver_exr shouldn't conflict with any user setting so we never need to create an additional driver in that case.

JenusL commented 5 years ago

@caron You can close this one as well as this was added in #53

caron commented 5 years ago

closing