mtoa - denoice all lightgroups

mtoa - denoice all lightgroups

froszu
Enthusiast Enthusiast
1,419 Views
6 Replies
Message 1 of 7

mtoa - denoice all lightgroups

froszu
Enthusiast
Enthusiast

How do I denoice RGBA for all lightgroups ?

This is the command:

noice

    -i 
//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb.0000.exr

    -o 
//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr 


    -ef 2 -pr 3 -sr 9 -v 0.25

    -l RGBA_Point

    -l RGBA_Dir

    -l RGBA_Spot

    -l RGBA_Area

    -l RGBA_default

    -l RGBA_Dome

    -l RGBA_Pht



This is the output:

Loading file 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb.0000.exr".

Using feature AOV 'diffuse_albedo' with filter 'gaussian_filter'

Using feature AOV 'N' with filter 'gaussian_filter'

Using feature AOV 'Z' with filter 'gaussian_filter'

Working with 1 frame at 1920x1080

Will denoise AOV "RGBA", using associated variance

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Area", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Dir", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Dome", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Pht", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Point", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_Spot", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Will just copy AOV "RGBA_default", variance not found

   Output file will be 
"//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr"

Start denoising (patch radius 3, search radius 9, variance 0.25)

Denoising RGBA

Denoising RGBA_Area

   Could not find AOV with source RGBA_Area and filter variance_filter

   Could not find variance for AOV "RGBA_Area", skipping denoise.

Denoising RGBA_Dir

   Could not find AOV with source RGBA_Dir and filter variance_filter

   Could not find variance for AOV "RGBA_Dir", skipping denoise.

Denoising RGBA_Dome

   Could not find AOV with source RGBA_Dome and filter variance_filter

   Could not find variance for AOV "RGBA_Dome", skipping denoise.

Denoising RGBA_Pht

   Could not find AOV with source RGBA_Pht and filter variance_filter

   Could not find variance for AOV "RGBA_Pht", skipping denoise.

Denoising RGBA_Point

   Could not find AOV with source RGBA_Point and filter variance_filter

   Could not find variance for AOV "RGBA_Point", skipping denoise.

Denoising RGBA_Spot

   Could not find AOV with source RGBA_Spot and filter variance_filter

   Could not find variance for AOV "RGBA_Spot", skipping denoise.

Denoising RGBA_default

   Could not find AOV with source RGBA_default and filter variance_filter

   Could not find variance for AOV "RGBA_default", skipping denoise.

Finished denoising

Saving image 
//frames/defaultRenderLayer/defaultRenderLayer_v5__test_v101.mb_denoised.0000.exr 
(1920 x 1080 x 32)




As you can see, denoice is expecting variance for each RGBA_lightGroup and there is only variance channel for beauty RGBA
How do I tell mtoa to export variance for all lightgroups ?
I used:

setAttr "defaultArnoldRenderOptions.outputVarianceAOVs" 1;



For reference, here is rendered AOVs list as reported by exrheader

arnold/aovs/N_noice/filter (type string): "gaussian_filter"

arnold/aovs/N_noice/filter_width (type float): 2

arnold/aovs/N_noice/source (type string): "N"

arnold/aovs/RGBA/filter (type string): "gaussian_filter"

arnold/aovs/RGBA/filter_width (type float): 2

arnold/aovs/RGBA/lpe (type int): 1

arnold/aovs/RGBA/lpe_expression (type string): "C.*"

arnold/aovs/RGBA/source (type string): "RGBA"

arnold/aovs/RGBA_Area/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Area/filter_width (type float): 2

arnold/aovs/RGBA_Area/lpe (type int): 1

arnold/aovs/RGBA_Area/source (type string): "RGBA_Area"

arnold/aovs/RGBA_Dir/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Dir/filter_width (type float): 2

arnold/aovs/RGBA_Dir/lpe (type int): 1

arnold/aovs/RGBA_Dir/source (type string): "RGBA_Dir"

arnold/aovs/RGBA_Dome/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Dome/filter_width (type float): 2

arnold/aovs/RGBA_Dome/lpe (type int): 1

arnold/aovs/RGBA_Dome/source (type string): "RGBA_Dome"

arnold/aovs/RGBA_Pht/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Pht/filter_width (type float): 2

arnold/aovs/RGBA_Pht/lpe (type int): 1

arnold/aovs/RGBA_Pht/source (type string): "RGBA_Pht"

arnold/aovs/RGBA_Point/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Point/filter_width (type float): 2

arnold/aovs/RGBA_Point/lpe (type int): 1

arnold/aovs/RGBA_Point/source (type string): "RGBA_Point"

arnold/aovs/RGBA_Spot/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_Spot/filter_width (type float): 2

arnold/aovs/RGBA_Spot/lpe (type int): 1

arnold/aovs/RGBA_Spot/source (type string): "RGBA_Spot"

arnold/aovs/RGBA_default/filter (type string): "gaussian_filter"

arnold/aovs/RGBA_default/filter_width (type float): 2

arnold/aovs/RGBA_default/lpe (type int): 1

arnold/aovs/RGBA_default/source (type string): "RGBA_default"

arnold/aovs/Z_noice/filter (type string): "gaussian_filter"

arnold/aovs/Z_noice/filter_width (type float): 2

arnold/aovs/Z_noice/source (type string): "Z"

arnold/aovs/diffuse_albedo_noice/filter (type string): "gaussian_filter"

arnold/aovs/diffuse_albedo_noice/filter_width (type float): 2

arnold/aovs/diffuse_albedo_noice/lpe (type int): 1

arnold/aovs/diffuse_albedo_noice/lpe_expression (type string): "C<RD>A"

arnold/aovs/diffuse_albedo_noice/source (type string): "diffuse_albedo"

arnold/aovs/variance/filter (type string): "variance_filter"

arnold/aovs/variance/filter_width (type float): 2

arnold/aovs/variance/lpe (type int): 1

arnold/aovs/variance/lpe_expression (type string): "C.*"

arnold/aovs/variance/source (type string): "RGBA"



channels (type chlist):

    A, 16-bit floating-point, sampling 1 1

    B, 16-bit floating-point, sampling 1 1

    G, 16-bit floating-point, sampling 1 1

    N_noice.X, 16-bit floating-point, sampling 1 1

    N_noice.Y, 16-bit floating-point, sampling 1 1

    N_noice.Z, 16-bit floating-point, sampling 1 1

    R, 16-bit floating-point, sampling 1 1

    RGBA_Area.A, 16-bit floating-point, sampling 1 1

    RGBA_Area.B, 16-bit floating-point, sampling 1 1

    RGBA_Area.G, 16-bit floating-point, sampling 1 1

    RGBA_Area.R, 16-bit floating-point, sampling 1 1

    RGBA_Dir.A, 16-bit floating-point, sampling 1 1

    RGBA_Dir.B, 16-bit floating-point, sampling 1 1

    RGBA_Dir.G, 16-bit floating-point, sampling 1 1

    RGBA_Dir.R, 16-bit floating-point, sampling 1 1

    RGBA_Dome.A, 16-bit floating-point, sampling 1 1

    RGBA_Dome.B, 16-bit floating-point, sampling 1 1

    RGBA_Dome.G, 16-bit floating-point, sampling 1 1

    RGBA_Dome.R, 16-bit floating-point, sampling 1 1

    RGBA_Pht.A, 16-bit floating-point, sampling 1 1

    RGBA_Pht.B, 16-bit floating-point, sampling 1 1

    RGBA_Pht.G, 16-bit floating-point, sampling 1 1

    RGBA_Pht.R, 16-bit floating-point, sampling 1 1

    RGBA_Point.A, 16-bit floating-point, sampling 1 1

    RGBA_Point.B, 16-bit floating-point, sampling 1 1

    RGBA_Point.G, 16-bit floating-point, sampling 1 1

    RGBA_Point.R, 16-bit floating-point, sampling 1 1

    RGBA_Spot.A, 16-bit floating-point, sampling 1 1

    RGBA_Spot.B, 16-bit floating-point, sampling 1 1

    RGBA_Spot.G, 16-bit floating-point, sampling 1 1

    RGBA_Spot.R, 16-bit floating-point, sampling 1 1

    RGBA_default.A, 16-bit floating-point, sampling 1 1

    RGBA_default.B, 16-bit floating-point, sampling 1 1

    RGBA_default.G, 16-bit floating-point, sampling 1 1

    RGBA_default.R, 16-bit floating-point, sampling 1 1

    Z_noice, 16-bit floating-point, sampling 1 1

    diffuse_albedo_noice.B, 16-bit floating-point, sampling 1 1

    diffuse_albedo_noice.G, 16-bit floating-point, sampling 1 1

    diffuse_albedo_noice.R, 16-bit floating-point, sampling 1 1

    variance.A, 16-bit floating-point, sampling 1 1

    variance.B, 16-bit floating-point, sampling 1 1

    variance.G, 16-bit floating-point, sampling 1 1

    variance.R, 16-bit floating-point, sampling 1


