Camera material

Ive got a segmentation material (objid)
I want the camera to render this material out on all objects (they have different objid) , how do i do this?

After that, i have another question
How do i get the rbg and static mesh name?