do an RGB ID/Matte pass. https://www.9jcg.com/tutorials/neosca..._mattes_03.jpg or maybe output only one channel from the new render layer you made.