0 Likes
1,420 Views
6 Replies
Replies (6)
Message 2 of 7

Stephen.Blair
Community Manager
Community Manager

You have to manually add variance AOVs for the other AOVs.
See https://answers.arnoldrenderer.com/answers/16843/view.html



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 3 of 7

froszu
Enthusiast
Enthusiast

Ok, I added variance to RGBA, but something is still missing.

I attach a screenshot of setup, python scritp I used to make connections (ofcourse I also tried manually) and exrheader output.

Denoice still cant find what's needed.


4900-przechwytywanie.jpg


def setupVarianceFilter(): rgba_aovs = mc.ls(type='aiAOV') rgba_aovs = [aov for aov in rgba_aovs if mc.getAttr(aov + '.name') == 'RGBA'] if not rgba_aovs: return for aov in rgba_aovs: drivers = mc.listConnections(aov + '.outputs[0].driver') if not drivers: continue filters = mc.listConnections(aov + '.outputs[0].filter') if not filters: continue
aiAOVFilter = mc.createNode('aiAOVFilter') mc.setAttr(aiAOVFilter + '.aiTranslator', 'variance', type='string' ) mc.setAttr(aiAOVFilter + '.width', mc.getAttr(filters[0] + '.width') ) mc.connectAttr( (drivers[0] + '.message'), (aov + '.outputs[1].driver') ) mc.connectAttr( (aiAOVFilter + '.message'), (aov + '.outputs[1].filter') )


