How can i create an ID or matte material for render passes?
3149 1 0-
- _udo_
- Member
- 19 posts
- Joined: Feb. 2019
- Offline
-
- bender83
- Member
- 40 posts
- Joined: May 2010
- Offline
You essentiall need to do 3 things
1) Create an identifying attribute, either an id (0, 1, or 2 for R G and B), or assigning colors themselves to the geometry.
2) You then call this attribute in your shader via a bind node - and then 'bind export' it out to the AOV your ROP will be looking to write. so 'charIDs' maybe.
3) on your mantra ROP, add an additional image plane, set it to the name of your output color variable (whatever you're saying the attr is called in your bind export node), make sure the datatype is vector so it will write as a color value.
Ensure you're writing out multilayer EXRs and you should be good to shuffle out the mattes via a shuffle node in Nuke- just look for the one called 'charIDs'.
P.S. If you're using IDs - you can't just assume mantra knows what those IDs mean - you'll need to make 3 constant VOP nodes set each to color - Red(1,0,0), Green(0,1,0), and Blue(0,0,1), respectively, and the use the @id Integer as the switcher input to a switch node to allow the ID to switch between the 3 colors directly.
P.P.S. As an alternative to ALL of this - enable Cryptomatte, and ensure you have access to cryptomatte Nuke nodes .
1) Create an identifying attribute, either an id (0, 1, or 2 for R G and B), or assigning colors themselves to the geometry.
2) You then call this attribute in your shader via a bind node - and then 'bind export' it out to the AOV your ROP will be looking to write. so 'charIDs' maybe.
3) on your mantra ROP, add an additional image plane, set it to the name of your output color variable (whatever you're saying the attr is called in your bind export node), make sure the datatype is vector so it will write as a color value.
Ensure you're writing out multilayer EXRs and you should be good to shuffle out the mattes via a shuffle node in Nuke- just look for the one called 'charIDs'.
P.S. If you're using IDs - you can't just assume mantra knows what those IDs mean - you'll need to make 3 constant VOP nodes set each to color - Red(1,0,0), Green(0,1,0), and Blue(0,0,1), respectively, and the use the @id Integer as the switcher input to a switch node to allow the ID to switch between the 3 colors directly.
P.P.S. As an alternative to ALL of this - enable Cryptomatte, and ensure you have access to cryptomatte Nuke nodes .
Edited by bender83 - Oct. 10, 2022 10:52:01
-
- Quick Links

