These nodes can be used to retrieve attributes from the attached geometry. When the scene is translated to Arnold, attributes are not exported automatically. They must be declared, according to the Arnold scene syntax, in the User Options field of the Arnold Parameters (see below for some examples). On export, MAXtoA translates them into user attributes on the Arnold geometry. To retrieve this data, a node is then required of the correct type. While there are more types than listed below, these should cover the type dimensions, (int, string, 1,3, and 4 floats). In Arnold, the parameter is selected by name only. The nodes below are very accepting of inputs. If for example, an attribute is named in user_data_rgb but the input passed is actually 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.

User Data Float

Attribute

Default

User Data Int

Attribute

Default

User Data RGB

 

Attribute

Default

User Data RGBA

 

Attribute

Default

User Data String

 

Attribute

Default


Examples

In these examples, a User Data Int is used to drive the index of a shader switcher.

The most classic data is of type constant, applying to the entire object, and can be set to 1 by

declare my_attr constant INT my_attr 1

 



Also, you can define the data as uniform, meaning one different value for each polygon (12 triangles here) by

declare my_attr uniform INT my_attr 12 1 INT 1 1 0 0 2 2 2 2 0 0 1 1