---
title: "Using PxrMatteID"
canonical: "https://rmanwiki-25.pixar.com/space/RFH25/22642751/Using%20PxrMatteID"
format: markdown
---
[PxrMatteID](https://renderman.atlassian.net/wiki/spaces/REN20/pages/21561378) outputs matte AOVs for compositing.  This requires you add a User Attribute, explained in more detail [here](https://renderman.atlassian.net/wiki/spaces/RFH25/pages/22642749).

> ⚠️ 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://f1c9b5d0-8392-4b39-bfa8-0acd71fd96db)

Set its type and color value.

![image](media://3f2c790b-ce50-4058-b599-371caa9cbd75)


### 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://30602bff-502f-4434-ba4c-02e2a08812bf)


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

![image](media://4801fb19-3e69-4bef-87b9-693baa707575)



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://5021141e-3fae-4825-853f-29be88635021)


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