'Shadow mask' material?

I am trying to get my head around how to create a material that will act as a shadow matte, eg a material that when assigned to geometry, will make anything that isn’t a shadow transparent, as I would do in Maya when rendering passes.

Does anyone have any tips on where to start with this?

Thanks!

Did you find out how to make shadow matte?

Bump, need this too…

you could you make a texture parameter collection. One of those parameters would be opacity. Every material would have to be set to masked opacity (either transparent or not) or opacity however!

then you could trigger/button press (whatever) every object disappearing.