Material Network shader input, and Custom Bind Export Conflict

   2102   2   1
User Avatar
Member
170 posts
Joined: July 2010
Offline
I want to be able to export custom attributes from inside my own copy of the classic shader.
I also want to be able to feed inputs into my custom shader, at the Material Network level.
However, there appears to be a conflict.
When there are no inputs at the Network level, then the custom attribute is visible in the extra image plane in my mantra node.
However, as soon as I connect anything to any input at the Material Network level, then the custom image plane becomes black/zero.
Any ideas?
I have documented the example hip file with post it notes, from scene level all the way down to the shader level for navigation.
thanks
Edited by syntheticperson - May 29, 2018 20:32:22

Attachments:
customShaderMaterialArbitraryExportBug.v01.hipnc (2.8 MB)

User Avatar
Member
8177 posts
Joined: Sept. 2011
Offline
welcome to mat context, that is the expected behavior. You need to export the attribute at the highest level of the wrapped shader. You can use the ‘set_layer_export’ vop the pack your exports onto the layer coming out of the shader, and then use a ‘layer_export’ to export the attribute in the shader that calls the classic shader.
User Avatar
Member
170 posts
Joined: July 2010
Offline
Good to know.
Can you provide an example based on the example I provided?
Much thanks!
  • Quick Links