REnder out an alpha channel, when you put it into a compositing software it will recognise it and remove antthing not in the alpha (of you can use it as a cookie cutter in Photoshop to delete anything not in your scene.)
"No pressure, no diamonds" Thomas Carlyle