Different colored models are driven by one user_data_RGB shader
This short tutorial covers how to use the user_data _ RGB shader to assign a single shader with different colors to the three models in the scene. You can add user data attributes to shape nodes in C4D, and C4DtoA 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 C4D 'user data' to the geometry. On export, C4DtoA translates them into user attributes on the Arnold geometry.
A C4D file (R18) that demonstrates this workflow can be downloaded here.
In this scene, there are three models. We want to assign red, blue, and green colors to each model. Start off by selecting all three models and assign a standard_surface shader to them.
Models with one shader assigned to them all
Create a user_data_RGB shader and connect it to the color attribute of the standard_surface shader.
Select the user_data_RGB shader and in the text field next to Color Attr Name type 'color'.
Add an attribute to one of the models in the Attribute Editor (User Data > Add User Data...). Type 'color' in the Name field. Note that you must use lower case letters. Capital letters will not work. Change the Data Type to vector. This will enable us to change the RGB values of the color output of the standard_surface shader.
Add the name 'color' and change the Data Type to Vector
Select OK to add the User Data to the model. You should see the new color attribute with three vector fields for each RGB channel.
Change the first Color (R) to 1 and render the scene. You should see that the model's color has changed to red because we have added 1 to the R field of the color attribute.
To change the colors of the other models, repeat the process above. However, in the Color node, change the first R field to 1 for one model, the G field to 1 for the second, and the B field to 1 for the third model. You should see something like the image below:
We can also use the same shader for the eyeballs. If we change the Default Value of the user_data _ RGB shader to white, the eyeballs will be white because we have not added a color attribute to them. It will change the color to white to any objects that have been assigned the Standard shader that has the UserData RGB node connected to it (you can also drag and drop a shader onto this attribute too).
Change the 'Default Value' color to white or middle drag a white shader onto this attribute