Using material id (from Maya) as alpha matte in Nuke


#1

Hi I’m new on this forum and also new in nuke. I had this question. I exported my scene in different passes like material id, reflection, refraction and also the rgb render. Than I imported this EXR sequence in Nuke and everything worked fine. My material ID has a green object on a red surface and I want to separate the object from the surface. I thought I could use a shuffle node to select the green object and use it as an alpha/matte for the RGB rendered image (Like in After Effects). But I have no idea how i should do this. Which node I have to use to get the right result.

PS I’m new in Nuke
Sorry if there are mistakes. I’m italian! XD


#2

What do you want to do with the materialid?


#3

Hey,

There are so many ways to do what you are asking!

press the little golden copy icon on here, then copy the text, paste it into nuke.
http://pastebin.com/j1SEB8ar#
it’s probably more useful than trying to describe it on here:) You will have to replace the read nodes with your own.

There’s still more ways of doing what you asked so some of these may be helpful I think.

A little note about the copy node…
It’s very very useful, I still struggle with the shuffle / shuffle copy node most of the time and it’s often over used when a ‘copy’ node will do. the shortcut is ‘k’ on the keyboard to get one. it’s really simple to use and allows you to create new channels too.

channel on the left will REPLACE the channel on the right.
image plugged into A will REPLACE [part of] the image plugged into B
the part that is changed is based on what you set it to. It’s most used for copying a Z channel into an image, or copying masks into images to pipe downstream. It’s called copy, but its operation is replace, so think of it as a ‘replace’ node’