Exporting user data parameters to Arnold from Maya


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_”.
AddAttribute

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 ""
}

1 thought on “Exporting user data parameters to Arnold from Maya

  1. 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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s