You can add attributes to shape nodes in Maya, and MTOA will export those extra attributes as user data in Arnold shape nodes. For example, you use this mechanism to add user data to a procedural node.
Add some extra attributes to a shape node, using the naming convention mtoa_constant_parameter-name. That is, the attribute name must always start with “mtoa_constant_”.
Export to ASS. In the .ass file, your extra attributes will be declared as user parameters:
procedural { name ArnoldStandInShape dso "C:/Users/SOLIDANGLE/Dev/MyProcedural.dll" min -9.63329697 0 0.861843109 max -6.73797035 3.62841082 9.87797546 matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 declare MyVector constant VECTOR MyVector 0 0 0 declare MyFloat constant FLOAT MyFloat 0 declare MyInteger constant INT MyInteger 0 declare MyBoolean constant BOOL MyBoolean off declare MyString constant STRING MyString "" }
Great info!Thank you.
I’ve tested it and now I can use that data in a shading network using aiUserData nodes, with the only mention that if my custom attribute is “mtoa_constant_example”, in the user data nodes I’m using just the name “example”.
Thanks again!