---
title: "User-defined Attribute Map | VRayUserAttr"
canonical: "https://documentation.chaos.com/space/VRAYNUKE/110625425/User-defined%20Attribute%20Map%20%7C%20VRayUserAttr"
format: markdown
---
This page provides information on the VRayUserAttr node.

 

## **Overview**

---

 

 

---

 

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

 

![image](media://5f6d45e7-9c9b-4e0a-8e40-012d674ab454)

 

## **Parameters**

---

 

![image](media://98f9435f-e792-4ba0-b8cb-67e8271b1c60)

 

 

**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.

 

![image](media://0aed6ff4-f961-464e-b761-a9e36284ac9c)

 

 

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.

 

---