Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arnold : lightGroups aov trigger second aronld universe / multiple images in catalogue #4633

Closed
xanderKendogg opened this issue Apr 13, 2022 · 3 comments

Comments

@xanderKendogg
Copy link

xanderKendogg commented Apr 13, 2022

Version: Gaffer 0.61.7.0-linux
Third-party tools: Arnold

Description

Provide a description of the problem/bug

Rendering out an image in arnold using the IPR ( interactive Arnold Render node ). Provides an undesirable result of catalogue images and aov information in those outputs, when using the lightGroups aov(s).

Steps to reproduce

  1. Copy the gaffer script provided into a gaffer public (0.61.7.0) application.

  2. With only 1 light connected (lightGroup aov set to 1) to the Graph, start the IPR and view the image catalogue.

  3. The image catalogue should currently display 1 image, with ideally the following aovs

  • RGBA (beauty)
  • RGBA_1 (lightGroup1)
  • ** RGBA_default.. this also seems to be introduced when using the lightGroups aov. But it is blank. perhaps not so desirable..
  1. With this IPR running, connect the second light (lightGroup2) to the network.

  2. A new image is created, containing only the lightGroup AOVs. Further more the original image is also still rendering, with the new light contributing to the beauty, but the new lightGroup missing, only available in the new catalogue image, that has no beauty aov.

  3. Suffice to say this is the problem we are facing in production fairly routinely.

  4. Lastly, if the IPR is stopped, and then started again with 2 lights connected as separate light Group aovs. A similar result occurs, 2 imagesspawn in the catalgoue, 1 containing the beauty + aovs, the other only containing the aovs(s)

** along with the mysterious "_default" lightGroup.

I hope this helps identify this on going issue.

Debug log

Please copy the following into the appropriate gaffer application for a reprod.

Click to Expand

import Gaffer
import GafferArnold
import GafferImage
import GafferOSL
import GafferScene
import IECore
import imath

Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 0, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 61, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 7, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 0, persistent=False )

__children = {}

