Need help with Dynamic Character HitMask

Hello guys.
Can anybody help me,please, maybe some step-by-step description.
Because I don`t understand how to make this hitmask works:

I get it work for my TPS, but the character change material to damage immediately after one shot, and it change material on whole mesh-not only the hit position. How to fix it?

Hi ThierryH. Is there any chance to get from you this example? I also have problems with this HitMask and unwrapping UV maps