Overriding / Assigning USD Shaders In Gaffer

714 views
Skip to first unread message

noizf...@gmail.com

unread,
Aug 17, 2022, 2:33:46 PM8/17/22
to gaffer-dev
Hi John and gaffer-devs,

I noticed in the BoF presentation that USD shaders were mentioned as being supported in gaffer now so I gave the latest version a spin and tried it out. I want to make sure that I'm not missing out on an easier way to do this so sharing my test workflow for your validation and advice.

I imported a cube with an arnold standard surface shader exported from maya-arnold as an arnold usd file. I checked the scene inspector and the ai:surface attribute showed the shader name and the attribute base_color was as per the exported value. I then dropped a ShaderTweaks node and after setting the shader type to Arnold Surface, I was able to access the standard surface shader from the selection and override the required parameters. I tested this with a simple checker texture and that also showed up in the overrides.

So far, so good. But, is the above method an ideal way to override shaders contained in a usd file inside gaffer without requiring any explicit shader graph conversion?

My goal is to port assets on a live show from maya to gaffer so that we can switch to gaffer for shot production. All the assets are authored in maya and arnold and we were exploring the script shared by Don Boogert in an older thread to bring in all the shaders into gaffer as gaffer native shader nodes network using his script. At the same time, I was also exploring other ways to do this without requiring a full shader network port and it seems like importing the assets as USD would be one way to do it. 

The only step that I'm unsure about is eventually we will be bringing in abc cache files from the shot publish into gaffer so how do I merge or reassign the shaders embedded in a usd file exported from the asset's lookdev stage to the abc geometry from the shot stage in gaffer since the shader won't be directly accessible for shader assignment in gaffer. Creating usd layers outside of gaffer where the lookdev layer is pre-applied seems like one way to do it so gaffer just reads whatever is in the layers but I was wondering if I was missing something already available in gaffer for this sort of work.

Any suggestions are welcome.

Thanks,
Sachin

John Haddon

unread,
Aug 18, 2022, 3:07:54 AM8/18/22
to gaffe...@googlegroups.com
Hi Sachin,

I think you've got a pretty good handle on this already. I guess I'd suggest that if your lookdev is "done", then just loading it via the SceneReader and doing a few downstream tweaks is probably flexible enough. But if your goal is to be able to transfer assets to Gaffer for significant editing, then Don's approach will be superior.

For your "transfer USD shaders to ABC geometry" problem, you should be able to use a CopyAttributes node to copy `ai:surface` from one stream to another.

Hope that helps...

Cheers...
John

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/0c70d0f9-1225-42a4-b9dc-f2e7275b96d2n%40googlegroups.com.

noizf...@gmail.com

unread,
Aug 19, 2022, 4:30:50 PM8/19/22
to gaffer-dev
Thanks John, I forgot all about CopyAttributes node! This works perfectly! Thank you for the suggestion.

Cheers,
Sachin

Santosh Das

unread,
Sep 16, 2022, 1:51:38 PM9/16/22
to gaffer-dev
Hi John,

We are trying to further expand on this with our production assets and we noticed that if the top shader on a geo is aiLayer shader, gaffer seems to fail to render the connected shader graph exported into the usd file. We have managed to reproduce this with a simple sphere scene so I have attached the repro package for your reference. If we use a simple aiStandardSurface as the top shader, then everything works as expected. Please note that the same usd file with the layer shaders renders fine in arnold when we bring it in with a standin.

We noticed the below warning messages in the arnold log from gaffer which we do not see on the mtoa side:

00:00:00   486MB WARNING | wrong output specification for link source: "standard_surface(out)"
00:00:00   486MB WARNING | wrong output specification for link source: "standard_surface(out)"
00:00:00   486MB WARNING | wrong output specification for link source: "checkerboard(out)"


Below are the app versions:

rocky linux 8.4
maya 2020 with MtoA 5.1.1.1
gaffer 1.0.4.0 with Arnold Core 7.1 and MtoA 5.1.1.1 shaders in ARNOLD_PLUGIN_PATH

