Creating masks by selection?

Hey Guys,
I was wondering if there is a quick and easy way to create black and white masks by selection in Blender.
Or maybe as a workaround create black and white masks from vertex groups?

You can make them like this from weighted vertex/groups, then use for material editor etc.

Also here…

First of all sorry for the late reply.
The fist method does not work for me, since I want a hard edge between the mask. Now it has a falloff to the next vertex.

The second method is actually not that bad. I’ve mostly done my texturing in Mari, where this is a similar method. The problem is, that this function does not work in the Image editor.
I cant always have a perfect look at all the stuff I want to paint on. So doing that in the UVs is normally my way to go.