arnold/aovs/N_noice/filter (type string): "gaussian_filter"
arnold/aovs/N_noice/filter_width (type float): 2
arnold/aovs/N_noice/source (type string): "N"
arnold/aovs/N_noicebeauty_1/filter (type string): "variance_filter"
arnold/aovs/N_noicebeauty_1/filter_width (type float): 2
arnold/aovs/N_noicebeauty_1/source (type string): "N"
arnold/aovs/RGBA/filter (type string): "gaussian_filter"
arnold/aovs/RGBA/filter_width (type float): 2
arnold/aovs/RGBA/lpe (type int): 1
arnold/aovs/RGBA/lpe_expression (type string): "C.*"
arnold/aovs/RGBA/source (type string): "RGBA"
arnold/aovs/RGBA_Area/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Area/filter_width (type float): 2
arnold/aovs/RGBA_Area/lpe (type int): 1
arnold/aovs/RGBA_Area/source (type string): "RGBA_Area"
arnold/aovs/RGBA_Dir/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Dir/filter_width (type float): 2
arnold/aovs/RGBA_Dir/lpe (type int): 1
arnold/aovs/RGBA_Dir/source (type string): "RGBA_Dir"
arnold/aovs/RGBA_Dome/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Dome/filter_width (type float): 2
arnold/aovs/RGBA_Dome/lpe (type int): 1
arnold/aovs/RGBA_Dome/source (type string): "RGBA_Dome"
arnold/aovs/RGBA_Pht/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Pht/filter_width (type float): 2
arnold/aovs/RGBA_Pht/lpe (type int): 1
arnold/aovs/RGBA_Pht/source (type string): "RGBA_Pht"
arnold/aovs/RGBA_Point/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Point/filter_width (type float): 2
arnold/aovs/RGBA_Point/lpe (type int): 1
arnold/aovs/RGBA_Point/source (type string): "RGBA_Point"
arnold/aovs/RGBA_Spot/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_Spot/filter_width (type float): 2
arnold/aovs/RGBA_Spot/lpe (type int): 1
arnold/aovs/RGBA_Spot/source (type string): "RGBA_Spot"
arnold/aovs/RGBA_default/filter (type string): "gaussian_filter"
arnold/aovs/RGBA_default/filter_width (type float): 2
arnold/aovs/RGBA_default/lpe (type int): 1
arnold/aovs/RGBA_default/source (type string): "RGBA_default"
arnold/aovs/Z_noice/filter (type string): "gaussian_filter"
arnold/aovs/Z_noice/filter_width (type float): 2
arnold/aovs/Z_noice/source (type string): "Z"
arnold/aovs/Z_noicebeauty_1/filter (type string): "variance_filter"
arnold/aovs/Z_noicebeauty_1/filter_width (type float): 2
arnold/aovs/Z_noicebeauty_1/source (type string): "Z"
arnold/aovs/beauty_1/filter (type string): "variance_filter"
arnold/aovs/beauty_1/filter_width (type float): 2
arnold/aovs/beauty_1/lpe (type int): 1
arnold/aovs/beauty_1/lpe_expression (type string): "C.*"
arnold/aovs/beauty_1/source (type string): "RGBA_default"
arnold/aovs/diffuse_albedo_noice/filter (type string): "gaussian_filter"
arnold/aovs/diffuse_albedo_noice/filter_width (type float): 2
arnold/aovs/diffuse_albedo_noice/lpe (type int): 1
arnold/aovs/diffuse_albedo_noice/lpe_expression (type string): 
"C<RD>A"
arnold/aovs/diffuse_albedo_noice/source (type string): "diffuse_albedo"
arnold/aovs/diffuse_albedo_noicebeauty_1/filter (type string): 
"variance_filter"
arnold/aovs/diffuse_albedo_noicebeauty_1/filter_width (type float): 2
arnold/aovs/diffuse_albedo_noicebeauty_1/lpe (type int): 1
arnold/aovs/diffuse_albedo_noicebeauty_1/lpe_expression (type string): 
"C<RD>A"
arnold/aovs/diffuse_albedo_noicebeauty_1/source (type string): 
"diffuse_albedo"
arnold/aovs/variance/filter (type string): "variance_filter"
arnold/aovs/variance/filter_width (type float): 2
arnold/aovs/variance/lpe (type int): 1
arnold/aovs/variance/lpe_expression (type string): "C.*"
arnold/aovs/variance/source (type string): "RGBA"
arnold/aovs/variancebeauty_1/filter (type string): "variance_filter"
arnold/aovs/variancebeauty_1/filter_width (type float): 2
arnold/aovs/variancebeauty_1/lpe (type int): 1
arnold/aovs/variancebeauty_1/lpe_expression (type string): "C.*"
arnold/aovs/variancebeauty_1/source (type string): "RGBA"

