Ai UserData Shaders

You can add attributes to shape nodes in Maya, and MtoA will export those extra attributes as user data in the Arnold shape nodes. When the scene is translated to Arnold, attributes are not exported automatically. They must first be added as a Maya 'attribute' to the geometry, where it is visible in the 'Extra Attributes'. On export, MtoA translates them into user attributes on the Arnold geometry. If for example, an attribute is named in user_data_rgb, but the input passed is an integer, then it will still work and just convert the integer to float and pass it to each of the R, G & B values. 

It is also possible to read user data fields from volumetric shapes, allowing things like per-particle user data on volumetric spherical point clouds to affect the result of volumetric shading.

More information about User Data Shaders can be found here. Tutorials about User Data can be found here. 

 

The following examples show you how to use the 'UserData' nodes:

User Data Bool

Bool Attr Name

...

Default Value

...

User Data Color

 

Color Attr Name

Read RGB color from shape user data, at the current shading point on the surface.

Default Value

Output value to use if user data with the specified name is not available.

User Data Float

Float Attr Name

Read float value from shape user data, at the current shading point on the surface.

Default Value

Output value to use if user data with the specified name is not available.

User Data Int

Int Attr Name

Read integer value from shape user data, at the current shading point on the surface.

Default Value

Output value to use if user data with the specified name is not available.

User Data Pnt2

Pnt 2Attr Name

...

Default Value

...

User Data String

 

String Attr Name

Reads the string from shape user data.

Default Value

Output value to use if user data with the specified name is not available.

User Data Vector

Vector Attr Name

...

Default Value

...

 

  • No labels