Material ID-Channel Render Mask

How can I make render mask element based on Material ID Channel (i mean by material not by object)
so i can get mask with different color on the same object like in case of Multi/Sub-Object Material or CoronaLayeredMtl .

Here you go.

Thanks for answering .
do i missing something !?

Sorry My Mistake , :smiley: you Know at Night Strange Things Happen, its working fine .
I Totally forgot that the modifier work on elements only :smiley: .