channels (type chlist):
    A, 16-bit floating-point, sampling 1 1
    B, 16-bit floating-point, sampling 1 1
    G, 16-bit floating-point, sampling 1 1
    N_noice.X, 16-bit floating-point, sampling 1 1
    N_noice.Y, 16-bit floating-point, sampling 1 1
    N_noice.Z, 16-bit floating-point, sampling 1 1
    N_noicebeauty_1, 16-bit floating-point, sampling 1 1
    R, 16-bit floating-point, sampling 1 1
    RGBA_Area.A, 16-bit floating-point, sampling 1 1
    RGBA_Area.B, 16-bit floating-point, sampling 1 1
    RGBA_Area.G, 16-bit floating-point, sampling 1 1
    RGBA_Area.R, 16-bit floating-point, sampling 1 1
    RGBA_Dir.A, 16-bit floating-point, sampling 1 1
    RGBA_Dir.B, 16-bit floating-point, sampling 1 1
    RGBA_Dir.G, 16-bit floating-point, sampling 1 1
    RGBA_Dir.R, 16-bit floating-point, sampling 1 1
    RGBA_Dome.A, 16-bit floating-point, sampling 1 1
    RGBA_Dome.B, 16-bit floating-point, sampling 1 1
    RGBA_Dome.G, 16-bit floating-point, sampling 1 1
    RGBA_Dome.R, 16-bit floating-point, sampling 1 1
    RGBA_Pht.A, 16-bit floating-point, sampling 1 1
    RGBA_Pht.B, 16-bit floating-point, sampling 1 1
    RGBA_Pht.G, 16-bit floating-point, sampling 1 1
    RGBA_Pht.R, 16-bit floating-point, sampling 1 1
    RGBA_Point.A, 16-bit floating-point, sampling 1 1
    RGBA_Point.B, 16-bit floating-point, sampling 1 1
    RGBA_Point.G, 16-bit floating-point, sampling 1 1
    RGBA_Point.R, 16-bit floating-point, sampling 1 1
    RGBA_Spot.A, 16-bit floating-point, sampling 1 1
    RGBA_Spot.B, 16-bit floating-point, sampling 1 1
    RGBA_Spot.G, 16-bit floating-point, sampling 1 1
    RGBA_Spot.R, 16-bit floating-point, sampling 1 1
    RGBA_default.A, 16-bit floating-point, sampling 1 1
    RGBA_default.B, 16-bit floating-point, sampling 1 1
    RGBA_default.G, 16-bit floating-point, sampling 1 1
    RGBA_default.R, 16-bit floating-point, sampling 1 1
    Z_noice, 16-bit floating-point, sampling 1 1
    Z_noicebeauty_1, 16-bit floating-point, sampling 1 1
    beauty_1, 16-bit floating-point, sampling 1 1
    diffuse_albedo_noice.B, 16-bit floating-point, sampling 1 1
    diffuse_albedo_noice.G, 16-bit floating-point, sampling 1 1
    diffuse_albedo_noice.R, 16-bit floating-point, sampling 1 1
    diffuse_albedo_noicebeauty_1, 16-bit floating-point, sampling 1 1
    variance.A, 16-bit floating-point, sampling 1 1
    variance.B, 16-bit floating-point, sampling 1 1
    variance.G, 16-bit floating-point, sampling 1 1
    variance.R, 16-bit floating-point, sampling 1 1
    variancebeauty_1.A, 16-bit floating-point, sampling 1 1
    variancebeauty_1.B, 16-bit floating-point, sampling 1 1
    variancebeauty_1.G, 16-bit floating-point, sampling 1 1
    variancebeauty_1.R, 16-bit floating-point, sampling 1 1


0 Likes
Message 4 of 7

froszu
Enthusiast
Enthusiast

Python lost formatting so here's link to https://pastebin.com/DPYd3Ba3

0 Likes
Message 5 of 7

Stephen.Blair
Community Manager
Community Manager

You need to do it like this (red is one of my light groups)

4903-rgba-red.jpg



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 6 of 7

froszu
Enthusiast
Enthusiast

Still no luck. I tried any combination I could think of.

I attach my scene which looks like your screenshot, but denoice fails to process it's output.

Could you please provide a working example? I'm stuck...


lgrps_example.zip


thanks

-michal

0 Likes
Message 7 of 7

joie
Enthusiast
Enthusiast

Hi there, Did you find a proper way to denoise your lightgroups in the end?
It's almost five years ago and still no luck with this.

0 Likes