It would be great if you could check our repro and let us know if you notice any issues.

Thanks,
Santosh

Santosh Das

unread,
Sep 16, 2022, 1:58:56 PM9/16/22
to gaffer-dev

John Haddon

unread,
Sep 20, 2022, 6:58:29 AM9/20/22
to gaffer-dev
Thanks for the simple repro - that made things easy. I've fixed the bug in https://github.com/GafferHQ/gaffer/pull/4847. All being well, it should go into the next release...
Cheers...
John

p.s. There is another warning message : `WARNING : setParameter : Arnold parameter ... has unsupported type "CLOSURE"`. I believe this is because the USD file contains a nonsensical string value for the `input1` parameter in addition to the connection. We could work around it in Gaffer, but hopefully this is something that can get fixed on the Maya side instead.

noizf...@gmail.com

unread,
Dec 7, 2022, 10:48:44 PM12/7/22
to gaffer-dev
Hi John,

Besides CopyAttributes, I found another way to do this which seems far simpler. Posting it here in case anyone is looking to solve the same problem. We can use the MergeScenes node with the Attributes Mode set to Merge which allows the base input's shaders to remain after mergin the anim cache on top of it! I don't think there are any caveats to this workflow besides overriding any other atributes from the anim cache that may not be desirable (in our case all our base attributes are on the base model so it works for us).

Thanks for providing this node in gaffer. This is super helpful!

Cheers,
Sachin

Nico Rehberg

unread,
May 10, 2023, 10:41:19 AM5/10/23
to gaffer-dev
Hi all,

sorry to dig this up. I really like the idea here with having the lookdev in an USD file and then apply that to my Alembic import. (Coming from Maya/Arnold)
But I wonder how everyone is handling the difference in hierarchy between the USD and the ABC read. USD comes in with "shapes" but the Alembic does not have shapes.
Like mentioned here:

How do you set up your CopyAttributes? Of course I could manually specify source location and PathFilter the destination, but that would mean one CopyAttribute per mesh. That feels rather inefficient. Is there an elegant way to match these differences in hierarchies?

Thanks,
Nico

Sachin Shrestha

unread,
May 10, 2023, 11:37:02 AM5/10/23
to gaffer-dev
Hi Nico,

If you are exporting the arnold usd lookdev from mtoa-usd, you can set the "Export Dag Name" setting in the Arnold Setting > System tab to "Transform" instead of shape. This will export the hierarchy into the usd files with just the transform. You can then use this with MergeScenes with the shader usd as the first input and the abc as the second input with the Attributes Mode set to "Merge" and Object Mode  to "Replace" which will essentially copy over the animated object data from the abc onto the static model with shaders from the shader usd file.

Cheers,
Sachin

Nico Rehberg

unread,
May 10, 2023, 12:30:40 PM5/10/23
to gaffer-dev

Hi Sachin,

great! I don't think I would have figured that out anytime soon and would have build some insane reassignment stuff in Gaffer. This works nice now for shaders. Thanks, a lot.

But for attributes I noticed that the arnold attributes coming from the (mtoa) USD do not match what Gaffer expects. i.e. Subdivision comes in as "ai:subdiv_iterations" while in Gaffer it seems to be "ai:polymesh:subdiv_iterations". At least that is what an ArnoldAttributes node sets. I tried a shuffleAttributes to get that name, but somehow that doesn't help, even though the result looks identical in the SceneInspector.

Thanks,
Nico

Nico Rehberg

unread,
May 10, 2023, 12:38:49 PM5/10/23
to gaffer-dev
Ok, maybe I should have looked at the log a bit better. But it is swamped with those Warnings John mentioned:
WARNING [setParameter] Arnold parameter "passthrough" on node "shader:1afc966505b76df7ffaf10a5f5a35ab5:fellSG/aov23" has unsupported type "CLOSURE".

