3D objects as comp mattes

I was trying to figure out how to matte 3D cards with 3D scene data thinking that a matte shader would be needed and getting very frustrated.

By some chance I took a look at the Merge Expression node changed its alpha contribution to -1 and piped that into the apply material node for a 3D object. It seems to work pretty well but you need to premult by the alpha channel after a scanline node to get the alpha to be used properly. And it can give some strange results at times.

I have absolutely no idea if there is a better or proper way to do this (I’m very new to nuke) but if someone has another way to achieve this I’d love to hear it.

Test script attached.

Cheers

Dave

Attached Files
File Type: zip Matte_3D.zip (41.7 KB)
No Responses to “3D objects as comp mattes”

Post a Comment