arnold-usd
arnold-usd copied to clipboard
Multiple output support for shaders
We'd like to support connections between shaders using multiple outputs, currently we just have a default output and its component connections.
Here's an example of a usd file generated with multiple outputs for colors Q,R and component float outputs Q:r, Q:g, Q:b, R:r, R:g, R:b.
The usda file is generated representing components with the : separator since the . separator isn't supported in usd:
"/Applications/Houdini/Houdini18.5.499/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/husdshadertranslators/default.py", line 1350, in createUsdShaderOutput return usd_shader.CreateOutput( usd_shader_output_name, usd_type ) ErrorException: Error in 'pxrInternal_v0_20_pxrReserved_::SdfAttributeSpec::New' at line 73 in file src/usd/usd-20.08/USD-py2.7/pxr/usd/sdf/attributeSpec.cpp : 'Cannot create attribute spec on </materials/materiallibrary1/probablity1> with invalid name 'outputs:Q.g''
so we'll probably have to usd a : separator and map between Q:g and Q.g to support the component linking in Arnold in our usd writer.
Based on what Alan commented in #910 , it's possible that the work is only on the usd writer side. We might find a separator character that usd accepts AND that arnold understands out of the box
Issue synced internally to ARNOLD-13267
Possible duplicate of https://github.com/Autodesk/arnold-usd/issues/1459
Issue synced internally to ARNOLD-13474