I have 3 balls that are travelling down a pipe, I have a background image which I have aligned my pipe to a hole in the image.
In order to make the balls appear as if they came from the hole in the image, I need to mask the balls until they exit the hole.
I have created a piece (selected in the example image) that covers the pipe, but I don't know how to do the masking in the compositor.
Can I use cryptomatte for this or some other way?
See my example image below: