The MatteBuddy is a custom matte selection tool, which I built around Python for Guru Studio. At the time of its creation their primary rendering engine (Redshift) didn't support Cryptomatte and they needed an alternative.
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/be0aaa6b-f155-4553-b5b3-c9360e8e6d6e_rw_1200.png?h=1d4e79bda73885e42a472e03217e947b)
About
The MatteBuddy nodes let you quickly merge a collection of Mattes together to create a new matte set based on name, class, sample region or character. It has a robust UI to help artists work quickly and efficiently.
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/98cf662f-6c96-4153-8f51-34d765e6f1f7_rw_1200.png?h=36064d0920041323d1f35345646625cf)
1) Add mattes by character name
2) Add mattes by class, I.E. Character, Props, Sets, etc.
3) Add mattes by sampling the screen
4) Add mattes by running a general search
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/1eca3d15-1dba-48e5-b117-beb3b9c92429_rw_1200.gif?h=71cac738fccf00199ede1dfc07408ce5)
Adding Character based mattes
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/34841c18-e34c-4752-8135-b4d6fce87120_rw_1200.gif?h=82eebdb1b1511abd3da4b3c9563d5c70)
Adding mattes based on class
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/fc967360-4234-4b8a-83f9-3ceaa9607ab9_rw_1200.gif?h=12577fdb99754ad066c187899cf262a9)
Adding mattes based on sampling the screen
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/ab3df47a-3d5e-4255-9aad-e51c43351157_rw_1200.gif?h=2ff4729d430f63fb8ead84f60638f703)
Adding mattes based on a search parameter
How it works
At Guru the matte sets are called HPMs, which stand for Hash Per Matte, these work similarly to Cryptomatte and store a hash value for each matte set. When Nuke loads these in, the hash is converted to user readable copy and that's what the tool runs a search on. The matte set names are formatted as indicated below with a rigid structure that is based around asset classes and HPM names.
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/0ec7c9c4-225c-4b08-aeba-e69212447dd5_rw_1200.png?h=805428db361b7f9e769cd899b6fdfdfd)
Using this information I was able to write a few different python modules, which parsed the data based on the users request and build a collection of mattes out of it.
Development Mode
Since the tool can get pretty complicated to troubleshoot, I built in a development mode that allows anyone to modify and test a separate set of development scripts before pushing changes to the floor. It also prints cleaner logs to the script editor.
![](https://cdn.myportfolio.com/b9d4e81724aa0ec0b667f13bce4296e7/f35b59ff-26b5-4a98-9018-ba385e6e7104_rw_1920.png?h=4252267ba22f09092b1dacf15d94ad66)