Hmm, yeah, I've never tried using the mtoa shaders. Looks like there are some more complex parameters than in the shaders that ship with Arnold, and using these would require some extra support. At IE, we're using OSL for all of this sort of thing, and we support fancier parameters on the OSL side ( for example, see loadSplineParameter here:
https://github.com/GafferHQ/gaffer/blob/master/src/GafferOSL/OSLShader.cpp, used by oslSplineColor shader node in Gaffer ). In theory, we could do the same thing for Arnold shaders, but I recall that we put some work into making sure that the Gaffer spline plug UI matched an OSL shader, and I vaguely recall that maya splines had some weirdness that behaved differently. So maybe it's safer not to do the fanciest thing and try to use a spline plug, and instead just support array parameters - this should be pretty straightforward, the first step would be adding some support here:
https://github.com/GafferHQ/gaffer/blob/master/src/GafferArnold/ParameterHandler.cpp
Having those parameters exposed as arrays wouldn't really make MayaRemapHsv very usable to a user - tuning a spline as a bunch of independent arrays instead of using a spline editor would be kind of painful - but it would allow you to port existing mtoa shaders.
>1. How does add extra attributes to a geometry or shader or light such that gaffer translates it into the final arnold scene?
If you use a CustomAttributes node to create an attribute with the "user:" prefix, that attribute will be exported to the renderer as a user attribute. So you could create "user:myDiffuse", and then reference it from a shading network as "user:myDiffuse" ( the only real difference from the mtoa_constant prefix is that we don't strip the prefix before passing to the renderer.
>2. How do we pass specific node names from gaffer into the exported arnold scene?
First off, object names do get set properly ( the geo is declared as invisible with a hash name, but when it gets instanced into the correct location, the proper name is filled in ). So the object id part of cryptomatte should just work.
For shader names, this is a bit tricky at the moment - at IE, we grab the original shader name and stick it in an attribute, so that we can use that attribute to drive a "User Crypto Aov" on the cryptomatte shader, instead of the default "Aov Crypto Material". Long term plan is that this sort of thing could be set up just using an expression in Gaffer, but our expression engine doesn't allow this sort of scene access yet. At IE, we have a node that just converts shader names into string attributes for this purpose - we haven't put it in public Gaffer because this is a bit of a specific hack, but if it would be really helpful to you, we could probably add that to Gaffer.
>3: I also noticed that namespaces i.e. ":" are not allowed in gaffer node names. So in connection to (2) how does one pass such as name in a workflow like cryptomatte where the namespace is the key for the asset crypto.
First off, it's important to distinguish between node names and scene location names. Nodes are just used for processing the graph, and node names are not connected to the names of things in the scene. Which can be a bit confusing that there are these two kinds of names, which by default can be the same. So for example, if I create a default "Sphere" node in Gaffer, it is named "Sphere", and creates a location named "sphere". You can see these in the UI as "Node Name", and the "Name" parameter that is the first of the node parameters. You can't name the "Node Name" to "Blah:Sphere", but this wouldn't affect the created scene anyway. What you can do is set the "Name" parameter to "blah:sphere". You would then have a node with a full name of "script.Sphere", which outputs a scene containing one location named "blah:sphere". Hopefully that makes some sense?
As for namespacing, we don't use it at IE - we instead use attributes output by our asset management system, and drive a custom cryptomatte from that. But if you want to put namespaces in your naming ... I think that should work.
-Daniel