anderslanglands / alShaders2

BSD 3-Clause "New" or "Revised" License
75 stars 38 forks source link

KtoA generates all crypto_materials with the same name 'arnoldSurfaceShader' #3

Closed ababak closed 7 years ago

ababak commented 7 years ago

I had the same problem with previous alShaders but there was a crypto_material_override option in alSurface node that solved an issue (I had to copy material name there). Now I can't find how to differentiate the materials.

Thanks

jonahfriedman commented 7 years ago

Hi Ababak,

Could you confirm some details?

  1. Is the manifest working? When you key things, they all select by the name, "arnoldSurfaceShader"?
  2. If you turn off "strip material namespaces" on the shader's options, what is the behavior?

Thanks. There are override mechanisms you can use using user data on objects, but I would hope it wouldn't be necessary.

ababak commented 7 years ago

Hi Jonah,

  1. Yes, the file is visually single-color and the only material is "arnoldSurfaceShader".
  2. When I turn on namespaces I get "arnoldSurfaceShader" prefixed with geometry path: /root/world/geo/cone:arnoldSurfaceShader, /root/world/geo/teapot:arnoldSurfaceShader
jonahfriedman commented 7 years ago

Makes sense. Unfortunately this behavior is to be expected. The naming parsing is a little bit Maya-centric. One nice thing about the AOV shaders paradigm though is that it's a lot more tractable to make a Katana-centric version of Cryptomatte, if someone in the Katana community decided to do it. I had an idea for better parsing of those names, where you specify which delimiter you want to use, so if anybody wants to implement that I think we could have a pretty awesome katana-esque Cryptomatte.

Interesting that KtoA names materials this way though. How does it name them if the same material is assigned to multiple things?

ababak commented 7 years ago

Everything gets named after the first object: /root/world/geo/cone:arnoldSurfaceShader.

Is it possible to override material names like I did for Arnold 4? I am not sure object-based overrides will help in my case.

Thanks

jonahfriedman commented 7 years ago

Unfortunately no, because there's no place to put that override with AOV shaders. Should maybe talk to the KtoA devs about how exported materials get named, if there are better names available that could be used, or alternatively automatically exporting the user data on the objects.

jonahfriedman commented 7 years ago

For anyone else finding this, @ababak is using a workaround involving an AttributeScript that applies crypto_material, crypto_object and crypto_asset attributes. And about a real solution in KtoA itself, I would stay tuned.