Table of Contents

This page provides information on the VRayUserAttr node.

 

Overview


The VRayUserAttr reads and returns custom User Attributes assigned to a particular geometry with the VRayObjProp node, and uses the information to control either a color slot or a parameter that requires a scalar value.

 

 

 


 

UI Path: ||Toolbar|| > V-Ray menu icon > Textures > VRayUserAttr

 

 

Parameters


 

 

 

Type – Specifies the type of data the node reads.

Color – The node reads and returns color information in RGB format.
Scalar – The node reads and returns numerical information.

Content – A string that specifies the name of the custom User Attributes.

 

 


 

Example: How to use the VRayUserAttr node

 

Below is a sample node graph with the necessary settings of the nodes in order to use the VRayUserAttr node to control the diffuse color of a VRayMtl node.

 

 

 

In the example we have two objects in the scene - a sphere and a cube. Both objects have the same VRayMtl node applied as a material. We are using a VRayUserAttr node connected to the diffuse slot of our VRayMtl, the Type is set to Color and the Content is set to "diffuse_color". Each of our geometry nodes passes through a VRayObjProp node. This allows us to assign a specific User Attribute to each geometry. In our case we are assigning a User Attribute of "diffuse_color=1,0,0" to the Cube and a User Attribute of "diffuse_color=0,1,0". When the rendering begins V-Ray is trying to determine the diffuse color of each object. The diffuse color is specified by the "diffuse_color" user attribute which in the case of the Cube is set to 1,0,0. Because the Type of the VRayUserAttr node was set to Color, the 1,0,0 value is translated into RGB which translates to the red color you see in the rendering.

The same approach can be used to control any parameter that requires a numerical value, with the only difference that the Type of the VRayUserAttr should be set to Scalar.