__children["Sphere1"] = GafferScene.Sphere( "Sphere1" )
parent.addChild( __children["Sphere1"] )
__children["Sphere1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ShaderAssignment3"] = GafferScene.ShaderAssignment( "ShaderAssignment3" )
parent.addChild( __children["ShaderAssignment3"] )
__children["ShaderAssignment3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["standard_surface2"] = GafferArnold.ArnoldShader( "standard_surface2" )
parent.addChild( __children["standard_surface2"] )
__children["standard_surface2"].loadShader( "standard_surface" )
__children["standard_surface2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PathFilter3"] = GafferScene.PathFilter( "PathFilter3" )
parent.addChild( __children["PathFilter3"] )
__children["PathFilter3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Parent2"] = GafferScene.Parent( "Parent2" )
parent.addChild( __children["Parent2"] )
__children["Parent2"]["children"].addChild( GafferScene.ScenePlug( "child1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Parent2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Camera1"] = GafferScene.Camera( "Camera1" )
parent.addChild( __children["Camera1"] )
__children["Camera1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"] = GafferScene.Outputs( "Outputs1" )
parent.addChild( __children["Outputs1"] )
__children["Outputs1"]["outputs"].addChild( Gaffer.ValuePlug( "output1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.BoolPlug( "active", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "fileName", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "type", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "data", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"].addChild( Gaffer.CompoundDataPlug( "parameters", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "driverType", Gaffer.StringPlug( "value", defaultValue = 'ClientDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "driverType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "catalogue:imageName", Gaffer.StringPlug( "value", defaultValue = 'Image', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "catalogue_imageName", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayHost", Gaffer.StringPlug( "value", defaultValue = 'localhost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayHost", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayPort", Gaffer.StringPlug( "value", defaultValue = '${image:catalogue:port}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayPort", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "remoteDisplayType", Gaffer.StringPlug( "value", defaultValue = 'GafferImage::GafferDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "remoteDisplayType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "quantize", Gaffer.IntVectorDataPlug( "value", defaultValue = IECore.IntVectorData( [ 0, 0, 0, 0 ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "quantize", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["InteractiveArnoldRender1"] = GafferArnold.InteractiveArnoldRender( "InteractiveArnoldRender1" )
parent.addChild( __children["InteractiveArnoldRender1"] )
__children["InteractiveArnoldRender1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["StandardOptions1"] = GafferScene.StandardOptions( "StandardOptions1" )
parent.addChild( __children["StandardOptions1"] )
__children["StandardOptions1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["DistantLight2"] = GafferArnold.ArnoldLight( "DistantLight2" )
parent.addChild( __children["DistantLight2"] )
__children["DistantLight2"].loadShader( "distant_light" )
__children["DistantLight2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["DistantLight3"] = GafferArnold.ArnoldLight( "DistantLight3" )
parent.addChild( __children["DistantLight3"] )
__children["DistantLight3"].loadShader( "distant_light" )
__children["DistantLight3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Parent3"] = GafferScene.Parent( "Parent3" )
parent.addChild( __children["Parent3"] )
__children["Parent3"]["children"].addChild( GafferScene.ScenePlug( "child1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Parent3"]["children"].addChild( GafferScene.ScenePlug( "child2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Parent3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Dot5"] = Gaffer.Dot( "Dot5" )
parent.addChild( __children["Dot5"] )
__children["Dot5"].setup( GafferScene.ScenePlug( "in", ) )
__children["Dot5"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Dot6"] = Gaffer.Dot( "Dot6" )
parent.addChild( __children["Dot6"] )
__children["Dot6"].setup( GafferScene.ScenePlug( "in", ) )
__children["Dot6"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue1"] = GafferImage.Catalogue( "Catalogue1" )
parent.addChild( __children["Catalogue1"] )
__children["Catalogue1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Dot9"] = Gaffer.Dot( "Dot9" )
parent.addChild( __children["Dot9"] )
__children["Dot9"].setup( GafferScene.ScenePlug( "in", ) )
__children["Dot9"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"] = GafferScene.Outputs( "Outputs2" )
parent.addChild( __children["Outputs2"] )
__children["Outputs2"]["outputs"].addChild( Gaffer.ValuePlug( "output1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.BoolPlug( "active", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "fileName", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "type", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "data", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"].addChild( Gaffer.CompoundDataPlug( "parameters", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "driverType", Gaffer.StringPlug( "value", defaultValue = 'ClientDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "driverType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "catalogue:imageName", Gaffer.StringPlug( "value", defaultValue = 'Image', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "catalogue_imageName", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayHost", Gaffer.StringPlug( "value", defaultValue = 'localhost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayHost", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayPort", Gaffer.StringPlug( "value", defaultValue = '${image:catalogue:port}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayPort", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "remoteDisplayType", Gaffer.StringPlug( "value", defaultValue = 'GafferImage::GafferDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "remoteDisplayType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "quantize", Gaffer.IntVectorDataPlug( "value", defaultValue = IECore.IntVectorData( [ 0, 0, 0, 0 ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "quantize", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"].addChild( Gaffer.ValuePlug( "output2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.BoolPlug( "active", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.StringPlug( "fileName", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.StringPlug( "type", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.StringPlug( "data", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"].addChild( Gaffer.CompoundDataPlug( "parameters", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs2"]["outputs"]["output2"]["parameters"].addChild( Gaffer.NameValuePlug( "driverType", Gaffer.StringPlug( "value", defaultValue = 'ClientDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "driverType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output2"]["parameters"].addChild( Gaffer.NameValuePlug( "displayHost", Gaffer.StringPlug( "value", defaultValue = 'localhost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayHost", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output2"]["parameters"].addChild( Gaffer.NameValuePlug( "displayPort", Gaffer.StringPlug( "value", defaultValue = '${image:catalogue:port}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayPort", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"]["outputs"]["output2"]["parameters"].addChild( Gaffer.NameValuePlug( "remoteDisplayType", Gaffer.StringPlug( "value", defaultValue = 'GafferImage::GafferDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "remoteDisplayType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Sphere1"]["__uiPosition"].setValue( imath.V2f( 233.07428, -1.63950443 ) )
__children["ShaderAssignment3"]["in"].setInput( __children["Sphere1"]["out"] )
__children["ShaderAssignment3"]["filter"].setInput( __children["PathFilter3"]["out"] )
__children["ShaderAssignment3"]["shader"].setInput( __children["standard_surface2"]["out"] )
__children["ShaderAssignment3"]["__uiPosition"].setValue( imath.V2f( 233.07428, -14.9395008 ) )
__children["standard_surface2"]["parameters"]["base_color"].setValue( imath.Color3f( 0.0602213591, 0.1875, 0.0761311799 ) )
__children["standard_surface2"]["parameters"]["aov_id1"].setValue( 'id_1' )
__children["standard_surface2"]["parameters"]["aov_id2"].setValue( 'id_2' )
__children["standard_surface2"]["parameters"]["aov_id3"].setValue( 'id_3' )
__children["standard_surface2"]["parameters"]["aov_id4"].setValue( 'id_4' )
__children["standard_surface2"]["parameters"]["aov_id5"].setValue( 'id_5' )
__children["standard_surface2"]["parameters"]["aov_id6"].setValue( 'id_6' )
__children["standard_surface2"]["parameters"]["aov_id7"].setValue( 'id_7' )
__children["standard_surface2"]["parameters"]["aov_id8"].setValue( 'id_8' )
__children["standard_surface2"]["__uiPosition"].setValue( imath.V2f( 209.874283, -14.9395008 ) )
__children["PathFilter3"]["paths"].setValue( IECore.StringVectorData( [ '/sphere' ] ) )
__children["PathFilter3"]["__uiPosition"].setValue( imath.V2f( 247.346497, -8.85746765 ) )
__children["Parent2"]["in"].setInput( __children["Camera1"]["out"] )
__children["Parent2"]["parent"].setValue( '/' )
__children["Parent2"]["children"][0].setInput( __children["ShaderAssignment3"]["out"] )
__children["Parent2"]["__uiPosition"].setValue( imath.V2f( 232.32428, -34.825325 ) )
__children["Camera1"]["transform"]["translate"].setValue( imath.V3f( 2.38680363, 1.71970677, 5.45701218 ) )
__children["Camera1"]["transform"]["rotate"].setValue( imath.V3f( -16.6157799, 7.44844961, -1.49410414e-06 ) )
__children["Camera1"]["renderSettingOverrides"]["filmFit"]["value"].setValue( 2 )
__children["Camera1"]["renderSettingOverrides"]["filmFit"]["enabled"].setValue( True )
__children["Camera1"]["__uiPosition"].setValue( imath.V2f( 198.630447, -26.6612625 ) )
__children["Outputs1"]["in"].setInput( __children["StandardOptions1"]["out"] )
__children["Outputs1"]["outputs"]["output1"]["name"].setValue( 'Interactive/Beauty' )
__children["Outputs1"]["outputs"]["output1"]["fileName"].setValue( 'beauty' )
__children["Outputs1"]["outputs"]["output1"]["type"].setValue( 'ieDisplay' )
__children["Outputs1"]["outputs"]["output1"]["data"].setValue( 'rgba' )
__children["Outputs1"]["__uiPosition"].setValue( imath.V2f( 235.32428, -75.132019 ) )
__children["InteractiveArnoldRender1"]["in"].setInput( __children["Outputs2"]["out"] )
__children["InteractiveArnoldRender1"]["__uiPosition"].setValue( imath.V2f( 235.324677, -83.2960815 ) )
__children["StandardOptions1"]["in"].setInput( __children["Parent3"]["out"] )
__children["StandardOptions1"]["options"]["renderCamera"]["value"].setValue( '/camera' )
__children["StandardOptions1"]["options"]["renderCamera"]["enabled"].setValue( True )
__children["StandardOptions1"]["__uiPosition"].setValue( imath.V2f( 235.32428, -69.4679565 ) )
__children["DistantLight2"]["name"].setValue( 'distantLight' )
__children["DistantLight2"]["transform"]["rotate"].setValue( imath.V3f( -45.9082527, -21.9134998, 36.2621765 ) )
__children["DistantLight2"]["parameters"]["exposure"].setValue( 3.0 )
__children["DistantLight2"]["parameters"]["aov"].setValue( '1' )
__children["DistantLight2"]["__uiPosition"].setValue( imath.V2f( 260.388947, -44.0558128 ) )
__children["DistantLight3"]["name"].setValue( 'distantLight' )
__children["DistantLight3"]["transform"]["rotate"].setValue( imath.V3f( -175.811249, 33.0262947, -17.4796696 ) )
__children["DistantLight3"]["parameters"]["color"].setValue( imath.Color3f( 1, 0, 1 ) )
__children["DistantLight3"]["parameters"]["aov"].setValue( '2' )
__children["DistantLight3"]["__uiPosition"].setValue( imath.V2f( 273.289215, -43.8073921 ) )
__children["Parent3"]["in"].setInput( __children["Parent2"]["out"] )
__children["Parent3"]["parent"].setValue( '/' )
__children["Parent3"]["children"][0].setInput( __children["Dot5"]["out"] )
__children["Parent3"]["children"][1].setInput( __children["Dot9"]["out"] )
__children["Parent3"]["__uiPosition"].setValue( imath.V2f( 235.32428, -63.803894 ) )
__children["Dot5"]["in"].setInput( __children["DistantLight2"]["out"] )
__children["Dot5"]["__uiPosition"].setValue( imath.V2f( 235.32428, -51.3878479 ) )
__children["Dot6"]["labelType"].setValue( 3 )
__children["Dot6"]["label"].setValue( 'Start an IPR and connect me' )
__children["Dot6"]["in"].setInput( __children["DistantLight3"]["out"] )
__children["Dot6"]["__uiPosition"].setValue( imath.V2f( 273.289215, -49.9718628 ) )
__children["Catalogue1"]["directory"].setValue( '${project:rootDirectory}/catalogues/${script:name}' )
__children["Catalogue1"]["__uiPosition"].setValue( imath.V2f( 254.042252, -83.283165 ) )
__children["Dot9"]["in"].setInput( __children["Dot6"]["out"] )
__children["Dot9"]["__uiPosition"].setValue( imath.V2f( 273.289215, -56.4718628 ) )
__children["Outputs2"]["in"].setInput( __children["Outputs1"]["out"] )
__children["Outputs2"]["outputs"]["output1"]["name"].setValue( 'Interactive/Beauty' )
__children["Outputs2"]["outputs"]["output1"]["fileName"].setValue( 'beauty' )
__children["Outputs2"]["outputs"]["output1"]["type"].setValue( 'ieDisplay' )
__children["Outputs2"]["outputs"]["output1"]["data"].setValue( 'rgba' )
__children["Outputs2"]["outputs"]["output2"]["name"].setValue( 'Interactive/Arnold/Light_Groups' )
__children["Outputs2"]["outputs"]["output2"]["fileName"].setValue( 'light_groups' )
__children["Outputs2"]["outputs"]["output2"]["type"].setValue( 'ieDisplay' )
__children["Outputs2"]["outputs"]["output2"]["data"].setValue( 'color RGBA_*' )
__children["Outputs2"]["__uiPosition"].setValue( imath.V2f( 235.324677, -75.132019 ) )


del __children


@johnhaddon
Copy link
Member

Did a bit of triage on this, and I think there are three separate components here :

  1. The unwanted _default light group. I think this is an Arnold issue rather than a Gaffer one.
  2. The creation of a second catalogue image when adding a light group. This is more of a Gaffer issue, where the following happens :
  3. The duplicate image when starting a render with both light groups. This one seems to be another Arnold issue. For the first progressive pass, Arnold opens our driver with RGBA_default, RGBA_1, RGBA_2 AOVs. For the next progressive pass, Arnold reopens our driver with RGBA_1, RGBA_2, RGBA_default AOVs. This change of order triggers our "channels have changed" behaviour from 2, again causing us to create two images.

Item 2 relates to #4267, where we end up making a new image because the crop window has changed.

Possible resolution for 2) and the crop window issue :

  • Change the IECoreImage::DisplayDriver API so that the channels/dataWindow/displayWindow are not locked on construction, but are instead provided by a virtual imageOpen() call after the fact. Allow that call to be repeated to change channels/windows.
  • Use the above to always reuse drivers in GafferArnoldPlugin/OutputDriver.cpp.
  • Update GafferImage::Display to support repeated calls to imageOpen().

This would require a Cortex ABI break, so couldn't be done till Gaffer 0.62 at the earliest.

@johnhaddon
Copy link
Member

We discussed this a bit further today in the dev meeting, and we think there's a less intrusive fix we can make that won't require a Cortex update. The rough plan is to give every display a more bulletproof ID than the clientPID we currently use, and then we can avoid some of the heuristics the Catalogue is using. So in the cases we need to make a new driver, we can be sure that it belongs in a particular image and can clobber the old driver with it instead of making a new image in the Catalogue.

@johnhaddon
Copy link
Member

  1. The duplicate image when starting a render with both light groups. This one seems to be another Arnold issue.

Update : this part was fixed in Arnold 7.1.2.1 :

ARNOLD-10959 - Inconsistent order of light AOVs in output iterators passed to the driver API

johnhaddon added a commit to johnhaddon/gaffer that referenced this issue Nov 7, 2023
This stops the Catalogue from thinking the render has completed in cases where Arnold has to close all drivers before opening new ones.

Fixes GafferHQ#4633.
Fixes GafferHQ#4267.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants