The aiUserData shaders, such as aiUserDataFloat, allow you to read user data from Maya nodes. So you can add user data to shape nodes and then use that user data in your shading networks.
Here’s the basic recipe:
- Create an extra attributes to add user data to a shape node (the shape node, not the transform node 🙂
Select the shape node, and add an extra attribute using the naming convention “mtoa_constant_“. For example, an attribute named “mtoa_constant_MyRed” would add the user data “MyRed” to the shape node.
- Add an aiUserData node to a shading network and connect it.
For example, you could connect an aiUserDataFloat to the red, green, or blue color of a Standard shader.
- In the aiUserData attributes, set Float Attr Name to the name of the user data.
For example, if you added an attribute named “mtoa_constant_MyRed”, then set Float Attr Name to “My Red”.
great blog!! Not really the correct place to reply but it is concerning user attributes. I am trying to override AA_samples per geometry and cant figure out where to add the attribute. I tried adding a user option to a set with AA_samples 6 and numerous other things but to no avail. Any ideas??
Hi
Sorry, but Arnold doesn’t support per-object AA settings.