so I missed this part:
WARNING [IECoreArnold::Renderer] Expected IntData but got UCharData for attribute "ai:polymesh:subdiv_iterations".

So shuffling is not enough, the datatype is wrong too. Hmm.

Nico

Sachin Shrestha

unread,
May 10, 2023, 2:53:49 PM5/10/23
to gaffer-dev
Hmm...does the object type import as catmull clark? I think it does render the subdiv just fine though?

-Sachin

Nico Rehberg

unread,
May 10, 2023, 4:35:46 PM5/10/23
to gaffer-dev
Yes, it does subdivide. But it is using default settings. Any non-default shape attributes set in the USD are lost. Try turning off subdivision, or cast shadows. I can see them in the attributes, but they are stored/read in a way that Gaffer does not seem to understand. i.e. visibilities are stored as a bitmask under ai:visibility for example.
Nico

William Eguienta

unread,
May 22, 2023, 9:20:55 AM5/22/23
to gaffer-dev
Hi,
looking at usd shading loading, I fear that I don't understand how it's works

I don't see how to import the lookdev in gaffer and apply it to my object

in other DCCs, like maya, i'm used to have the DCC update the "master" usd file, but i don't see how to do it in gaffer
so I also don't see how to setup where the usdlayer is supposed to be in the USD hierarchy

can you enlight me on what's wrong with my setup please ?

here is my little test scene :

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

Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 1, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 2, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 6, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 0, persistent=False )

__children = {}

