---
title: "Using PxrMatteID"
canonical: "https://rmanwiki-27.pixar.com/space/RFH27/544646676/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/RFH27/pages/544643715/User+Attributes).

> ⚠️ 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://c97c1f35-2d34-49d0-9318-5ab1405491d8)

Set its type and color value.

![image](media://7aa7cf20-bb43-43d5-8186-d21425641b7f)


### 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://47ffdc5c-6d2d-45b4-9a78-f6d4686efc36)


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

![image](media://7e0e07e6-d363-4428-a320-ced1a9ea699a)



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://36c87fdd-d998-4fa1-af3b-c8db59372153)


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