Take a look at this: UE4 - Advanced Mask Texture Optimisation Tutorial - YouTube and its download in the description.