__children["SceneReader"] = GafferScene.SceneReader( "SceneReader" )
parent.addChild( __children["SceneReader"] )
__children["SceneReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["USDLayerWriter"] = GafferUSD.USDLayerWriter( "USDLayerWriter" )
parent.addChild( __children["USDLayerWriter"] )
__children["USDLayerWriter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ShaderAssignment"] = GafferScene.ShaderAssignment( "ShaderAssignment" )
parent.addChild( __children["ShaderAssignment"] )
__children["ShaderAssignment"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["shd_BLUE"] = GafferArnold.ArnoldShader( "shd_BLUE" )
parent.addChild( __children["shd_BLUE"] )
__children["shd_BLUE"].loadShader( "standard_surface" )
__children["shd_BLUE"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PathFilter"] = GafferScene.PathFilter( "PathFilter" )
parent.addChild( __children["PathFilter"] )
__children["PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ShaderAssignment1"] = GafferScene.ShaderAssignment( "ShaderAssignment1" )
parent.addChild( __children["ShaderAssignment1"] )
__children["ShaderAssignment1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PathFilter1"] = GafferScene.PathFilter( "PathFilter1" )
parent.addChild( __children["PathFilter1"] )
__children["PathFilter1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["shd_RED"] = GafferArnold.ArnoldShader( "shd_RED" )
parent.addChild( __children["shd_RED"] )
__children["shd_RED"].loadShader( "standard_surface" )
__children["shd_RED"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"] = GafferScene.Outputs( "Outputs" )
parent.addChild( __children["Outputs"] )
__children["Outputs"]["outputs"].addChild( Gaffer.ValuePlug( "output1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.BoolPlug( "active", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "fileName", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "type", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "data", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["outputs"]["output1"].addChild( Gaffer.CompoundDataPlug( "parameters", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Outputs"]["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["Outputs"]["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["Outputs"]["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["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "layerPerLightGroup", Gaffer.BoolPlug( "value", defaultValue = False, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "layerPerLightGroup", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["Outputs"]["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["Outputs"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["InteractiveArnoldRender"] = GafferArnold.InteractiveArnoldRender( "InteractiveArnoldRender" )
parent.addChild( __children["InteractiveArnoldRender"] )
__children["InteractiveArnoldRender"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"] = GafferImage.Catalogue( "Catalogue" )
parent.addChild( __children["Catalogue"] )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image4", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image5", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Catalogue"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes"] = GafferScene.MergeScenes( "MergeScenes" )
parent.addChild( __children["MergeScenes"] )
__children["MergeScenes"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes"]["in"].addChild( GafferScene.ScenePlug( "in3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Camera"] = GafferScene.Camera( "Camera" )
parent.addChild( __children["Camera"] )
__children["Camera"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ArnoldOptions"] = GafferArnold.ArnoldOptions( "ArnoldOptions" )
parent.addChild( __children["ArnoldOptions"] )
__children["ArnoldOptions"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["StandardOptions"] = GafferScene.StandardOptions( "StandardOptions" )
parent.addChild( __children["StandardOptions"] )
__children["StandardOptions"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SceneWriter"] = GafferScene.SceneWriter( "SceneWriter" )
parent.addChild( __children["SceneWriter"] )
__children["SceneWriter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Load_Geo"] = GafferScene.SceneReader( "Load_Geo" )
parent.addChild( __children["Load_Geo"] )
__children["Load_Geo"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["load_Layer"] = GafferScene.SceneReader( "load_Layer" )
parent.addChild( __children["load_Layer"] )
__children["load_Layer"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes1"] = GafferScene.MergeScenes( "MergeScenes1" )
parent.addChild( __children["MergeScenes1"] )
__children["MergeScenes1"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Sphere"] = GafferScene.Sphere( "Sphere" )
parent.addChild( __children["Sphere"] )
__children["Sphere"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Cube"] = GafferScene.Cube( "Cube" )
parent.addChild( __children["Cube"] )
__children["Cube"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes2"] = GafferScene.MergeScenes( "MergeScenes2" )
parent.addChild( __children["MergeScenes2"] )
__children["MergeScenes2"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["MergeScenes2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["CopyAttributes"] = GafferScene.CopyAttributes( "CopyAttributes" )
parent.addChild( __children["CopyAttributes"] )
__children["CopyAttributes"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["PathFilter2"] = GafferScene.PathFilter( "PathFilter2" )
parent.addChild( __children["PathFilter2"] )
__children["PathFilter2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["DistantLight"] = GafferArnold.ArnoldLight( "DistantLight" )
parent.addChild( __children["DistantLight"] )
__children["DistantLight"].loadShader( "distant_light" )
__children["DistantLight"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["FullScene_OUT"] = GafferScene.SceneWriter( "FullScene_OUT" )
parent.addChild( __children["FullScene_OUT"] )
__children["FullScene_OUT"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SceneReader3"] = GafferScene.SceneReader( "SceneReader3" )
parent.addChild( __children["SceneReader3"] )
__children["SceneReader3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Switch"] = Gaffer.Switch( "Switch" )
parent.addChild( __children["Switch"] )
__children["Switch"].setup( GafferScene.ScenePlug( "in", ) )
__children["Switch"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Switch"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Switch"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Switch"]["in"].addChild( GafferScene.ScenePlug( "in3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop"] = Gaffer.Backdrop( "Backdrop" )
parent.addChild( __children["Backdrop"] )
__children["Backdrop"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop"].addChild( Gaffer.Box2fPlug( "__uiBound", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop1"] = Gaffer.Backdrop( "Backdrop1" )
parent.addChild( __children["Backdrop1"] )
__children["Backdrop1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop1"].addChild( Gaffer.Box2fPlug( "__uiBound", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop2"] = Gaffer.Backdrop( "Backdrop2" )
parent.addChild( __children["Backdrop2"] )
__children["Backdrop2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Backdrop2"].addChild( Gaffer.Box2fPlug( "__uiBound", defaultValue = imath.Box2f( imath.V2f( -10, -10 ), imath.V2f( 10, 10 ) ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["SceneReader"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/master1.usda' )
__children["SceneReader"]["refreshCount"].setValue( 11 )
__children["SceneReader"]["__uiPosition"].setValue( imath.V2f( -11.9459076, 70.5467911 ) )
__children["USDLayerWriter"]["dispatcher"]["deadline"]["pool"].setValue( 'none' )
__children["USDLayerWriter"]["dispatcher"]["deadline"]["secondaryPool"].setValue( 'none' )
__children["USDLayerWriter"]["dispatcher"]["deadline"]["group"].setValue( 'none' )
__children["USDLayerWriter"]["base"].setInput( __children["SceneReader"]["out"] )
__children["USDLayerWriter"]["layer"].setInput( __children["ShaderAssignment1"]["out"] )
__children["USDLayerWriter"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/look1.usda' )
__children["USDLayerWriter"]["__uiPosition"].setValue( imath.V2f( -11.9459076, -3.96795058 ) )
__children["ShaderAssignment"]["in"].setInput( __children["SceneReader"]["out"] )
__children["ShaderAssignment"]["filter"].setInput( __children["PathFilter"]["out"] )
__children["ShaderAssignment"]["shader"].setInput( __children["shd_BLUE"]["out"] )
__children["ShaderAssignment"]["__uiPosition"].setValue( imath.V2f( 44.8880386, 42.2679367 ) )
__children["shd_BLUE"]["parameters"]["base_color"].setValue( imath.Color3f( 0.144999996, 0.800000012, 0.800000012 ) )
__children["shd_BLUE"]["__uiPosition"].setValue( imath.V2f( 22.4930267, 42.2679367 ) )
__children["PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/cube' ] ) )
__children["PathFilter"]["__uiPosition"].setValue( imath.V2f( 59.1602554, 48.3499641 ) )
__children["ShaderAssignment1"]["in"].setInput( __children["ShaderAssignment"]["out"] )
__children["ShaderAssignment1"]["filter"].setInput( __children["PathFilter1"]["out"] )
__children["ShaderAssignment1"]["shader"].setInput( __children["shd_RED"]["out"] )
__children["ShaderAssignment1"]["__uiPosition"].setValue( imath.V2f( 44.8880386, 19.7931328 ) )
__children["PathFilter1"]["paths"].setValue( IECore.StringVectorData( [ '/sphere' ] ) )
__children["PathFilter1"]["__uiPosition"].setValue( imath.V2f( 62.0455322, 23.8811378 ) )
__children["shd_RED"]["parameters"]["base_color"].setValue( imath.Color3f( 0.485000014, 0.138225019, 0.138225019 ) )
__children["shd_RED"]["__uiPosition"].setValue( imath.V2f( 21.5487995, 19.7931328 ) )
__children["Outputs"]["in"].setInput( __children["ArnoldOptions"]["out"] )
__children["Outputs"]["outputs"]["output1"]["name"].setValue( 'Interactive/Arnold/Beauty' )
__children["Outputs"]["outputs"]["output1"]["fileName"].setValue( 'beauty' )
__children["Outputs"]["outputs"]["output1"]["type"].setValue( 'ieDisplay' )
__children["Outputs"]["outputs"]["output1"]["data"].setValue( 'rgba' )
__children["Outputs"]["__uiPosition"].setValue( imath.V2f( 64.9539413, -60.4149437 ) )
__children["InteractiveArnoldRender"]["in"].setInput( __children["Outputs"]["out"] )
__children["InteractiveArnoldRender"]["__uiPosition"].setValue( imath.V2f( 64.9539413, -66.0789795 ) )
__children["Catalogue"]["images"]["Image"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/2fe5ee8e6a3254197d60978b4a53c66c.exr' )
__children["Catalogue"]["images"]["Image1"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/2fe5ee8e6a3254197d60978b4a53c66c.exr' )
__children["Catalogue"]["images"]["Image2"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/2fe5ee8e6a3254197d60978b4a53c66c.exr' )
__children["Catalogue"]["images"]["Image3"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/d0807f8e1bf6521b10dade6e345b960d.exr' )
__children["Catalogue"]["images"]["Image4"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/438cd43372c80763ce348c963abfb66d.exr' )
__children["Catalogue"]["images"]["Image5"]["fileName"].setValue( 'C:/Users/william/gaffer/projects/default/catalogues/usdLayerTests/25d8b1184009aefb600f6ffc92816538.exr' )
__children["Catalogue"]["imageIndex"].setValue( 6 )
__children["Catalogue"]["directory"].setValue( '${project:rootDirectory}/catalogues/${script:name}' )
__children["Catalogue"]["__uiPosition"].setValue( imath.V2f( 42.8670654, -64.6271515 ) )
__children["MergeScenes"]["in"][0].setInput( __children["Switch"]["out"] )
__children["MergeScenes"]["in"][1].setInput( __children["DistantLight"]["out"] )
__children["MergeScenes"]["in"][2].setInput( __children["Camera"]["out"] )
__children["MergeScenes"]["__uiPosition"].setValue( imath.V2f( 64.9539413, -35.9180222 ) )
__children["Camera"]["transform"]["translate"].setValue( imath.V3f( 0, 0, 9.2494278 ) )
__children["Camera"]["transform"]["rotate"].setValue( imath.V3f( 0, 0, 5.1226416e-06 ) )
__children["Camera"]["__uiPosition"].setValue( imath.V2f( 76.123085, -27.7539597 ) )
__children["ArnoldOptions"]["in"].setInput( __children["StandardOptions"]["out"] )
__children["ArnoldOptions"]["__uiPosition"].setValue( imath.V2f( 64.9539413, -52.2508812 ) )
__children["StandardOptions"]["in"].setInput( __children["MergeScenes"]["out"] )
__children["StandardOptions"]["options"]["renderCamera"]["value"].setValue( '/camera' )
__children["StandardOptions"]["options"]["renderCamera"]["enabled"].setValue( True )
__children["StandardOptions"]["__uiPosition"].setValue( imath.V2f( 64.9539413, -46.5868187 ) )
__children["SceneWriter"]["dispatcher"]["deadline"]["pool"].setValue( 'none' )
__children["SceneWriter"]["dispatcher"]["deadline"]["secondaryPool"].setValue( 'none' )
__children["SceneWriter"]["dispatcher"]["deadline"]["group"].setValue( 'none' )
__children["SceneWriter"]["in"].setInput( __children["MergeScenes2"]["out"] )
__children["SceneWriter"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/master1.usda' )
__children["SceneWriter"]["__uiPosition"].setValue( imath.V2f( -12.2830811, 96.229599 ) )
__children["Load_Geo"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/master1.usda' )
__children["Load_Geo"]["refreshCount"].setValue( 1 )
__children["Load_Geo"]["__uiPosition"].setValue( imath.V2f( -41.5651817, -12.883811 ) )
__children["load_Layer"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/look1.usda' )
__children["load_Layer"]["refreshCount"].setValue( 6 )
__children["load_Layer"]["__uiPosition"].setValue( imath.V2f( -9.71572971, -12.7824364 ) )
__children["MergeScenes1"]["in"][0].setInput( __children["Load_Geo"]["out"] )
__children["MergeScenes1"]["in"][1].setInput( __children["load_Layer"]["out"] )
__children["MergeScenes1"]["attributesMode"].setValue( 1 )
__children["MergeScenes1"]["__uiPosition"].setValue( imath.V2f( -9.71572971, -27.0138855 ) )
__children["Sphere"]["transform"]["translate"].setValue( imath.V3f( -1.68023252, 0, 0 ) )
__children["Sphere"]["__uiPosition"].setValue( imath.V2f( -23.6799049, 119.92881 ) )
__children["Cube"]["transform"]["translate"].setValue( imath.V3f( 1.56395364, 0, 0 ) )
__children["Cube"]["__uiPosition"].setValue( imath.V2f( -0.885452271, 118.843361 ) )
__children["MergeScenes2"]["in"][0].setInput( __children["Sphere"]["out"] )
__children["MergeScenes2"]["in"][1].setInput( __children["Cube"]["out"] )
__children["MergeScenes2"]["__uiPosition"].setValue( imath.V2f( -10.7830811, 110.679298 ) )
__children["CopyAttributes"]["in"].setInput( __children["Load_Geo"]["out"] )
__children["CopyAttributes"]["filter"].setInput( __children["PathFilter2"]["out"] )
__children["CopyAttributes"]["source"].setInput( __children["load_Layer"]["out"] )
__children["CopyAttributes"]["__uiPosition"].setValue( imath.V2f( -40.0651817, -29.0442429 ) )
__children["PathFilter2"]["paths"].setValue( IECore.StringVectorData( [ '/*' ] ) )
__children["PathFilter2"]["__uiPosition"].setValue( imath.V2f( -25.5950146, -25.0123768 ) )
__children["DistantLight"]["name"].setValue( 'distantLight' )
__children["DistantLight"]["transform"]["rotate"].setValue( imath.V3f( 0, -46.9000015, 0 ) )
__children["DistantLight"]["__uiPosition"].setValue( imath.V2f( 63.4539375, -27.7539597 ) )
__children["FullScene_OUT"]["dispatcher"]["deadline"]["pool"].setValue( 'none' )
__children["FullScene_OUT"]["dispatcher"]["deadline"]["secondaryPool"].setValue( 'none' )
__children["FullScene_OUT"]["dispatcher"]["deadline"]["group"].setValue( 'none' )
__children["FullScene_OUT"]["in"].setInput( __children["ShaderAssignment1"]["out"] )
__children["FullScene_OUT"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/Fullscene.usda' )
__children["FullScene_OUT"]["__uiPosition"].setValue( imath.V2f( 43.3880386, -4.07110023 ) )
__children["SceneReader3"]["fileName"].setValue( 'E:/TEST_USD/Gaffer/Fullscene.usda' )
__children["SceneReader3"]["__uiPosition"].setValue( imath.V2f( 41.1257095, -11.8346634 ) )
__children["Switch"]["index"].setValue( 1 )
__children["Switch"]["__uiPosition"].setValue( imath.V2f( 48.085041, -31.8132782 ) )
Gaffer.Metadata.registerValue( __children["Switch"]["in"], 'noduleLayout:section', 'left' )
__children["Switch"]["in"][0].setInput( __children["SceneReader3"]["out"] )
__children["Switch"]["in"][1].setInput( __children["MergeScenes1"]["out"] )
__children["Switch"]["in"][2].setInput( __children["CopyAttributes"]["out"] )
Gaffer.Metadata.registerValue( __children["Switch"]["out"], 'noduleLayout:section', 'right' )
__children["Backdrop"]["title"].setValue( 'ASSET' )
__children["Backdrop"]["__uiPosition"].setValue( imath.V2f( -12.2826786, 108.079208 ) )
__children["Backdrop"]["__uiBound"].setValue( imath.Box2f( imath.V2f( -19.8972263, -16.9316368 ), imath.V2f( 25.8972263, 22.9316368 ) ) )
__children["Backdrop1"]["title"].setValue( 'Shaded USD' )
__children["Backdrop1"]["__uiPosition"].setValue( imath.V2f( 42.296669, -7.95288181 ) )
__children["Backdrop1"]["__uiBound"].setValue( imath.Box2f( imath.V2f( -9.67095947, -8.96381283 ), imath.V2f( 15.6709595, 14.9638128 ) ) )
__children["Backdrop2"]["title"].setValue( 'Layered SHD' )
__children["Backdrop2"]["__uiPosition"].setValue( imath.V2f( -25.6404552, -8.42588043 ) )
__children["Backdrop2"]["__uiBound"].setValue( imath.Box2f( imath.V2f( -24.4247265, -9.53996086 ), imath.V2f( 30.4247265, 15.5399609 ) ) )


del __children


Reply all
Reply to author
Forward
0 new messages