---
title: "Using PxrMatteID"
canonical: "https://rmanwiki-26.pixar.com/space/RFH26/19268347/Using%20PxrMatteID"
format: markdown
---
[PxrMatteID](https://renderman.atlassian.net/wiki/spaces/REN26/pages/19662119) outputs matte AOVs for compositing.  This requires you add a User Attribute, explained in more detail [here](https://renderman.atlassian.net/wiki/spaces/RFH26/pages/19268175).

> ⚠️ PxrCryptomatte has since superseded this workflow as a useful and nearly automatic alternative.

---


### Add a user attribute for MatteID0.

Duplicate the fields for:

- Name
- Label (this is the UI name)
- Tags (necessary to see RenderMan attributes and edit them during interactive rendering)  
script_ritype  color  
renderman  attr

![image](media://8a48bb21-9dbe-4437-a628-ec319495df53)

Set its type and color value.

![image](media://17f1f050-2196-46b8-98eb-3b219cce08a1)


### Add PxrMatteID

Create a Houdini buildarray node to connect to the Utility Pattern on the PxrSurface material. Then connect a PxrMatteID Pattern node to the buildarray as shown below.

![image](media://c2e40750-8c98-4d78-b5c5-cf4fbb3ea4ac)


In your PxrMaterialBuilder Network, add a PxrMatteID VOP.  Set the color as the user attribute above.

![image](media://ba2b8079-f2d2-4093-870e-dc6254ff62ce)



Connect PxrMatteID's resultAOV to PxrSurface's Utility Pattern.

### Set up AOV for Output

Choose the correct/corresponding MatteID AOV output from the RenderMan ROP node Displays Tab

![image](media://e9cd577c-0016-48e2-8df6-101e9b04a23b)


You will notice we set a color on the OBJ with an attribute and there's also a color from the MatteID pattern itself. This is so you can multiply the color of the attribute by the pattern node. For example, you can supply a texture mask to the MatteID pattern node and have it multiplied against the color chosen in the MatteID Attribute